Bug 795400
Summary: | virt-clone changes the image format to raw | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andre Naehring <naehring> |
Component: | python-virtinst | Assignee: | Cole Robinson <crobinso> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | berrange, crobinso, jforbes, pb, tom, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-15 23:55:05 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
Andre Naehring
2012-02-20 12:25:11 UTC
Hmm well that's no good. Can you provide the output of virt-clone with the --debug flag when reproducing? Here is the complete output with some additional information: # file /var/lib/libvirt/images/SLES11SP1.qcow2 /var/lib/libvirt/images/SLES11SP1.qcow2: QEMU QCOW Image (v2), 53687091200 bytes part of the dumpxml (original machine) -> type is set to qcow2 ----8<---- <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/SLES11SP1.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> ---->8---- # virt-clone --connect=qemu:///system --original SLES11SP1-Vorlage --auto-clone --debug [Di, 21 Feb 2012 07:35:52 virt-clone 4451] DEBUG (cli:220) Launched with command line: /usr/bin/virt-clone --connect=qemu:///system --original SLES11SP1-Vorlage --auto-clone --debug [Di, 21 Feb 2012 07:35:52 virt-clone 4451] DEBUG (cli:326) Requesting libvirt URI qemu:///system [Di, 21 Feb 2012 07:35:52 virt-clone 4451] DEBUG (cli:328) Received libvirt URI qemu:///system [Di, 21 Feb 2012 07:35:53 virt-clone 4451] DEBUG (virt-clone:41) Auto-generated clone name 'SLES11SP1-Vorlage-clone' [Di, 21 Feb 2012 07:35:53 virt-clone 4451] DEBUG (CloneManager:399) Validating original guest parameters [Di, 21 Feb 2012 07:35:53 virt-clone 4451] DEBUG (CloneManager:408) Original XML: <domain type='kvm'> <name>SLES11SP1-Vorlage</name> <uuid>03b1d319-014a-fa11-5471-0f6672f7d9c1</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/SLES11SP1.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:09:b3:cc'/> <source network='default'/> <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'/> <sound model='ich6'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <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='0x05' function='0x0'/> </memballoon> </devices> </domain> [Di, 21 Feb 2012 07:35:54 virt-clone 4451] DEBUG (CloneManager:416) Original paths: ['/var/lib/libvirt/images/SLES11SP1.qcow2'] [Di, 21 Feb 2012 07:35:54 virt-clone 4451] DEBUG (CloneManager:417) Original sizes: [50.0] [Di, 21 Feb 2012 07:35:54 virt-clone 4451] DEBUG (VirtualDisk:240) Path '/var/lib/libvirt/images' is target for pool 'default'. Creating volume 'SLES11SP1-clone-1.qcow2'. [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (VirtualDisk:240) Path '/var/lib/libvirt/images' is target for pool 'default'. Creating volume 'SLES11SP1-clone-1.qcow2'. [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:399) Validating original guest parameters [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:408) Original XML: <domain type='kvm'> <name>SLES11SP1-Vorlage</name> <uuid>03b1d319-014a-fa11-5471-0f6672f7d9c1</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/SLES11SP1.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:09:b3:cc'/> <source network='default'/> <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'/> <sound model='ich6'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <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='0x05' function='0x0'/> </memballoon> </devices> </domain> [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:416) Original paths: ['/var/lib/libvirt/images/SLES11SP1.qcow2'] [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:417) Original sizes: [50.0] [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:516) Original guest xml is <domain type='kvm'> <name>SLES11SP1-Vorlage</name> <uuid>03b1d319-014a-fa11-5471-0f6672f7d9c1</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/SLES11SP1.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:09:b3:cc'/> <source network='default'/> <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'/> <sound model='ich6'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <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='0x05' function='0x0'/> </memballoon> </devices> </domain> [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:434) Validating clone parameters. [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:444) Clone paths: ['/var/lib/libvirt/images/SLES11SP1-clone-1.qcow2'] [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:519) Clone guest xml is <domain type="kvm"> <name>SLES11SP1-Vorlage-clone</name> <uuid>68fdc4e3-9691-c6bb-69ed-5e6a61018cfe</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch="x86_64" machine="pc-0.14">hvm</type> <boot dev="hd"/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset="utc"/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type="file" device="disk"> <driver name="qemu" type="raw"/> <target dev="hda" bus="ide"/> <address type="drive" controller="0" bus="0" unit="0"/> <source file="/var/lib/libvirt/images/SLES11SP1-clone-1.qcow2"/> </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:db:e6"/> <source network="default"/> <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"/> <sound model="ich6"> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/> </sound> <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="0x05" function="0x0"/> </memballoon> </devices> </domain> [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (CloneManager:613) Starting duplicate. [Di, 21 Feb 2012 07:35:55 virt-clone 4451] DEBUG (Storage:1195) Creating storage volume 'SLES11SP1-clone-1.qcow2' with xml: <?xml version="1.0"?> <volume> <name>SLES11SP1-clone-1.qcow2</name> <key>/var/lib/libvirt/images/SLES11SP1.qcow2</key> <source> </source> <capacity>53687091200</capacity> <allocation>3139833856</allocation> <target> <path>/var/lib/libvirt/images/SLES11SP1.qcow2</path> <format type="qcow2"/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_image_t:s0</label> </permissions> </target> </volume> Allocating 'SLES11SP1-clone-1.qcow2' | 50 GB 02:05 [Di, 21 Feb 2012 07:38:01 virt-clone 4451] DEBUG (Storage:1218) Storage volume 'SLES11SP1-clone-1.qcow2' install complete. [Di, 21 Feb 2012 07:38:01 virt-clone 4451] DEBUG (CloneManager:635) Duplicating finished. Clone 'SLES11SP1-Vorlage-clone' created successfully. [Di, 21 Feb 2012 07:38:01 virt-clone 4451] DEBUG (virt-clone:249) end clone # virsh start SLES11SP1-Vorlage-clone Domain SLES11SP1-Vorlage-clone gestartet ----> the domain starts but the vm is not able to boot the disk # virsh dumpxml SLES11SP1-Vorlage-clone <domain type='kvm' id='9'> <name>SLES11SP1-Vorlage-clone</name> <uuid>68fdc4e3-9691-c6bb-69ed-5e6a61018cfe</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/SLES11SP1-clone-1.qcow2'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='network'> <mac address='52:54:00:15:db:e6'/> <source network='default'/> <target dev='vnet0'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes'/> <sound model='ich6'> <alias name='sound0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </sound> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_t:s0:c425,c1010</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c425,c1010</imagelabel> </seclabel> </domain> ---- > changing the relevant part to the vm can access the disk <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/SLES11SP1-clone-1.qcow2'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> (In reply to comment #2) > Here is the complete output with some additional information: > > ---- > changing the relevant part to the vm can access the disk > > <disk type='file' device='disk'> > <driver name='qemu' type='raw'/> > <source file='/var/lib/libvirt/images/SLES11SP1-clone-1.qcow2'/> > <target dev='hda' bus='ide'/> > <alias name='ide0-0-0'/> > <address type='drive' controller='0' bus='0' unit='0'/> > </disk> I was to fast here. When setting the "type=" to "qcow2" the vm is able to boot. So while cloning, the original image type is used to create the destination but the XML definition is writing "raw" instead of the correct image type. Great, thanks for the info. Fixed upstream now: http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=f0195e95d57deda83daed5231582ca86bde519ae And an additional fix: http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=c9ae2ac4668213c03614842d92327737a25cf9ec *** Bug 815210 has been marked as a duplicate of this bug. *** python-virtinst-0.600.1-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/python-virtinst-0.600.1-2.fc16 python-virtinst-0.600.1-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/python-virtinst-0.600.1-2.fc17 Package python-virtinst-0.600.1-2.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-virtinst-0.600.1-2.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-8995/python-virtinst-0.600.1-2.fc17 then log in and leave karma (feedback). Looks good. Cloning now creates a copy of my qcow2 image and the resulting definition for the vm works. python-virtinst-0.600.1-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. python-virtinst-0.600.1-2.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |