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

nsoffer at redhat.com nsoffer at redhat.com
Tue Sep 23 23:56:15 UTC 2014


Nir Soffer has uploaded a new change for review.

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

qemuimg: Create qcow2 compat 0.10 images when converting existing images

Commit 1f7c3ac2c handled only creation of new images. This patch adds the
required -o compat=0.10 option when converting existing images.

qemu-img supports -o compat option with "create", "convert" and "amend"
commands. We assume that all of these commands supports this option if
the "create" command supports it.

Change-Id: Iae86a007c3822e0523caff66473581182810c74c
Bug-Url: https://bugzilla.redhat.com/1139707
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/qemuimg.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/33304/1

diff --git a/lib/vdsm/qemuimg.py b/lib/vdsm/qemuimg.py
index c36bc26..63ce007 100644
--- a/lib/vdsm/qemuimg.py
+++ b/lib/vdsm/qemuimg.py
@@ -188,6 +188,8 @@
 
     if dstFormat:
         cmd.extend(("-O", dstFormat))
+        if dstFormat == FORMAT.QCOW2 and _supports_qcow2_compat():
+            cmd.extend(('-o', 'compat=' + QCOW2_COMPAT))
 
     cmd.append(dstImage)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae86a007c3822e0523caff66473581182810c74c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list