Bug 620456
Summary: | virt-install misidentify qcow2 images as raw | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Juan Quintela <quintela> | ||||
Component: | python-virtinst | Assignee: | Cole Robinson <crobinso> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 6.0 | CC: | amit.shah, crobinso, eblake, hbrock, jialiu, mjenner, syeghiay, tburke, xen-maint | ||||
Target Milestone: | rc | Keywords: | RHELNAK | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | python-virtinst-0.500.3-7.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-11-10 21:23:58 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: | |||||||
Attachments: |
|
Description
Juan Quintela
2010-08-02 15:07:01 UTC
This issue has been proposed when we are only considering blocker issues in the current Red Hat Enterprise Linux release. ** If you would still like this issue considered for the current release, ask your support representative to file as a blocker on your behalf. Otherwise ask that it be considered for the next Red Hat Enterprise Linux release. ** Created attachment 436064 [details]
Set qemu format= value from passed virt-install format=
This is the unfortunate fallout of the recent libvirt CVE fixes. We
currently depend on libvirt's image file format detection for setting
the qemu format= option, however that just offloaded the original qemu
format CVE to libvirt. Now libvirt defaults to reporting all image files
as 'raw' format.
virt-install needs to be fixed to use the user passed format= option
when setting the qemu format= value. This is easy if the user is asking
virt-install to create a new disk image, since the format needs to be
required, but pointing to an existing qcow2 image now requires explictly
specifying the --disk format= value.
This is potential blocker material, depending on how important qcow2 is. Risk is low, but it is in an area of the code that is slightly complex, QE would want to make sure raw disk creation still works fine. Instructions for QE: virt-install --disk path=...,format=qcow2 --debug should show <driver name='qemu' type='qcow2'/> in the generated XML. If a format isn't specified, type should be ='raw'. Verify that creating a guest from an existing qcow2 image boots up fine. Workaround for this unfortunately requires manually editing the XML after creating the guest. And this fix doesn't address adding qcow2 images via virt-manager: that is still broken and would require manually editing the XML. Fixed in python-virtinst-0.500.3-7.el6 *** Bug 615239 has been marked as a duplicate of this bug. *** Verify this bug with python-virtinst-0.500.3-7.el6.noarch, and PASSED. 1. Create new qcow2 image $ qemu-img create /var/lib/libvirt/images/rhel6.0X-64.img 6G -f qcow2 Formatting '/var/lib/libvirt/images/rhel6.0X-64.img', fmt=qcow2 size=6442450944 encryption=off cluster_size=0 2. Copy this image file to /mnt/images 3. Run virt-install # virt-install --pxe --disk path=/mnt/images/r60X-64.img,format=qcow2 --name r60X-64 --ram=1024 --network bridge=br0 --os-variant=rhel6 4. Dump domain xml to check disk driver type: <---SNIP----> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/mnt/images/rhel6.0X-64.img'/> <---SNIP----> And installation is finished successfully. If not specify format at step 3, the disk type will be "raw", this will cause installation failed. This is expected behaviour. # virt-install --pxe --disk path=/mnt/images/rhel6.0X-64.img --name r60X-64 --ram=1024 --network bridge=br0 --os-variant=rhel6 Dump domain xml to check disk driver type: <---SNIP----> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/mnt/images/rhel6.0X-64.img'/> <---SNIP----> So this bug is fixed. Red Hat Enterprise Linux 6.0 is now available and should resolve the problem described in this bug report. This report is therefore being closed with a resolution of CURRENTRELEASE. You may reopen this bug report if the solution does not work for you. |