#804009 libvirt-bin: exception when deleting a vm

Package:
libvirt-bin
Source:
libvirt
Submitter:
Ritesh Raj Sarraf
Date:
2023-04-17 15:57:28 UTC
Severity:
normal
Tags:
#804009#5
Date:
2015-11-04 08:13:44 UTC
From:
To:
When deleting the VM, along with its file image, I am shown the
following error message in a pop-up.


`
Errors encountered while removing certain storage devices.

cannot unlink file '/var/lib/libvirt/images/debian8.qcow2': Success
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/delete.py", line 182, in _async_delete
    self._async_delete_path(conn, path, meter)
  File "/usr/share/virt-manager/virtManager/delete.py", line 228, in _async_delete_path
    vol.delete(0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3361, in delete
    if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self)
libvirtError: cannot unlink file '/var/lib/libvirt/images/debian8.qcow2': Success


At one end, it says "Success" but also reports error.
Lookng at the datastore, the VM file is not deleted.



rrs@learner:~$ sudo ls /var/lib/libvirt/images/ -l
[sudo] password for rrs:
total 3768528
-rw------- 1 root root 8591507456 Nov  4 13:32 debian8.qcow2
2015-11-04 / 13:43:10 ♒♒♒  ☺

#804009#10
Date:
2015-11-06 08:25:05 UTC
From:
To:
Hi,

The "Success" means that virFileRemove failed to set a proper errno.


Assuming your're using qemu:///system

Can you provide a bit of config information:

  virsh pool-dumpxml default
  virsh vol-dumpxml --pool  default debian8.qcow2

Can you also try to delete via vol-delete:

  virsh vol-delete --pool  default debian8.qcow2

That should fail as well. If it does please do a:

  grep libvirtd /var/log/syslog
  journalctl -u libvirtd.service

Cheers,
 -- Guido