Bug 749137

Summary: [virt-manager]"clone" button should be disabled when a guest's image file is not existed or renamed.
Product: [Community] Virtualization Tools Reporter: Huming Jiang <hjiang>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: berrange, crobinso, hjiang, mzhan, rwu, xen-maint, zpeng
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-08 00:13:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Huming Jiang 2011-10-26 09:58:29 UTC
Description of problem:
When the guest' image file is not existed, i think clone should not succeed."clone" button should be disabled; and when i renamed a guest' image file when the guest is running, then clone it, there are also problems.

Version-Release number of selected component (if applicable):
kernel-2.6.32-207.el6.x86_64
libvirt-0.9.4-19.el6.x86_64
virt-manager-0.9.0-7.el6.x86_64
python-virtinst-0.600.0-5.el6.noarch
qemu-kvm-0.12.1.2-2.196.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Assume there is a shutdown guest. Rename its image file or remove it from disk.
2. #virt-manager -> (select the guest, and right click)clone ; Clone will be successful. (Not expected. I think it should not be successful according to step3.)
3. use command:
   ## virt-clone -o a -n b -f /var/lib/libvirt/images/b.img
   ERROR    Could not determine original disk information: Disk '/var/lib/libvirt/images/a.img' does not exist.

4. Assume there is a running guest. Rename its image file or remove it from disk.
5. use virt-manager to clone it, and virt-manager will not allow you to clone it.(Expected)
6. Pause the running guest, and virt-manager will allow you to clone it. (Not Expected. Because image file not existed.)
7. Resume the paused guest, and virt-manager will allow you to clone it. (Not Expected. Because image file not existed.)
8. Rename the image file to its original name. Use virt-manager to clone it, and virt-manager will allow you to clone it.(Not refresh, the image file is already existed.)
9. And use command: The result will always be the following if its image file is renamed or removed from disk.
   ## virt-clone -o a -n b -f /var/lib/libvirt/images/b.img
   ERROR    Could not determine original disk information: Disk '/var/lib/libvirt/images/a.img' does not exist.

  

Actual results:
See above.

Expected results:
See above.

Additional info:

Comment 2 Cole Robinson 2011-12-09 21:46:01 UTC
Not urgent, and given reduced capacity for virt-manager/virtinst, just moving this to the upstream tracker.

Comment 3 Cole Robinson 2012-02-08 00:13:12 UTC
I see what you mean, but in a lot of cases, permissions can be pretty whacky and if virt-manager gets something wrong we don't want to block users from cloning. Users just need to read the dialog output and determine if something is messed up or not. Blocking cloning might just cause false positives.

Closing as WONTFIX