Bug 612842 - [virt-convert] convert xml doesn't support qcow,qcow2,cow format
[virt-convert] convert xml doesn't support qcow,qcow2,cow format
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.0
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-09 04:25 EDT by wangyimiao
Modified: 2011-05-19 09:45 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
virt-convert now includes support for qcow, qcow2, and cow formats.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 09:45:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wangyimiao 2010-07-09 04:25:51 EDT
Description of problem:

convert xml doesn't support qcow,qcow2,cow format

Version-Release number of selected component (if applicable):
-libvirt-0.8.1-13.el6.x86_64
-qemu-kvm-0.12.1.2-2.90.el6.x86_64
-qemu-img-0.12.1.2-2.90.el6.x86_64
-kernel-2.6.32-42.el6.x86_64
-libvirt-python-0.8.1-13.el6.x86_64

How reproducible:
5/5

Steps to Reproduce:
1.
# cat virt_image.xml 
           <image>
             <name>demo</name>
             <domain>
               <boot type="hvm">
                 <guest>
                   <arch>x86_64</arch>
                 </guest>
                 <os>
                   <loader dev="hd"/>
                 </os>
                 <drive disk="mydisk" target="hda"/>
               </boot>
               <devices>
                 <vcpu>1</vcpu>
                 <memory>262144</memory>
                 <interface/>
		 <graphics/>
               </devices>
             </domain>
             <storage>
               <disk id="mydisk" file="RHEL-Server-6-64-virtio.qcow2" use="system" format="qcow2"/>
             </storage>
           </image>

2.
# qemu-img info RHEL-Server-6-64-virtio.qcow2 
image: RHEL-Server-6-64-virtio.qcow2
file format: qcow2
virtual size: 10G (10737418240 bytes)
disk size: 971M
cluster_size: 4096

3.
# virt-convert -i virt-image -o vmx virt_image.xml 
ERROR    Couldn't import file "virt_image.xml": Unable to determine disk format
  
Actual results:
  I tried the 'qcow2' and 'qcow' format and get the same result:
ERROR    Couldn't import file "virt_image.xml": Unable to determine disk format
  

Expected results:
 virt-convert command support virt-image format convert to other format.

Additional info:

 I try to change the format in the xml file use that:
"<disk id="mydisk" file="RHEL-Server-6-64-virtio.qcow2" use="system" format="raw"/>" and  <disk id="mydisk" file="test.qcow" use="system" format="raw"/>.

Setps
1. 
# virt-convert -i virt-image -o vmx virt_image.xml 
Generating output in 'vmx' format to demo/
Converting disk 'RHEL-Server-6-64-virtio.qcow2' to type vmdk...
Done.

# virt-convert -i virt-image -o vmx virt_image.xml 
Generating output in 'vmx' format to demo/
Converting disk 'test.qcow' to type vmdk...
Done.

For the above steps, virt-convert can support qcow2/raw/qcow convert to vmdk. xml format = ?,maybe need to add some options support qcow2/qcow format.
Comment 2 RHEL Product and Program Management 2010-07-15 10:54:30 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for 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. **
Comment 3 Cole Robinson 2010-08-06 14:27:37 EDT
virt-image / virt-convert aren't really high priority items, so just deferring to 6.1 since we are this late in the cycle.
Comment 4 Cole Robinson 2010-12-07 20:24:16 EST
Thanks for the report, fixed upstream now:

http://hg.fedorahosted.org/hg/python-virtinst/rev/27a536f58932

Though COW format is not included since this isn't currently supported by virt-image, and is barely used in the wild anyways.
Comment 5 Cole Robinson 2011-01-14 17:09:33 EST
Fix built in python-virtinst-0.500.5-1.el6
Comment 9 Nan Zhang 2011-02-18 07:18:32 EST
Verified with python-virtinst-0.500.5-1.el6.noarch

# qemu-img info test.qcow2 
image: test.qcow2
file format: raw
virtual size: 6.0G (6442450944 bytes)
disk size: 1.6G

# virt-convert -i virt-image -o vmx image.xml

# ll test/
total 1488196
-rw-r--r--. 1 root root 1531052032 Feb 18 07:12 test.vmdk
-rw-r--r--. 1 root root       1243 Feb 18 07:12 test.vmx

# qemu-img info test/test.vmdk 
image: test/test.vmdk
file format: vmdk
virtual size: 6.0G (6442450944 bytes)
disk size: 1.4G
Comment 10 zhe peng 2011-04-15 06:17:46 EDT
verified this bug with:
Linux localhost.localdomain 2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31 EDT
2011 x86_64 x86_64 x86_64 GNU/Linux

python-virtinst-0.500.5-3.el6.noarch
libvirt-0.8.7-17.el6.x86_64

passed.
Comment 12 Michael Hideo 2011-05-16 00:22:14 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
* virt-convert now includes support for qcow, qcow2, and cow formats. (BZ#612842)
Comment 13 Michael Hideo 2011-05-16 17:44:16 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-* virt-convert now includes support for qcow, qcow2, and cow formats. (BZ#612842)+virt-convert now includes support for qcow, qcow2, and cow formats.
Comment 14 errata-xmlrpc 2011-05-19 09:45:38 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0636.html

Note You need to log in before you can comment on or make changes to this bug.