Change in vdsm[master]: qemuimg: Create qcow2 compat 0.10 images when converting exi...

nsoffer at redhat.com nsoffer at redhat.com
Wed Sep 24 12:21:01 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: qemuimg: Create qcow2 compat 0.10 images when converting existing images
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/33304/1/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:

Line 187:     cmd.append(srcImage)
Line 188: 
Line 189:     if dstFormat:
Line 190:         cmd.extend(("-O", dstFormat))
Line 191:         if dstFormat == FORMAT.QCOW2 and _supports_qcow2_compat():
> just a second - could you verify that compat=0.10 is not obligatory when ds
I checked and found that if you do not specify an output_format (-O), you will get a raw image. output format is not implied by the source image.

We start with a qcow2 image:

    $ qemu-img create -f qcow2 -o compat=0.10 test.qcow2 10G
    Formatting 'test.qcow2', fmt=qcow2 size=10737418240 compat='0.10' encryption=off cluster_size=65536 lazy_refcounts=off

Convert without output format:

    $ qemu-img convert -t none test.qcow2 no-format.img; qemu-img info no-format.img | grep 'file format'
    file format: raw

Convert with output_format qcow2 *requires* -o compat=0.10, otherwise it will create comapt=1.1 image.
Line 192:             cmd.extend(('-o', 'compat=' + QCOW2_COMPAT))
Line 193: 
Line 194:     cmd.append(dstImage)
Line 195: 


-- 
To view, visit http://gerrit.ovirt.org/33304
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae86a007c3822e0523caff66473581182810c74c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list