Blame SOURCES/0150-v2v-OVF-Add-more-Windows-operating-system-variants-R.patch

ffd6ed
From 9fe190b2b31d4c0e7295bcac5fc1d019aac1fab1 Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Mon, 20 Apr 2015 12:05:29 +0100
ffd6ed
Subject: [PATCH] v2v: OVF: Add more Windows operating system variants
ffd6ed
 (RHBZ#1213324).
ffd6ed
ffd6ed
When generating OVF (eg. for -o rhev, -o vdsm) we have to put the
ffd6ed
operating system type into a particular field of the output, in a
ffd6ed
format that oVirt/RHEV will understand.  Add further Windows OS
ffd6ed
variants to this list.  The variants are derived by examining
ffd6ed
ovirt-engine sources.
ffd6ed
ffd6ed
Thanks: Tingting Zheng for testing Windows conversions to RHEV and
ffd6ed
finding this bug.
ffd6ed
ffd6ed
(cherry picked from commit 3c51302d691cc204e4d43f4ab9837095d424bf3b)
ffd6ed
---
ffd6ed
 v2v/OVF.ml | 21 ++++++++++++++++++++-
ffd6ed
 1 file changed, 20 insertions(+), 1 deletion(-)
ffd6ed
ffd6ed
diff --git a/v2v/OVF.ml b/v2v/OVF.ml
ffd6ed
index cbb8932..4a6ee8d 100644
ffd6ed
--- a/v2v/OVF.ml
ffd6ed
+++ b/v2v/OVF.ml
ffd6ed
@@ -95,7 +95,10 @@ let get_vmtype = function
ffd6ed
 
ffd6ed
   | _ -> `Server
ffd6ed
 
ffd6ed
-(* Determine the ovf:OperatingSystemSection_Type from libguestfs inspection. *)
ffd6ed
+(* Determine the ovf:OperatingSystemSection_Type from libguestfs
ffd6ed
+ * inspection.  See ovirt-engine sources, file:
ffd6ed
+ * frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
ffd6ed
+ *)
ffd6ed
 and get_ostype = function
ffd6ed
   | { i_type = "linux"; i_distro = "rhel"; i_major_version = v;
ffd6ed
       i_arch = "i386" } ->
ffd6ed
@@ -142,6 +145,22 @@ and get_ostype = function
ffd6ed
       i_arch = "x86_64" } ->
ffd6ed
     "Windows2008R2x64"
ffd6ed
 
ffd6ed
+  | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
ffd6ed
+      i_arch = "i386" } ->
ffd6ed
+    "Windows8"
ffd6ed
+
ffd6ed
+  | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
ffd6ed
+      i_arch = "x86_64"; i_product_variant = "Client" } ->
ffd6ed
+    "Windows8x64"
ffd6ed
+
ffd6ed
+  | { i_type = "windows"; i_major_version = 6; i_minor_version = 2;
ffd6ed
+      i_arch = "x86_64" } ->
ffd6ed
+    "Windows2012x64"
ffd6ed
+
ffd6ed
+  | { i_type = "windows"; i_major_version = 6; i_minor_version = 3;
ffd6ed
+      i_arch = "x86_64" } ->
ffd6ed
+    "Windows2012R2x64"
ffd6ed
+
ffd6ed
   | { i_type = typ; i_distro = distro;
ffd6ed
       i_major_version = major; i_minor_version = minor;
ffd6ed
       i_product_name = product } ->
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed