[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 4/4] v2v: windows: Only try to install rhev-apt if the target is RHV (RHBZ#1161019).



Thanks: Tingting Zheng.
---
 v2v/convert_windows.ml | 2 +-
 v2v/output_rhv.ml      | 3 +++
 v2v/output_vdsm.ml     | 3 +++
 v2v/types.ml           | 1 +
 v2v/types.mli          | 2 ++
 5 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 0289273..7d81c00 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -200,7 +200,7 @@ let convert (g : G.guestfs) inspect source output rcaps =
     wait_pnp ();
 
     let tool_path = virt_tools_data_dir // "rhev-apt.exe" in
-    if Sys.file_exists tool_path then
+    if output#install_rhev_apt && Sys.file_exists tool_path then
       configure_rhev_apt tool_path
     else (
       let tool_path = virt_tools_data_dir // "vmdp.exe" in
diff --git a/v2v/output_rhv.ml b/v2v/output_rhv.ml
index e42429c..f407b4e 100644
--- a/v2v/output_rhv.ml
+++ b/v2v/output_rhv.ml
@@ -121,6 +121,9 @@ object
    *)
   method keep_serial_console = false
 
+  (* rhev-apt.exe will be installed (if available). *)
+  method install_rhev_apt = true
+
   (* Export Storage Domain mountpoint and UUID. *)
   val mutable esd_mp = ""
   val mutable esd_uuid = ""
diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml
index 8b3148b..bbebff7 100644
--- a/v2v/output_vdsm.ml
+++ b/v2v/output_vdsm.ml
@@ -56,6 +56,9 @@ object
    *)
   method keep_serial_console = false
 
+  (* rhev-apt.exe will be installed (if available). *)
+  method install_rhev_apt = true
+
   (* Data Domain mountpoint. *)
   val mutable dd_mp = ""
   val mutable dd_uuid = ""
diff --git a/v2v/types.ml b/v2v/types.ml
index 9d94dca..b314b13 100644
--- a/v2v/types.ml
+++ b/v2v/types.ml
@@ -486,4 +486,5 @@ class virtual output = object
   method disk_create = (open_guestfs ())#disk_create
   method virtual create_metadata : source -> target list -> target_buses -> guestcaps -> inspect -> target_firmware -> unit
   method keep_serial_console = true
+  method install_rhev_apt = false
 end
diff --git a/v2v/types.mli b/v2v/types.mli
index 48e47b0..e10802c 100644
--- a/v2v/types.mli
+++ b/v2v/types.mli
@@ -371,5 +371,7 @@ class virtual output : object
       same signature as Guestfs#disk_create. *)
   method keep_serial_console : bool
   (** Whether this output supports serial consoles (RHV does not). *)
+  method install_rhev_apt : bool
+  (** True iff [rhev-apt.exe] should be installed (only for RHV). *)
 end
 (** Encapsulates all [-o], etc output arguments as an object. *)
-- 
2.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]