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
Steps to Reproduce:
- Add SCSI disk from virt manager to VM
- Start VM from virt-manager and confirm disk is attached as SCSI.
- Try to delete the newly added SCSI disk using virsh vol-delete command: virsh # vol-delete /var/lib/libvirt/images/.img
Actual results:
It is giving Following error: error: Failed to delete vol /var/lib/libvirt/images/.img error: cannot unlink file '/var/lib/libvirt/images/.img': Success