Hi,
Until today, I hadn't found a way to cleanly remove a KVM virtual machine through command line on CentOS 6 or 7! I had to run 'systemctl restart libvirtd' or 'service libvirtd restart'
After several months (!!!), I found this thread:
https://github.com/pradels/vagrant-libvirt/issues/107Now, I know how to cleanly remove a KVM virtual machine (with default file location):
virsh destroy
vm.example.comvirsh undefine
vm.example.com --managed-save
/bin/rm /var/lib/libvirt/images/vm.example.com.img
/bin/rm /var/log/libvirt/qemu/vm.example.com.log
virsh vol-delete /var/lib/libvirt/images/vm.example.com.img --pool default
I don't know if the last command ('virsh vol-delete' avoiding the libvirtd restart) is a bug or a feature but it must be documented! Only a libvirt developer can guess something like this.