delete logadm configurations for deleted kvm VMs
sometime you the a warning from logadm like this one:
logadm: Warning: /zones/b3a4a0c2-34da-e595-be7d-a192a730518e/root/tmp/vm.log: No such file or directory
The problem is, that logadm tries to log events for a KVM VM that was already deleted.
You can cleanup the config with this one-liner:
for l in $(logadm -V | awk '/zones/ {print $1}'); do v=$(echo $l | awk -F/ '{print $3}'); \
exist=$(vmadm lookup uuid=$v); [[ -z "$exist" ]] && logadm -r $l; done
Written by Philipp Haußleiter
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Smartos
Authors
sawanoboly
1.222K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#