Bug 1306536 - SLES12-Libvirt: virsh vol-delete fails when deleting disk image: cannot unlink file 'XXX': Permission denied
Summary: SLES12-Libvirt: virsh vol-delete fails when deleting disk image: cannot unlin...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: Unspecified
OS: Other
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-11 08:44 UTC by amaresh
Modified: 2016-03-09 15:33 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-11 19:07:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1289327 0 unspecified CLOSED failure when deleting disk image: cannot unlink file 'XXX': Permission denied 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1316173 0 unspecified CLOSED virsh cannot delete volume 2021-02-22 00:41:40 UTC

Internal Links: 1289327 1316173

Description amaresh 2016-02-11 08:44:39 UTC
Description of problem:
On SLES-12 machine, if we try to delete the disk image through virsh vol-delete command immediately for vm which is provisioned through virt-manager, getting "cannot unlink file 'XXX': Permission denied" error. 
This error occurs only for disk which gets created while provisioning the vm.
If we delete the same disk through virt-manager then it gets deleted properly. 

If we create another disk through virt-manager and delete by using above virsh command,it gets deleted properly.

To summarize, problem is only for deleting disk which is created as part of provisioning VM.
 
Version-Release number of selected component (if applicable):

OS:SUSE Linux Enterprise Server 12 SP1  (x86_64)

Libvirt Version:
cv-hj-kvmlib01-am02:/var/lib/libvirt/images # virsh version
Compiled against library: libvirt 1.3.1
Using library: libvirt 1.3.1
Using API: QEMU 1.3.1
Running hypervisor: QEMU 2.3.1


How reproducible:

Steps to Reproduce:
1. Provision the vm through virt-manager on SLES_12
2. Delete the disk image which is created while provisioning the vm using virsh command line:
virsh # vol-delete /var/lib/libvirt/images/<file name>.qcow2
error: Failed to delete vol /var/lib/libvirt/images/<file name>.qcow2
error: cannot unlink file '/var/lib/libvirt/images/<file name>.qcow2': Permission denied

Actual results:
Getting "cannot unlink file 'XXX': Permission denied" error.


Expected results:
Disk image should get deleted without any error.


Additional info:

Comment 1 Cole Robinson 2016-02-11 19:07:49 UTC
If you are running on top of SLES and using their packages, you need to file a bug with them. So closing this

However if you are manually building or running upstream libvirt, please reopen this and move it to the product=Virtualization Tools component=libvirt, which is the upstream libvirt bug tracker (this is the Fedora specific tracker)


Note You need to log in before you can comment on or make changes to this bug.