virt-clone crashes whilst cloning a KVM vm

Bug #1033501 reported by robinharvey
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
virtinst (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm unable to clone VMs using the standard virt-clone tool due to a crash in a python script. Here is the output that is generated in ~/.virtinst/virt-clone.log:

[Mon, 06 Aug 2012 11:45:01 virt-clone 14340] DEBUG (cli:220) Launched with command line:
/usr/bin/virt-clone --original-xml=/etc/libvirt/qemu/vm1.local.xml --name=vm2 --uuid=3f0f47af-6b61-4ed7-a295-736201c452f1 --mac=52:54:00:13:77:e0 --file=/home/robin/kvm/vm2/vm.qcow2
[Mon, 06 Aug 2012 11:45:01 virt-clone 14340] DEBUG (cli:326) Requesting libvirt URI default
[Mon, 06 Aug 2012 11:45:01 virt-clone 14340] DEBUG (cli:328) Received libvirt URI qemu:///system
[Mon, 06 Aug 2012 11:45:02 virt-clone 14340] DEBUG (CloneManager:399) Validating original guest parameters
[Mon, 06 Aug 2012 11:45:02 virt-clone 14340] DEBUG (CloneManager:408) Original XML:
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit vm1.local
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>vm1.local</name>
  <uuid>8fe324f0-b5cb-f6ad-a395-ca0104b9e96f</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-1.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/robin/kvm/vm1/vm.qcow2'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:15:c9:05'/>
      <source network='default'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
</domain>

[Mon, 06 Aug 2012 11:45:03 virt-clone 14340] ERROR (cli:439) 'NoneType' object is not iterable
[Mon, 06 Aug 2012 11:45:03 virt-clone 14340] DEBUG (cli:440)
Traceback (most recent call last):
  File "/usr/bin/virt-clone", line 253, in <module>
    main()
  File "/usr/bin/virt-clone", line 232, in main
    design.setup_original()
  File "/usr/lib/python2.7/dist-packages/virtinst/CloneManager.py", line 411, in setup_original
    parsexml=self.original_xml)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 233, in __init__
    caps=caps)
  File "/usr/lib/python2.7/dist-packages/virtinst/XMLBuilderDomain.py", line 398, in __init__
    self._parsexml(parsexml, parsexmlnode)
  File "/usr/lib/python2.7/dist-packages/virtinst/Guest.py", line 790, in _parsexml
    for node in self._xml_node.children:
TypeError: 'NoneType' object is not iterable

The command I'm using is:
/usr/bin/virt-clone --original-xml=/etc/libvirt/qemu/vm1.local.xml \
--name=vm2 \
--uuid=8a14d372-0d50-469f-87fc-c1efdb225638 \
--mac=52:54:00:21:a9:d4 \
--file=/home/robin/kvm/vm2/vm.qcow2

I have previously applied the following patch from bug #1008225, this applied without error and fixed the issue with ubuntu-vm-builder

https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/1008225/+attachment/3208174/+files/lucid-vm.patch

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1033501/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → virtinst (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtinst (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.