Greetings,<br><br>I am playing around with libvirt, virsh and virt-manager (via QEMU kvm).<br>For testing purpose, through libvirt, I am setting up several machines, taking some snapshots and wiping out everything.<br><br>
The weird thing is that once I open virt-manager, if my cleanup routine hanged in someway, I still see those machines. <br>If I list the domains (or snapshots, or pools) through virsh I don't see anything available.<br>
<br>Please note that I don't posses neither the disk image nor the (external disks) snapshots.<br><br>So here's the problem:<br>If I try to delete the machine on virt-manager I get the following error:<br>---------------------------<br>
Error deleting virtual machine '191da985-cc43-44b9-85be-95dde6229791': Requested operation is not valid: cannot delete inactive domain with 3 snapshots<br><br>Traceback (most recent call last):<br>  File "/usr/share/virt-manager/virtManager/delete.py", line 176, in _async_delete<br>
    self.vm.delete()<br>  File "/usr/share/virt-manager/virtManager/domain.py", line 1127, in delete<br>    self._backend.undefine()<br>  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1364, in undefine<br>
    if ret == -1: raise libvirtError ('virDomainUndefine() failed', dom=self)<br>libvirtError: Requested operation is not valid: cannot delete inactive domain with 3 snapshots<br>---------------------------<br><br>
The error if fixable changing in file <br>/usr/share/virt-manager/virtManager/domain.py<br><br>The line # 1127<br>self._backend.undefine()<br>with <br>self._backend.undefineFlags(<br>            libvirt.VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA)<br>
<br>Standing to libvirt documentation is not possible to undefine a domain if it has snapshots; a forced undefine is available through the undefineFlags() function with the proper flag set.<br>I dind't provide a patch as this can be an unwanted change.<br>
You may want to reimplement the deletion including a warning for the user or something else.<br><br>Anyway I can't figure out where those information are stored, virsh doesn't see anything about, on my HD no information are stored. If I restart QEMU, libvirt-bin or even my machine the VM still are there...<br>
<br>Thanks for the great tools provided anyway!<br><br>NoxDaFox<br>