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 1251400

Summary: Storage path "/tmp/test-vm" isn't checked automatically when deleting guest.
Product: Red Hat Enterprise Linux 7 Reporter: XiaoQing <qxiao>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: crobinso, juzhou, mzhan, tzheng, xiaodwan
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 22:50:00 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:

Description XiaoQing 2015-08-07 08:44:01 UTC
Description of problem:

Storage path "/tmp/test-vm" isn't checked automatically when deleting guest


Version-Release number of selected component (if applicable):

libvirt-1.2.17-3.el7.x86_64
virt-install-1.2.1-2.el7.noarch
virt-manager-1.2.1-4.el7.noarch


How reproducible:

100%


Steps to Reproduce:
1. Open the terminal and login with normal user not root.
   
2. Launch the virt-manager

$ virt-manager --debug

Type the password of root for authentication.
        
3. Install the guest by virt-install:

$ virt-install --connect qemu:///system -n test-vm -r 1024 --disk path=/tmp/test-vm,size=8 -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-7/compose/Server/x86_64/os/

Starting install...
Retrieving file .treeinfo... | 918 B 00:00
...
Retrieving file vmlinuz... | 4.0 MB 00:00
...
Retrieving file initrd.img... | 22 MB 00:00
...
Allocating 'virtinst-vmlinuz.N2HggX' | 2.0 MB 00:00
Transferring virtinst-vmlinuz.N2HggX | 2.0 MB 00:00
Allocating 'virtinst-initrd.img.y5EgOO' | 11 MB 00:00
Transferring virtinst-initrd.img.y5EgOO | 11 MB 00:03
Creating storage file test-vm | 8.0 GB 00:00
Creating domain... | 0 B 00:00

4. Force off the guest by virt-manager.
        
5.On virt-manager, Right click the guest test-vm -> Delete-> check whether "Delete associated storage files"  and  Storage path "/tmp/test-vm" are checked automatically, then click "Cancel" button.

6. Quit the virt-manger and launch virt-manager again.

7. After authentication, Right click the guest test-vm -> Delete-> check whether "Delete associated storage files" and Storage path "/tmp/test-vm" are checked automatically.


Actual results:

After step5, Storage path "/tmp/test-vm" isn't checked
automatically when deleting the guest.

After step 7, Storage path "/tmp/test-vm" is checked automatically when
deleting the guest, and file can be deleted when click "Delete" button.

Expected results:

After step 5, Storage path "/tmp/test-vm" is checked automatically when deleting the guest.

Additional info:

I think virt-manager will scan all pools and do some special operations to get access privilege of images when it starts. But virt-manager  will not do the same thing after it has already launched for newly guest file which is installed by virt-install.

Comment 3 Pavel Hrdina 2015-11-09 12:50:20 UTC
Tested with virt-manager-1.2.1-4 and I was not able to reproduce this bug.

Comment 4 Xiaodai Wang 2015-11-10 03:23:20 UTC
Hi Pavel,

I can reproduce it with virt-manager-1.2.1-8.el7.noarch.

Please follow below steps to reproduce it:
1. Login with normal user.
2. Launch virt-manager.
3. Run virt-install and install a guest into qemu:///system.
$ virt-install --connect qemu:///system --name test --memory 1024 --disk /tmp/test.img,size=1 -l http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-6/6.7/Server/x86_64/os
4. Force off the guest and right click the mouse to delete it.

Result:
The Image file is not checked automatically.

Feel free to let me known if you have any problems about it. Thanks!

Best Regards
Xiaodwan

Comment 5 Cole Robinson 2015-11-10 22:50:00 UTC
I put some thoughts here:

https://www.redhat.com/archives/virt-tools-list/2015-November/msg00082.html

virt-manager doesn't notice these out-of-band storage changes, because there's no scalable way for us to detect them. We need libvirt event APIs for storage pools and volumes.

Since this reported issue is fairly minor in the scheme of things, I'm just duping this bug to the upstream virt-manager report tracking support for storage events

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