Bug 835812 - prompt clone keep failing if input an existing directory for disk path one time
prompt clone keep failing if input an existing directory for disk path one time
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: virt-mgr-maint
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-27 03:44 EDT by tingting zheng
Modified: 2013-04-15 22:35 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-24 15:33:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description tingting zheng 2012-06-27 03:44:28 EDT
Description of problem:
When run virt-clone --prompt,input an existing directory when it prompts to input the file path for cloned disk,it will fail even you input the path afterwards.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.295.el6.x86_64  
libvirt-0.9.10-21.el6.x86_64
kernel-2.6.32-279.el6.x86_64
python-virtinst-0.600.0-8.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.Make sure there is a guest which is shutoff.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 53    win                            running
 -     demo                           shut off

2.Run virt-clone --prompt:
# virt-clone --prompt
What is the name of the original virtual machine? 
demo
What is the name for the cloned virtual machine? 
new
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/rhel6-clone.img'? 
/root
ERROR    The path '/root' must be a file or a device, not a directory
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/rhel6-clone.img'? (Here,input the path)
/var/lib/libvirt/images/new.img
ERROR    Size must be specified for non existent volume path '/var/lib/libvirt/images/new.img'
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/rhel6-clone.img'? 

3.If I run virt-clone --prompt and the first time input the right path,it will be cloned successfully.
# virt-clone --prompt
What is the name of the original virtual machine? 
demo
What is the name for the cloned virtual machine? 
new
What would you like to use as the cloned disk (file path) for '/var/lib/libvirt/images/rhel6-clone.img'? 
/var/lib/libvirt/images/new.img
Allocating 'new.img'                                     | 8.0 GB     01:19     

Clone 'new' created successfully.


Actual results:
As Steps

Expected results:
After input the path for the cloned disk,it can be cloned successfully.


Additional info:
Error messages from log file:
[Wed, 27 Jun 2012 14:41:14 virt-clone 17006] ERROR (cli:733) The path '/root' must be a file or a device, not a directory
[Wed, 27 Jun 2012 14:41:22 virt-clone 17006] ERROR (cli:733) Size must be specified for non existent volume path '/var/lib/libvirt/images/new.img'
Comment 2 Cole Robinson 2012-07-08 18:23:34 EDT
Thanks for the report, fixed upstream:

http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=b578af585a92fb7680c0fec7fb3092f7c70ac989

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