Bug 1419395
Summary: | Failed to force clone a guest with ISO file | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xiaodai Wang <xiaodwan> | ||||
Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> | ||||
Status: | CLOSED ERRATA | QA Contact: | yisun | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.4 | CC: | crobinso, dyuan, juzhou, kuwei, lmen, mxie, mzhan, phrdina, rbalakri, tzheng, xuzhang | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-3.2.0-1.el7 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-04-10 10:39:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Xiaodai Wang
2017-02-06 03:15:53 UTC
Created attachment 1247933 [details]
virt-clone debug
There's a similar against upstream libvirt: https://bugzilla.redhat.com/show_bug.cgi?id=972784 virsh vol-clone [isovol] fails as well. I think the best thing to do is teach libvirt that format=iso should just be format=raw when we pass the format to qemu-img I sent a libvirt patch upstream: http://www.redhat.com/archives/libvir-list/2017-March/msg00251.html Upstream commit: commit 0e5db76262729e4c199e62c6cb00c90391073b4e Author: Cole Robinson <crobinso> Date: Mon Mar 6 16:50:53 2017 -0500 storage: Don't pass 'iso' format to qemu-img test with: libvirt-3.8.0-1.virtcov.el7.x86_64 qemu-kvm-rhev-2.10.0-3.el7.x86_64 1. prepare a iso image ## mkisofs -o /var/lib/libvirt/images/aaa.iso /tmp ## ll -h /var/lib/libvirt/images/aaa.iso -rw-r--r--. 1 qemu qemu 8.5M Oct 31 14:10 /var/lib/libvirt/images/aaa.iso ## file /var/lib/libvirt/images/aaa.iso /var/lib/libvirt/images/aaa.iso: # ISO 9660 CD-ROM filesystem data 'CDROM' 2. prepare a vm with following disks: ## virsh dumpxml v | grep disk -a5 ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/RHEL-7.5-x86_64-latest.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/aaa.iso'/> <backingStore/> <target dev='hda' bus='ide'/> <readonly/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> ... 3. do the virt-clone with vm shutoff: ## virt-clone -o v -n testclone -f /var/lib/libvirt/images/clone.qcow2 -f /var/lib/libvirt/images/clone.iso --debug --force-copy=hda ... [Tue, 31 Oct 2017 14:17:15 virt-clone 25422] DEBUG (storage:816) Creating storage volume 'clone.iso' with xml: <volume> <name>clone.iso</name> <capacity>8812544</capacity> <allocation>8814592</allocation> <target> <format type="iso"/> </target> </volume> [Tue, 31 Oct 2017 14:17:15 virt-clone 25422] DEBUG (storage:880) Couldn't lookup storage volume in prog thread. Allocating 'clone.iso' | 8.4 MB 00:00:00 [Tue, 31 Oct 2017 14:17:15 virt-clone 25422] DEBUG (storage:854) Storage volume 'clone.iso' install complete. [Tue, 31 Oct 2017 14:17:15 virt-clone 25422] DEBUG (cloner:491) Duplicating finished. Clone 'testclone' created successfully. [Tue, 31 Oct 2017 14:17:15 virt-clone 25422] DEBUG (virt-clone:216) end clone ... 4. check the clone.iso same with original aaa.iso ## file /var/lib/libvirt/images/clone.iso /var/lib/libvirt/images/clone.iso: # ISO 9660 CD-ROM filesystem data 'CDROM'\ ## diff /var/lib/libvirt/images/aaa.iso /var/lib/libvirt/images/clone.iso; echo $? 0 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0704 |