Files left over after removing KVM guest

red888 asked:

Looking at this post I ran the following commands to remove a VM:

sudo rm /var/lib/libvirt/images/centos01.qcow2
sudo virsh undefine centos01 --managed-save --snapshots-metadata

But it looks like I still have some files pertaining to this image present:

find /var -name centos*

Should I just delete these files? Will I run into a problem if I create a new VM with the same name?

Also, what is a .monitor file? I haven’t been able to find much info about what they do.

My answer:

These files are safe to delete as long as the corresponding VM is not running.

The log files are never deleted automatically when you undefine a VM; you can rotate or delete them yourself.

And the monitor is a socket by which you can connect to the VM’s internal qemu monitor. Not somehting you need if the VM no longer exists, and you don’t normally use it anyway.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.