a034fe
From 4bb9affd19b7312af3c48cf141d695b4ec8f5656 Mon Sep 17 00:00:00 2001
a034fe
From: Pino Toscano <ptoscano@redhat.com>
a034fe
Date: Tue, 26 Mar 2019 17:37:56 +0100
a034fe
Subject: [PATCH] v2v: change the reporting of RHV Tools
a034fe
 messages/warnings/error
a034fe
a034fe
The RHV Tools ISO is provided as Red Hat only product, and thus not
a034fe
available for all the virt-v2v users.  Hence, change the way we report
a034fe
the status of the installation of the qemu guest agent from the RHV
a034fe
Tools ISO:
a034fe
- do not warn if virt-v2v does not know how to install the package for
a034fe
  the current guest
a034fe
- do not warn if the ISO does not contain packages for the current guest
a034fe
- on successful installations, show an info message
a034fe
a034fe
Related: RHBZ#1691659
a034fe
(cherry picked from commit cbf887ed90e0ecb5c52fd2c663acb5b9b2e3e14a)
a034fe
---
a034fe
 v2v/windows_virtio.ml | 10 ++++------
a034fe
 1 file changed, 4 insertions(+), 6 deletions(-)
a034fe
a034fe
diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml
a034fe
index a499fcf8a..f3302aed6 100644
a034fe
--- a/v2v/windows_virtio.ml
a034fe
+++ b/v2v/windows_virtio.ml
a034fe
@@ -197,9 +197,7 @@ and install_linux_tools g inspect =
a034fe
     | _ -> None in
a034fe
 
a034fe
   match os with
a034fe
-  | None ->
a034fe
-      warning (f_"don't know how to install guest tools on %s-%d")
a034fe
-        inspect.i_distro inspect.i_major_version
a034fe
+  | None -> ()
a034fe
   | Some os ->
a034fe
       let src_path = "linux" // os in
a034fe
       let dst_path = "/var/tmp" in
a034fe
@@ -216,13 +214,13 @@ and install_linux_tools g inspect =
a034fe
       let packages =
a034fe
         copy_from_virtio_win g inspect src_path dst_path
a034fe
                              package_filter
a034fe
-                             (fun () ->
a034fe
-                               warning (f_"guest tools directory ā€˜%sā€™ is missing from the virtio-win directory or ISO.\n\nGuest tools are only provided in the RHV Guest Tools ISO, so this can happen if you are using the version of virtio-win which contains just the virtio drivers.  In this case only virtio drivers can be installed in the guest, and installation of Guest Tools will be skipped.")
a034fe
-                                       src_path) in
a034fe
+                             (fun () -> ()) in
a034fe
       debug "done copying %d files" (List.length packages);
a034fe
       let packages = List.map ((//) dst_path) packages in
a034fe
       try
a034fe
         Linux.install_local g inspect packages;
a034fe
+        if packages <> [] then
a034fe
+          info (f_"QEMU Guest Agent installed for this guest.");
a034fe
       with G.Error msg ->
a034fe
         warning (f_"failed to install QEMU Guest Agent: %s") msg
a034fe
 
a034fe
-- 
a034fe
2.21.0
a034fe