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