Further fixes for QEMU Guest Agent install & VMware Tools removal

resolves: RHEL-49761, RHEL-51169
This commit is contained in:
Richard W.M. Jones 2024-08-08 11:02:22 +01:00
parent 65bc8bfda4
commit 620a64c9a3
16 changed files with 147 additions and 33 deletions

View File

@ -0,0 +1,78 @@
From 50f005f8b7034916588855c15b10a0195bf54b23 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 8 Aug 2024 10:40:24 +0100
Subject: [PATCH] Pull in a fix to make Windows firstboot more reliable.
Update the common submodule to get:
Richard W.M. Jones (2):
mlcustomize: Add some comments to firstboot batch file
mlcustomize: Reboot Windows between each firstboot script
Document that Windows may now reboot several times after conversion.
---
common | 2 +-
docs/virt-v2v.pod | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
Submodule common 7b84a370..a7883967:
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
index 3bbba714..52e76401 100644
--- a/common/mlcustomize/firstboot.ml
+++ b/common/mlcustomize/firstboot.ml
@@ -278,6 +278,9 @@ module Windows = struct
(* Write a firstboot.bat control script which just runs the other
* scripts in the directory. Note we need to use CRLF line endings
* in this script.
+ *
+ * XXX It would be better to use powershell here. For some ideas see
+ * https://github.com/HCK-CI/HLK-Setup-Scripts/
*)
let firstboot_script = sprintf "\
@echo off
@@ -299,6 +302,7 @@ if not exist \"%%scripts_done%%\" (
mkdir \"%%scripts_done%%\"
)
+:: Pick the next script to run.
for %%%%f in (\"%%scripts%%\"\\*.bat) do (
echo running \"%%%%f\"
move \"%%%%f\" \"%%scripts_done%%\"
@@ -307,8 +311,17 @@ for %%%%f in (\"%%scripts%%\"\\*.bat) do (
set elvl=!errorlevel!
echo .... exit code !elvl!
popd
+
+ :: Reboot the computer. This is necessary to free any locked
+ :: files which may prevent later scripts from running.
+ shutdown /r /t 0 /y
+
+ :: Exit the script (in case shutdown returns before rebooting).
+ :: On next boot, the whole firstboot service will be called again.
+ exit /b
)
+:: Fallthrough here if there are no scripts.
echo uninstalling firstboot service
\"%%firstboot%%\\%s\" -s firstboot uninstall
" firstboot_dir_win srvany in
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 92941026..587b4604 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -1295,9 +1295,12 @@ The guest will be bootable after the offline conversion stage, but
will not yet have all necessary drivers installed to work correctly.
These will be installed automatically the first time the guest boots.
-B<N.B.> Take care not to interrupt the automatic driver installation
-process when logging in to the guest for the first time, as this may
-prevent the guest from subsequently booting correctly.
+B<N.B.> Windows may reboot 4 or more times the first time after
+conversion. This is required to install the required drivers, guest
+agents, remove VMware Tools, and configure the network. Take care not
+to interrupt the automatic driver installation process when logging in
+to the guest for the first time, as this may prevent the guest from
+subsequently booting correctly.
=head3 Removing VMware Tools from Windows guests

View File

@ -0,0 +1,30 @@
From e9c0d63b22bcb4c31cfaac00fc1271713c8bd3b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 8 Aug 2024 10:56:16 +0100
Subject: [PATCH] docs: Restate position on removal of VMware Tools
With the "reboot after every step" change made in the previous commit,
it seems removal of VMware Tools is now more reliable. Update the
notes about this.
Updates: commit c952f310c902e438a8b0b5240a4b486b698bede8
---
docs/virt-v2v.pod | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 587b4604..346be606 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -1308,9 +1308,8 @@ Virt-v2v attempts to remove VMware Tools. For Windows guests this is
supposed to happen during the first boot after conversion.
We use VMware's recommended uninstallation method as that is the
-safest choice. However our experience has shown that this method
-usually fails. If so, VMware Tools must be removed by some other
-method.
+safest choice. If this fails, VMware Tools must be manually removed
+by some other method.
One possible method is described here:
L<https://gist.github.com/broestls/f872872a00acee2fca02017160840624>

View File

@ -1,4 +1,4 @@
From 2199e82ff02b9bcaf3dac69aa937e00e13c0393b Mon Sep 17 00:00:00 2001 From ed515103ba0d4054c7000568b39df42abb503f3c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 28 Sep 2014 19:14:43 +0100 Date: Sun, 28 Sep 2014 19:14:43 +0100
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode

View File

@ -1,4 +1,4 @@
From e60f9feaf0edb2074929136c8e43ac5936878f94 Mon Sep 17 00:00:00 2001 From 84afa8cb6933daee1585facc00557826f1fd2273 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 30 Sep 2014 10:50:27 +0100 Date: Tue, 30 Sep 2014 10:50:27 +0100
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
@ -44,7 +44,7 @@ index d2a1c270..0be37f5e 100644
=item B<-o null> =item B<-o null>
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 92941026..85ecd36c 100644 index 346be606..81a4b45a 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -146,11 +146,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk @@ -146,11 +146,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk

View File

@ -1,4 +1,4 @@
From a62760d22ce7637b6f32d7cce43c422eea417ac0 Mon Sep 17 00:00:00 2001 From abab56cf74a5005b33e962bb3d42db3d5b39e6d3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Apr 2015 09:45:41 -0400 Date: Fri, 24 Apr 2015 09:45:41 -0400
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu

View File

@ -1,4 +1,4 @@
From 1a4d41c9ebd73f431f19dca6f4453f47e7a14b15 Mon Sep 17 00:00:00 2001 From 2039580744223840a09b8aab7ff2fbf94a563a6c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 30 Aug 2015 03:21:57 -0400 Date: Sun, 30 Aug 2015 03:21:57 -0400
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport. Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.

View File

@ -1,4 +1,4 @@
From 686288d3c82666a460d907ede69897878103d932 Mon Sep 17 00:00:00 2001 From 13970ce5d6be475cf6e06185636a730584303a6e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 14:21:37 +0100 Date: Thu, 2 Mar 2017 14:21:37 +0100
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)

View File

@ -1,4 +1,4 @@
From f0cb8de238a4deaf10262aa297f70242e865928f Mon Sep 17 00:00:00 2001 From 98a14fe2f8a428ed4bba85aba3889467d48a5743 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com> From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 8 Mar 2017 11:03:40 +0100 Date: Wed, 8 Mar 2017 11:03:40 +0100
Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203) Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203)

View File

@ -1,4 +1,4 @@
From 7b18de8a3b687a0754c5f836666a4ed36a8b118a Mon Sep 17 00:00:00 2001 From be45d1e5bca42148c295da10c27c485c72de28c3 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com> From: Pino Toscano <ptoscano@redhat.com>
Date: Tue, 26 Mar 2019 09:42:25 +0100 Date: Tue, 26 Mar 2019 09:42:25 +0100
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests

View File

@ -1,4 +1,4 @@
From fc6cb9eb79dc237836820e672c1b5dbcd3526b73 Mon Sep 17 00:00:00 2001 From b0386851d539e414302cb646567836717fd027d9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Jun 2021 11:15:52 +0100 Date: Wed, 30 Jun 2021 11:15:52 +0100
Subject: [PATCH] RHEL: Disable -o glance Subject: [PATCH] RHEL: Disable -o glance
@ -98,7 +98,7 @@ index cd4862b1..54cd276e 100644
=head1 AUTHOR =head1 AUTHOR
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 85ecd36c..99ad371e 100644 index 81a4b45a..7c7069df 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -435,14 +435,6 @@ See L</Networks and bridges> below. @@ -435,14 +435,6 @@ See L</Networks and bridges> below.
@ -128,7 +128,7 @@ index 85ecd36c..99ad371e 100644
=item I<-o local> =item I<-o local>
=item I<-o qemu> =item I<-o qemu>
@@ -1396,13 +1383,6 @@ See also L</Starting the libvirt system instance>. @@ -1398,13 +1385,6 @@ See also L</Starting the libvirt system instance>.
Because of how Cinder volumes are presented as F</dev> block devices, Because of how Cinder volumes are presented as F</dev> block devices,
using I<-o openstack> normally requires that virt-v2v is run as root. using I<-o openstack> normally requires that virt-v2v is run as root.

View File

@ -1,4 +1,4 @@
From 0973cff2592426726f00112581f6e18eeca02607 Mon Sep 17 00:00:00 2001 From 7cbdcc0d3acf0bc50e331ad994987c26c5917b63 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Dec 2021 11:56:05 +0000 Date: Thu, 2 Dec 2021 11:56:05 +0000
Subject: [PATCH] RHEL: Remove the --in-place option Subject: [PATCH] RHEL: Remove the --in-place option
@ -12,7 +12,7 @@ wish to support in RHEL.
3 files changed, 17 deletions(-) 3 files changed, 17 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 99ad371e..39b27516 100644 index 7c7069df..9da6c851 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v). @@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v).
@ -36,7 +36,7 @@ index 99ad371e..39b27516 100644
=head2 Other virt-v2v topics =head2 Other virt-v2v topics
L<virt-v2v-support(1)> — Supported hypervisors, virtualization L<virt-v2v-support(1)> — Supported hypervisors, virtualization
@@ -1664,7 +1657,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c @@ -1666,7 +1659,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c
L<virt-p2v(1)>, L<virt-p2v(1)>,
L<virt-v2v-inspector(1)>, L<virt-v2v-inspector(1)>,

View File

@ -1,4 +1,4 @@
From af65e12a183ff052755e3026dac18a6b93264cde Mon Sep 17 00:00:00 2001 From f98822497a4a60a56cb4da2d5609d30150bdd718 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:56:54 +0100 Date: Tue, 5 Jul 2022 11:56:54 +0100
Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test Subject: [PATCH] RHEL 9: -oo compressed: Remove nbdcopy version check and test

View File

@ -1,4 +1,4 @@
From 022d8a4f9f89c8c47251a446ca03aaefcea3bb30 Mon Sep 17 00:00:00 2001 From 28311593d57777fd4d19a9ce93b4b06502a154be Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Jul 2022 11:58:09 +0100 Date: Tue, 5 Jul 2022 11:58:09 +0100
Subject: [PATCH] RHEL 9: tests: Remove btrfs test Subject: [PATCH] RHEL 9: tests: Remove btrfs test

View File

@ -1,4 +1,4 @@
From 7aa84cc24a69059f4137868a8392253e3b619c15 Mon Sep 17 00:00:00 2001 From 9b289e8d0f03c9d98d2b950feb889cad883779ea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 28 Apr 2023 12:28:19 +0100 Date: Fri, 28 Apr 2023 12:28:19 +0100
Subject: [PATCH] RHEL 9: Remove --block-driver option Subject: [PATCH] RHEL 9: Remove --block-driver option
@ -37,7 +37,7 @@ index ce57e229..6e1c5363 100644
=item B<--colours> =item B<--colours>
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 39b27516..2078e0c0 100644 index 9da6c851..d3406be0 100644
--- a/docs/virt-v2v.pod --- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod
@@ -197,16 +197,6 @@ The options are silently ignored for other input methods. @@ -197,16 +197,6 @@ The options are silently ignored for other input methods.

View File

@ -1,4 +1,4 @@
From 27c337d6425ba7aa2927a59655d668c36c4ee83f Mon Sep 17 00:00:00 2001 From 1dec94e52974e45fd3962dcbd51882fde7e9c306 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com> From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 9 Jul 2024 11:30:09 +0100 Date: Tue, 9 Jul 2024 11:30:09 +0100
Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported

View File

@ -8,7 +8,7 @@
Name: virt-v2v Name: virt-v2v
Epoch: 1 Epoch: 1
Version: 2.5.6 Version: 2.5.6
Release: 2%{?dist} Release: 3%{?dist}
Summary: Convert a virtual machine to run on KVM Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -33,19 +33,21 @@ Patch0002: 0002-convert-More-robust-qemu-ga-installation-change-path.patch
Patch0003: 0003-common-mlcustomize-Inject-qemu-ga-blnsvr-into-firstb.patch Patch0003: 0003-common-mlcustomize-Inject-qemu-ga-blnsvr-into-firstb.patch
Patch0004: 0004-docs-Add-a-note-about-removal-of-VMware-Tools-on-Win.patch Patch0004: 0004-docs-Add-a-note-about-removal-of-VMware-Tools-on-Win.patch
Patch0005: 0005-Update-common-submodule.patch Patch0005: 0005-Update-common-submodule.patch
Patch0006: 0006-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch Patch0006: 0006-Pull-in-a-fix-to-make-Windows-firstboot-more-reliabl.patch
Patch0007: 0007-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch Patch0007: 0007-docs-Restate-position-on-removal-of-VMware-Tools.patch
Patch0008: 0008-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch Patch0008: 0008-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0009: 0009-RHEL-Fixes-for-libguestfs-winsupport.patch Patch0009: 0009-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0010: 0010-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch Patch0010: 0010-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0011: 0011-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch Patch0011: 0011-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0012: 0012-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch Patch0012: 0012-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0013: 0013-RHEL-Disable-o-glance.patch Patch0013: 0013-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0014: 0014-RHEL-Remove-the-in-place-option.patch Patch0014: 0014-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0015: 0015-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch Patch0015: 0015-RHEL-Disable-o-glance.patch
Patch0016: 0016-RHEL-9-tests-Remove-btrfs-test.patch Patch0016: 0016-RHEL-Remove-the-in-place-option.patch
Patch0017: 0017-RHEL-9-Remove-block-driver-option.patch Patch0017: 0017-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0018: 0018-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch Patch0018: 0018-RHEL-9-tests-Remove-btrfs-test.patch
Patch0019: 0019-RHEL-9-Remove-block-driver-option.patch
Patch0020: 0020-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
%if !0%{?rhel} %if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no # libguestfs hasn't been built on i686 for a while since there is no
@ -349,6 +351,10 @@ make -C tests TESTS=test-v2v-fedora-luks-on-lvm-conversion.sh check
%changelog %changelog
* Thu Aug 08 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-3
- Further fixes for QEMU Guest Agent install & VMware Tools removal
resolves: RHEL-49761, RHEL-51169
* Mon Aug 05 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-2 * Mon Aug 05 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-2
- Document uninstallation of VMware Tools on Windows - Document uninstallation of VMware Tools on Windows
resolves: RHEL-51169 resolves: RHEL-51169