|
|
498672 |
From ab6076b6fe33cfe9a7b5d29bea5b8c24553894cc Mon Sep 17 00:00:00 2001
|
|
|
10436e |
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= <tgolembi@redhat.com>
|
|
|
10436e |
Date: Wed, 5 Feb 2020 14:11:36 +0100
|
|
|
10436e |
Subject: [PATCH] windows: small tweaks of qemu-ga firstboot script
|
|
|
10436e |
MIME-Version: 1.0
|
|
|
10436e |
Content-Type: text/plain; charset=UTF-8
|
|
|
10436e |
Content-Transfer-Encoding: 8bit
|
|
|
10436e |
|
|
|
10436e |
- match log file with script name
|
|
|
10436e |
- restart manually only after successfull install, this also helps
|
|
|
10436e |
debugging because we can log the installer return code
|
|
|
10436e |
|
|
|
10436e |
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
|
|
|
10436e |
|
|
|
10436e |
(cherry picked from commit 59f9ff40621240a6eed28c4425d3d69d8b21bc0e
|
|
|
10436e |
in virt-v2v)
|
|
|
10436e |
---
|
|
|
10436e |
v2v/convert_windows.ml | 8 +++++++-
|
|
|
10436e |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
10436e |
|
|
|
10436e |
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
|
|
|
10436e |
index bdb0092c3..43c1f85de 100644
|
|
|
10436e |
--- a/v2v/convert_windows.ml
|
|
|
10436e |
+++ b/v2v/convert_windows.ml
|
|
|
10436e |
@@ -430,7 +430,13 @@ popd
|
|
|
10436e |
fun msi_path ->
|
|
|
10436e |
let fb_script = "\
|
|
|
10436e |
echo Installing qemu-ga from " ^ msi_path ^ "
|
|
|
10436e |
-\"\\" ^ msi_path ^ "\" /qn /forcerestart /l+*vx \"%cd%\\qemu-ga.log\"
|
|
|
10436e |
+\"\\" ^ msi_path ^ "\" /norestart /qn /l+*vx \"%~dpn0.log\"
|
|
|
10436e |
+set elvl=!errorlevel!
|
|
|
10436e |
+echo Done installing qemu-ga error_level=!elvl!
|
|
|
10436e |
+if !elvl! == 0 (
|
|
|
10436e |
+ echo Restarting Windows...
|
|
|
10436e |
+ shutdown /r /f /c \"rebooted by firstboot script\"
|
|
|
10436e |
+)
|
|
|
10436e |
" in
|
|
|
10436e |
Firstboot.add_firstboot_script g inspect.i_root
|
|
|
10436e |
("install " ^ msi_path) fb_script;
|
|
|
10436e |
--
|
|
|
498672 |
2.18.4
|
|
|
10436e |
|