Hide Forgot
Description of problem: On Centos machine, if we try to delete the SCSI disk image for running vm (which is added via virt-manager) through virsh vol-delete command, getting "cannot unlink file 'XXX': Success" error. This error occurs intermittently and occurs only if we try to delete disk image when vm is running. Version-Release number of selected component (if applicable): OS:CentOS Linux release 7.2.1511 Libvirt: [root@CV-HJ-CentOS7-02 images]# virsh version Compiled against library: libvirt 1.2.17 Using library: libvirt 1.2.17 Using API: QEMU 1.2.17 Running hypervisor: QEMU 1.5.3 How reproducible: Steps to Reproduce: 1. Add SCSI disk from virt manager to VM 2. Start VM from virt-manager and confirm disk is attached as SCSI. 5. Try to delete the newly added SCSI disk using virsh vol-delete command: virsh # vol-delete /var/lib/libvirt/images/<filename>.img Actual results: It is giving Following error: error: Failed to delete vol /var/lib/libvirt/images/<filename>.img error: cannot unlink file '/var/lib/libvirt/images/<filename>.img': Success Expected results: It should not give any error and should delete the disk image properly. Additional info:
Fedora Rawhide is not CentOS, and CentOS will not have the version of libvirt that is currently in Fedora Rawhide for "awhile". CentOS has their own downstream bugtracker, which might be the most appropriate place for filing bugs against the versions of packages in CentOS, but since CentOS is based on the corresponding RHEL release, it's also reasonable to file such bugs against the RHEL7 version of the package - this is why I've moved this BZ from Fedora/Rawhide/libvirt to RHEL7/libvirt. As for the bug, it's highly possible your problem is fixed by the following upstream commit: commit cb19cff468432e55366014658f405066ce06c2f2 Author: John Ferlan <jferlan> Date: Wed Sep 30 17:37:27 2015 -0400 virfile: Fix error path for forked virFileRemove This commit reports eliminating the same error message. It first appeared upstream in 1.2.21, and I don't see it backported to the RHEL7 libvirt build.
*** This bug has been marked as a duplicate of bug 1293804 ***