[Pkg-libvirt-commits] [libguestfs] 07/12: v2v: OVF: Fix list of operating system variants for RHEV >= 3.3 (RHBZ#1219857).

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:11:44 UTC 2015


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

bengen pushed a commit to annotated tag upstream/1.29.41
in repository libguestfs.

commit 6f9d5dce47f8502bee5d7285faf7695b22b5300b
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sun May 10 16:12:33 2015 +0100

    v2v: OVF: Fix list of operating system variants for RHEV >= 3.3 (RHBZ#1219857).
    
    Since RHEV 3.3, OS variant names like "RHEL6x64" were deprecated and
    replaced by names like "rhel_6x64".  "RHEL7x64" was never valid, and
    we should have used "rhel_7x64".  "Windows2012R2x64" was also never
    valid and should have been "windows_2012R2x64".
    
    For backwards compatibility, RHEV still understands the old names, and
    we still pass them for compatiblity with old RHEV.
    
    However for the new OS variants supported by virt-v2v in RHEL 7.2, use
    the new names.
    
    This commit also adds support for SLES and ppc64.
    
    This updates commit 3c51302d691cc204e4d43f4ab9837095d424bf3b
    and also RHBZ#1213324.
---
 v2v/OVF.ml | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/v2v/OVF.ml b/v2v/OVF.ml
index 43ef16b..7e5e57e 100644
--- a/v2v/OVF.ml
+++ b/v2v/OVF.ml
@@ -97,17 +97,35 @@ let get_vmtype = function
 
 (* Determine the ovf:OperatingSystemSection_Type from libguestfs
  * inspection.  See ovirt-engine sources, file:
- * frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
+ *   packaging/conf/osinfo-defaults.properties
+ * and also:
+ *   https://bugzilla.redhat.com/show_bug.cgi?id=1219857#c9
  *)
 and get_ostype = function
   | { i_type = "linux"; i_distro = "rhel"; i_major_version = v;
-      i_arch = "i386" } ->
+      i_arch = "i386" } when v <= 6 ->
     sprintf "RHEL%d" v
 
   | { i_type = "linux"; i_distro = "rhel"; i_major_version = v;
-      i_arch = "x86_64" } ->
+      i_arch = "x86_64" } when v <= 6 ->
     sprintf "RHEL%dx64" v
 
+  | { i_type = "linux"; i_distro = "rhel"; i_major_version = v;
+      i_arch = "x86_64" } (* when v >= 7 *) ->
+    sprintf "rhel_%dx64" v
+
+  | { i_type = "linux"; i_distro = "rhel"; i_major_version = 7;
+      i_arch = "ppc64" | "ppc64le" } ->
+    "rhel_7_ppc64"
+
+  | { i_type = "linux"; i_distro = "sles"; i_major_version = 11;
+      i_arch = "x86_64" } ->
+    "sles_11"
+
+  | { i_type = "linux"; i_distro = "sles"; i_major_version = 11;
+      i_arch = "ppc64" | "ppc64le" } ->
+    "sles_11_ppc64"
+
   | { i_type = "linux" } -> "OtherLinux"
 
   | { i_type = "windows"; i_major_version = 5; i_minor_version = 1 } ->
@@ -147,19 +165,19 @@ and get_ostype = function
 
   | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
       i_arch = "i386" } ->
-    "Windows8"
+    "windows_8"
 
   | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
       i_arch = "x86_64"; i_product_variant = "Client" } ->
-    "Windows8x64"
+    "windows_8x64"
 
   | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
       i_arch = "x86_64" } ->
-    "Windows2012x64"
+    "windows_2012x64"
 
   | { i_type = "windows"; i_major_version = 6; i_minor_version = 3;
       i_arch = "x86_64" } ->
-    "Windows2012R2x64"
+    "windows_2012R2x64"
 
   | { i_type = typ; i_distro = distro;
       i_major_version = major; i_minor_version = minor;

-- 
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