v2v: linux: do not install qemu-guest-agent if already installed

In case qemu-guest-agent is already installed in the guest, then do not
attempt to install it again.

Reported by Martin Kletzander.
This commit is contained in:
Pino Toscano
2019-09-19 13:50:44 +02:00
parent 1311842a64
commit 977fac2012

View File

@@ -493,7 +493,13 @@ let convert (g : G.guestfs) inspect source output rcaps =
)
and install_linux_tools () =
Windows_virtio.install_linux_tools g inspect
let has_qemu_guest_agent =
List.exists (
fun { G.app2_name = name } ->
name = "qemu-guest-agent"
) inspect.i_apps in
if not has_qemu_guest_agent then
Windows_virtio.install_linux_tools g inspect
and configure_kernel () =
(* Previously this function would try to install kernels, but we