Bug 480253

Summary: virt-clone fails for clone between storage types
Product: [Fedora] Fedora Reporter: Chris Snape-Jenkinson <csnapejenkinson>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: berrange, crobinso, john, rdoty, thinkingfacts, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 0.400.3-1.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-15 07:52:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Snape-Jenkinson 2009-01-15 23:52:16 UTC
Description of problem:
virt-clone tool fails when cloning (QEMU) images between storage types (eg partition -> file).

Steps to Reproduce:
1. Create virtual machine with image stored on partition
2. Attempt to use virt-clone tool with new image stored in disk file (eg "sudo virt-clone -o orig_image -n new_image -f /var/lib/libvirt/images/new_image.img")

Actual results:
Fails with python exception reporting index out of bounds

Expected results:
Clone should succeed

Additional info:
I have tracked the exception to the "_change_disk_type" method in "/usr/lib/python2.5/site-packages/virtinst/CloneManager.py".  Removal of code involving the variable "driv_name" fixes the problem - the xml configuration file for the original virtual machine does not contain a "/domain/devices/disk[%d]/driver/@name" entry that this method attempts to read and manipulate.

Comment 1 Cole Robinson 2009-01-16 12:38:16 UTC
Thanks for the report.

Consequently I have been going through the virt-clone code for use in virt-manager, and hit this same issue. I have a fix in my local tree which I will commit today.

Comment 2 Cole Robinson 2009-01-20 14:25:54 UTC
*** Bug 480715 has been marked as a duplicate of this bug. ***

Comment 3 Cole Robinson 2009-01-20 22:07:33 UTC
Fixed upstream now:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virtinst--devel/rev/5a3373625918

We will be cutting a new release at the end of the week, which will contain this fix. Until then, moving to POST.

Comment 4 David Cartwright 2009-02-18 05:09:47 UTC
[Fedora 10 64-bit] I have the latest released updates for Fedora 10, that has python-virtinst 0.400.0-5.fc10

However this still has a problem with virt-clone .. .specifically I am getting exactly the same message as noted in Bug # 480715 (marked as a duplicate of this bug).

Attempting to run virt-clone of a Fedora 10 image to create a new Fedora 10 image generates the error:

"ERROR    list index out of range"

Is the problem due to the fact that the latest version of python-virtinst hasn't yet hit the Fedora 10 released repos, or is there still a problem as per bug # 480715?

Comment 5 Cole Robinson 2009-02-20 20:37:20 UTC
Yes, the latest (fixed) version is not yet in F10. I will be pushing it to updates-testing soon.

Comment 6 Fedora Update System 2009-03-04 16:51:35 UTC
python-virtinst-0.400.2-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/python-virtinst-0.400.2-1.fc10

Comment 7 Fedora Update System 2009-03-05 16:33:05 UTC
python-virtinst-0.400.2-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-virtinst'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-2403

Comment 8 Fedora Update System 2009-03-10 05:25:01 UTC
python-virtinst-0.400.3-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/python-virtinst-0.400.3-1.fc10

Comment 9 Fedora Update System 2009-03-11 18:01:24 UTC
python-virtinst-0.400.3-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-virtinst'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-2612

Comment 10 John Florian 2009-04-01 14:51:56 UTC
I too encountered the "list index out of range" error when attempting to clone and python-virtinst-0.400.3-1.fc10 did make that error go away for me.

Comment 11 Fedora Update System 2009-09-15 07:51:44 UTC
python-virtinst-0.400.3-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.