Public bug reported: Steps to reproduce:
1) Create VM using virt-install 2) Delete the VM with its associated volume Expected results: The VM is removed and the volume is deleted Actual results: When trying to remove the volume the following error is printed: Errors encountered while removing certain storage devices. cannot unlink file '/var/lib/libvirt/images/bootstrap.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 3359, in delete if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self) libvirtError: cannot unlink file '/var/lib/libvirt/images/xxx.qcow2': Success And the volume is still there $ sudo virsh vol-list default Name Path ------------------------------------------------------------------------------ bootstrap.qcow2 /var/lib/libvirt/images/bootstrap.qcow2 $ sudo file /var/lib/libvirt/images/bootstrap.qcow2 /var/lib/libvirt/images/bootstrap.qcow2: QEMU QCOW Image (v3), 21474836480 bytes Other info: I found an upstream bug that is related to this problem https://bugzilla.redhat.com/show_bug.cgi?id=1293804 , I tested the merged patch and it fixed the problem for me. ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: libvirt-bin 1.2.16-2ubuntu11.15.10.3 ProcVersionSignature: Ubuntu 4.2.0-34.39-generic 4.2.8-ckt4 Uname: Linux 4.2.0-34-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.19.1-0ubuntu5 Architecture: amd64 Date: Fri Apr 15 17:05:34 2016 InstallationDate: Installed on 2014-12-06 (495 days ago) InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1) SourcePackage: libvirt UpgradeStatus: Upgraded to wily on 2016-03-08 (38 days ago) modified.conffile..etc.apparmor.d.usr.lib.libvirt.virt.aa.helper: [modified] modified.conffile..etc.libvirt.qemu.conf: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu.conf'] modified.conffile..etc.libvirt.qemu.networks.default.xml: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu/networks/default.xml'] mtime.conffile..etc.apparmor.d.usr.lib.libvirt.virt.aa.helper: 2016-03-14T13:22:07.751461 ** Affects: libvirt Importance: Unknown Status: Unknown ** Affects: libvirt (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug third-party-packages wily ** Description changed: - Steps to reproduce: 1) Create VM using virt-install 2) Delete the VM with its associated volume Expected results: The VM is removed and the volume is deleted Actual results: When trying to remove the volume the following error is printed: Errors encountered while removing certain storage devices. cannot unlink file '/var/lib/libvirt/images/bootstrap.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 3359, in delete - if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self) + 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 3359, in delete + if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self) libvirtError: cannot unlink file '/var/lib/libvirt/images/xxx.qcow2': Success And the volume is still there $ sudo virsh vol-list default - Name Path + Name Path ------------------------------------------------------------------------------ - bootstrap.qcow2 /var/lib/libvirt/images/bootstrap.qcow2 + bootstrap.qcow2 /var/lib/libvirt/images/bootstrap.qcow2 $ sudo file /var/lib/libvirt/images/bootstrap.qcow2 /var/lib/libvirt/images/bootstrap.qcow2: QEMU QCOW Image (v3), 21474836480 bytes Other info: I found an upstream bug that is related to this problem https://bugzilla.redhat.com/show_bug.cgi?id=1293804 , I tested the merged patch and it fixed the problem for me. - - $ lsb_release -a - No LSB modules are available. - Distributor ID: Ubuntu - Description: Ubuntu 15.10 - Release: 15.10 - Codename: wily ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: libvirt-bin 1.2.16-2ubuntu11.15.10.3 ProcVersionSignature: Ubuntu 4.2.0-34.39-generic 4.2.8-ckt4 Uname: Linux 4.2.0-34-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.19.1-0ubuntu5 Architecture: amd64 Date: Fri Apr 15 17:05:34 2016 InstallationDate: Installed on 2014-12-06 (495 days ago) InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1) SourcePackage: libvirt UpgradeStatus: Upgraded to wily on 2016-03-08 (38 days ago) modified.conffile..etc.apparmor.d.usr.lib.libvirt.virt.aa.helper: [modified] modified.conffile..etc.libvirt.qemu.conf: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu.conf'] modified.conffile..etc.libvirt.qemu.networks.default.xml: [inaccessible: [Errno 13] Permission denied: '/etc/libvirt/qemu/networks/default.xml'] mtime.conffile..etc.apparmor.d.usr.lib.libvirt.virt.aa.helper: 2016-03-14T13:22:07.751461 ** Bug watch added: Red Hat Bugzilla #1293804 https://bugzilla.redhat.com/show_bug.cgi?id=1293804 ** Also affects: libvirt via https://bugzilla.redhat.com/show_bug.cgi?id=1293804 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1571068 Title: libvirtError: cannot unlink file '/var/lib/libvirt/images/xxx.qcow2': Success To manage notifications about this bug go to: https://bugs.launchpad.net/libvirt/+bug/1571068/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs