Red Hat Bugzilla – Bug 1251400
Storage path "/tmp/test-vm" isn't checked automatically when deleting guest.
Last modified: 2015-11-11 09:48:02 EST
Description of problem:
Storage path "/tmp/test-vm" isn't checked automatically when deleting guest
Version-Release number of selected component (if applicable):
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/
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.
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.
After step 5, Storage path "/tmp/test-vm" is checked automatically when deleting the guest.
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.
Tested with virt-manager-1.2.1-4 and I was not able to reproduce this bug.
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.
The Image file is not checked automatically.
Feel free to let me known if you have any problems about it. Thanks!
I put some thoughts here:
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 ***