Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1260356

Summary: Error dialoge pop out when deleting running guest with disk on local storage
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: crobinso, dyuan, juzhou, mxie, mzhan, rbalakri, xiaodwan, yisun
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-09 17:33:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
virt-manager debug info none

Description tingting zheng 2015-09-06 07:59:11 UTC
Created attachment 1070662 [details]
virt-manager debug info

Description of problem:
Error dialoge pop out when deleting running guest with disk type volume

Version-Release number of selected component (if applicable):
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-7.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Prepare a guest with disk type volume.
# virsh dumpxml test
    <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source pool='default' volume='test.img'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2.Boot the guest with disk type volume either via virsh or virt-manager GUI.
# virsh start test

3.From virt-manager GUI,right click the running guest->"Delete",make sure "Delete associated storage files" ticked,click "Delete",an error dialog pop out as below.
Errors encountered while removing certain storage devices.

cannot unlink file '/var/lib/libvirt/images/qcow2-test.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/lib64/python2.7/site-packages/libvirt.py", line 3348, in delete
    if ret == -1: raise libvirtError ('virStorageVolDelete() failed', vol=self)
libvirtError: cannot unlink file '/var/lib/libvirt/images/qcow2-test.qcow2': Success

4.The guest has been deleted,check the disk of the guest,it's still there and not be deleted.  
ll /var/lib/libvirt/images/qcow2-test.qcow2
-rw-r--r--. 1 qemu qemu 197120 Sep  6 14:38 /var/lib/libvirt/images/qcow2-test.qcow2

Actual results:
As description.

Expected results:
No error dialoge pop out when deleting running guests with disk type volume,and the disk will also be deleted.

Additional info:
Attached the debug info from virt-manager.

Comment 2 tingting zheng 2015-09-06 11:20:18 UTC
I can not reproduce this bug with:
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-6.el7.x86_64

But can reproduce this bug with:
virt-manager-1.2.1-6.el7.noarch
libvirt-1.2.17-7.el7.x86_64

It seems there are some changes for latest libvirt version,I doubt whether it is a libvirt bug.

Comment 3 Pavel Hrdina 2015-11-04 16:26:57 UTC
Moving to libvirt, It's not virt-manager bug.

Comment 4 Pavel Hrdina 2016-03-01 13:36:52 UTC
*** Bug 1312181 has been marked as a duplicate of this bug. ***

Comment 5 Cole Robinson 2016-03-09 17:33:35 UTC
Duping this to 1293804 which has more discussion

*** This bug has been marked as a duplicate of bug 1293804 ***