[Pkg-libvirt-commits] [libguestfs] 02/40: v2v: Generate qemu-0.10 compatible qcow2 files for RHEV-M.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:49:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.57-1
in repository libguestfs.

commit b03c2a971ae66e6bfb66090b2860cfee89241f93
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Sep 26 19:26:14 2014 +0100

    v2v: Generate qemu-0.10 compatible qcow2 files for RHEV-M.
    
    RHEV nodes running on RHEL 6 cannot read the new qcow2 compat=1.1
    (a.k.a qcow2 v3) format.
    
    Thanks: Junqin Zhou, Tingting Zheng
---
 v2v/output_rhev.ml |  4 ++++
 v2v/output_vdsm.ml | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/v2v/output_rhev.ml b/v2v/output_rhev.ml
index 47e7987..7967891 100644
--- a/v2v/output_rhev.ml
+++ b/v2v/output_rhev.ml
@@ -255,6 +255,10 @@ object
     Kvmuid.func kvmuid_t (
       fun () ->
         let g = new Guestfs.guestfs () in
+        (* For qcow2, override v2v-supplied compat option, because RHEL 6
+         * nodes cannot handle qcow2 v3 (RHBZ#1145582).
+         *)
+        let compat = if format <> "qcow2" then compat else Some "0.10" in
         g#disk_create ?backingfile ?backingformat ?preallocation ?compat
           ?clustersize path format size;
         (* Make it sufficiently writable so that possibly root, or
diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml
index 375fdc4..4023560 100644
--- a/v2v/output_vdsm.ml
+++ b/v2v/output_vdsm.ml
@@ -144,6 +144,16 @@ object
     (* Return the list of targets. *)
     targets
 
+  method disk_create ?backingfile ?backingformat ?preallocation ?compat
+    ?clustersize path format size =
+    let g = new Guestfs.guestfs () in
+    (* For qcow2, override v2v-supplied compat option, because RHEL 6
+     * nodes cannot handle qcow2 v3 (RHBZ#1145582).
+     *)
+    let compat = if format <> "qcow2" then compat else Some "0.10" in
+    g#disk_create ?backingfile ?backingformat ?preallocation ?compat
+      ?clustersize path format size
+
   (* This is called after conversion to write the OVF metadata. *)
   method create_metadata source targets guestcaps inspect =
     (* Create the metadata. *)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list