Rebase to virt-v2v 2.5.5

Enhance -o kubevirt output
resolves: RHEL-45992
This commit is contained in:
Richard W.M. Jones 2024-07-11 12:33:16 +01:00
parent 005f272767
commit 726d2347c6
20 changed files with 52 additions and 468 deletions

View File

@ -1,4 +1,4 @@
From 96b42da64a3920c38a2d450018b1d8a3bc7aae7f Mon Sep 17 00:00:00 2001 From aa67c07182107bb8cd89a6397a506e6ce7a97ccb 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,66 +0,0 @@
From 6513fcbec9a10652cb8b5690936e7265e9c8851c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 May 2024 12:32:00 +0100
Subject: [PATCH] Update common submodule
Pulls in these commits, but they are not thought to be relevant to
virt-v2v.
Ben Brown (1):
Initialise bar->fp as NULL
Richard W.M. Jones (2):
mlcustomize: Update virt-customize generated files
options: Allow nbd+unix:// URIs
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 0dba002c..93a7f3af:
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
index 245d9960..48ee3344 100644
--- a/common/mlcustomize/customize_cmdline.ml
+++ b/common/mlcustomize/customize_cmdline.ml
@@ -157,7 +157,7 @@ let rec argspec () =
let len = String.length arg in
String.sub arg 0 i, String.sub arg (i+1) (len-(i+1))
and split_string_triplet option_name arg =
- match String.nsplit ~max:3 "," arg with
+ match String.nsplit ~max:3 ":" arg with
| [a; b; c] -> a, b, c
| _ ->
error (f_"invalid format for '--%s' parameter, see the man page")
diff --git a/common/options/uri.c b/common/options/uri.c
index 84d393c1..9180d6a2 100644
--- a/common/options/uri.c
+++ b/common/options/uri.c
@@ -99,7 +99,7 @@ is_uri (const char *arg)
return 0;
for (p--; p >= arg; p--) {
- if (!c_islower (*p))
+ if (! (c_islower (*p) || *p == '+'))
return 0;
}
@@ -148,7 +148,10 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
}
*/
- *protocol_ret = strdup (uri->scheme);
+ if (STREQ (uri->scheme, "nbd+unix"))
+ *protocol_ret = strdup ("nbd");
+ else
+ *protocol_ret = strdup (uri->scheme);
if (*protocol_ret == NULL) {
perror ("strdup: protocol");
return -1;
@@ -194,7 +197,7 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
if (path && path[0] == '/' &&
(STREQ (uri->scheme, "gluster") ||
STREQ (uri->scheme, "iscsi") ||
- STREQ (uri->scheme, "nbd") ||
+ STRPREFIX (uri->scheme, "nbd") ||
STREQ (uri->scheme, "rbd") ||
STREQ (uri->scheme, "sheepdog")))
path++;

View File

@ -1,4 +1,4 @@
From 1057f48af0a7f7169ff295bfdedeb946cb2de82d Mon Sep 17 00:00:00 2001 From ec237d33705cdd6b2e34fa4c5ca1ff7542ec6474 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 bc946dc1..55545e11 100644 index b53face6..725d6436 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
@ -69,7 +69,7 @@ index bc946dc1..55545e11 100644
=item B<-o> B<rhev> =item B<-o> B<rhev>
This is the same as I<-o rhv>. This is the same as I<-o rhv>.
@@ -603,11 +595,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID @@ -607,11 +599,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
which is saved on each Cinder volume in the C<virt_v2v_guest_id> which is saved on each Cinder volume in the C<virt_v2v_guest_id>
volume property. volume property.
@ -81,7 +81,7 @@ index bc946dc1..55545e11 100644
=item B<-oo verify-server-certificate> =item B<-oo verify-server-certificate>
=item B<-oo verify-server-certificate=>C<true|false> =item B<-oo verify-server-certificate=>C<true|false>
@@ -778,10 +765,6 @@ Print information about the source guest and stop. This option is @@ -782,10 +769,6 @@ Print information about the source guest and stop. This option is
useful when you are setting up network and bridge maps. useful when you are setting up network and bridge maps.
See L</Networks and bridges>. See L</Networks and bridges>.

View File

@ -1,212 +0,0 @@
From 70eec57765280032e08a1d738402926b14a851bf Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 May 2024 13:27:49 +0100
Subject: [PATCH] convert: windows: Install blnsvr from virtio-win
Also update the common module to get these two commits for the
implementation:
Richard W.M. Jones (2):
mlcustomize: Add virt-customize --inject-blnsvr generated files
mlcustomize: Add Inject_virtio_win.inject_blnsvr implementation
Fixes: https://issues.redhat.com/browse/RHEL-36591
---
common | 2 +-
convert/convert_windows.ml | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
Submodule common 93a7f3af..830cbdcf:
diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod
index ff93630d..b2ac5752 100644
--- a/common/mlcustomize/customize-options.pod
+++ b/common/mlcustomize/customize-options.pod
@@ -193,6 +193,18 @@ L<virt-builder(1)/INSTALLING PACKAGES>.
Set the hostname of the guest to C<HOSTNAME>. You can use a
dotted hostname.domainname (FQDN) if you want.
+=item B<--inject-blnsvr> METHOD
+
+Inject the Balloon Server (F<blnsvr.exe>) into a Windows guest.
+This operation also injects a firstboot script so that the Balloon
+Server is installed when the guest boots.
+
+The parameter is the same as used by the I<--inject-virtio-win> operation.
+
+Note that to do a full conversion of a Windows guest from a
+foreign hypervisor like VMware (which involves many other operations)
+you should use the L<virt-v2v(1)> tool instead of this.
+
=item B<--inject-qemu-ga> METHOD
Inject the QEMU Guest Agent into a Windows guest. The guest
diff --git a/common/mlcustomize/customize-synopsis.pod b/common/mlcustomize/customize-synopsis.pod
index bb0ce125..957de8cf 100644
--- a/common/mlcustomize/customize-synopsis.pod
+++ b/common/mlcustomize/customize-synopsis.pod
@@ -3,16 +3,16 @@
[--copy SOURCE:DEST] [--copy-in LOCALPATH:REMOTEDIR]
[--delete PATH] [--edit FILE:EXPR] [--firstboot SCRIPT]
[--firstboot-command 'CMD+ARGS'] [--firstboot-install PKG,PKG..]
- [--hostname HOSTNAME] [--inject-qemu-ga METHOD]
- [--inject-virtio-win METHOD] [--install PKG,PKG..]
- [--link TARGET:LINK[:LINK..]] [--mkdir DIR] [--move SOURCE:DEST]
- [--password USER:SELECTOR] [--root-password SELECTOR]
- [--run SCRIPT] [--run-command 'CMD+ARGS'] [--scrub FILE]
- [--sm-attach SELECTOR] [--sm-register] [--sm-remove]
- [--sm-unregister] [--ssh-inject USER[:SELECTOR]]
- [--tar-in TARFILE:REMOTEDIR] [--timezone TIMEZONE] [--touch FILE]
- [--truncate FILE] [--truncate-recursive PATH]
- [--uninstall PKG,PKG..] [--update] [--upload FILE:DEST]
- [--write FILE:CONTENT] [--no-logfile]
+ [--hostname HOSTNAME] [--inject-blnsvr METHOD]
+ [--inject-qemu-ga METHOD] [--inject-virtio-win METHOD]
+ [--install PKG,PKG..] [--link TARGET:LINK[:LINK..]] [--mkdir DIR]
+ [--move SOURCE:DEST] [--password USER:SELECTOR]
+ [--root-password SELECTOR] [--run SCRIPT]
+ [--run-command 'CMD+ARGS'] [--scrub FILE] [--sm-attach SELECTOR]
+ [--sm-register] [--sm-remove] [--sm-unregister]
+ [--ssh-inject USER[:SELECTOR]] [--tar-in TARFILE:REMOTEDIR]
+ [--timezone TIMEZONE] [--touch FILE] [--truncate FILE]
+ [--truncate-recursive PATH] [--uninstall PKG,PKG..] [--update]
+ [--upload FILE:DEST] [--write FILE:CONTENT] [--no-logfile]
[--password-crypto md5|sha256|sha512] [--no-selinux-relabel]
[--selinux-relabel] [--sm-credentials SELECTOR]
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
index 48ee3344..c4d6a77d 100644
--- a/common/mlcustomize/customize_cmdline.ml
+++ b/common/mlcustomize/customize_cmdline.ml
@@ -61,6 +61,8 @@ and op = [
(* --firstboot-install PKG,PKG.. *)
| `Hostname of string
(* --hostname HOSTNAME *)
+ | `InjectBalloonServer of string
+ (* --inject-blnsvr METHOD *)
| `InjectQemuGA of string
(* --inject-qemu-ga METHOD *)
| `InjectVirtioWin of string
@@ -286,6 +288,12 @@ let rec argspec () =
s_"Set the hostname"
),
Some "HOSTNAME", "Set the hostname of the guest to C<HOSTNAME>. You can use a\ndotted hostname.domainname (FQDN) if you want.";
+ (
+ [ L"inject-blnsvr" ],
+ Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectBalloonServer s) ops),
+ s_"Inject the Balloon Server into a Windows guest"
+ ),
+ Some "METHOD", "Inject the Balloon Server (F<blnsvr.exe>) into a Windows guest.\nThis operation also injects a firstboot script so that the Balloon\nServer is installed when the guest boots.\n\nThe parameter is the same as used by the I<--inject-virtio-win> operation.\n\nNote that to do a full conversion of a Windows guest from a\nforeign hypervisor like VMware (which involves many other operations)\nyou should use the L<virt-v2v(1)> tool instead of this.";
(
[ L"inject-qemu-ga" ],
Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectQemuGA s) ops),
diff --git a/common/mlcustomize/customize_cmdline.mli b/common/mlcustomize/customize_cmdline.mli
index 51a156ea..ee62961a 100644
--- a/common/mlcustomize/customize_cmdline.mli
+++ b/common/mlcustomize/customize_cmdline.mli
@@ -53,6 +53,8 @@ and op = [
(* --firstboot-install PKG,PKG.. *)
| `Hostname of string
(* --hostname HOSTNAME *)
+ | `InjectBalloonServer of string
+ (* --inject-blnsvr METHOD *)
| `InjectQemuGA of string
(* --inject-qemu-ga METHOD *)
| `InjectVirtioWin of string
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
index 2a30b200..4e0ed0e0 100644
--- a/common/mlcustomize/inject_virtio_win.ml
+++ b/common/mlcustomize/inject_virtio_win.ml
@@ -24,6 +24,8 @@ open Common_gettext.Gettext
open Regedit
+let re_blnsvr = PCRE.compile ~caseless:true "\\bblnsvr\\.exe$"
+
type t = {
g : Guestfs.guestfs; (** guestfs handle *)
@@ -267,6 +269,18 @@ and inject_qemu_ga t =
configure_qemu_ga t msi_files;
msi_files <> [] (* return true if we found some qemu-ga MSI files *)
+and inject_blnsvr t =
+ let files = copy_blnsvr t in
+ match files with
+ | [] -> false (* Didn't find or install anything. *)
+
+ (* We usually find blnsvr.exe in two locations (drivers/by-os and
+ * drivers/by-driver). Pick the first.
+ *)
+ | blnsvr :: _ ->
+ configure_blnsvr t blnsvr;
+ true
+
and add_guestor_to_registry t ((g, root) as reg) drv_name drv_pciid =
let ddb_node = g#hivex_node_get_child root "DriverDatabase" in
@@ -351,6 +365,11 @@ and copy_qemu_ga t =
(fun () ->
error (f_"root directory / is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
+and copy_blnsvr t =
+ copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_blnsvr t)
+ (fun () ->
+ error (f_"root directory / is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
+
(* Copy all files from virtio_win directory/ISO located in [srcdir]
* subdirectory and all its subdirectories to the [destdir]. The directory
* hierarchy is not preserved, meaning all files will be directly in [destdir].
@@ -513,6 +532,10 @@ and virtio_iso_path_matches_qemu_ga t path =
| ("x86_64", "rhev-qga64.msi") -> true
| _ -> false
+(* Find blnsvr for the current Windows version. *)
+and virtio_iso_path_matches_blnsvr t path =
+ virtio_iso_path_matches_guest_os t path && PCRE.matches re_blnsvr path
+
(* Look up in libosinfo for the OS, and copy all the locally
* available files specified as drivers for that OS to the [destdir].
*
@@ -586,3 +609,10 @@ and configure_qemu_ga t files =
Firstboot.add_firstboot_powershell t.g t.root
(sprintf "install-%s.ps1" msi_path) !psh_script;
) files
+
+and configure_blnsvr t blnsvr =
+ let cmd = sprintf "\
+ @echo off\n\
+ echo Installing %s\n\
+ c:\\%s -i\n" blnsvr blnsvr in
+ Firstboot.add_firstboot_script t.g t.root (sprintf "install-%s" blnsvr) cmd
diff --git a/common/mlcustomize/inject_virtio_win.mli b/common/mlcustomize/inject_virtio_win.mli
index d14f0497..d273c4dd 100644
--- a/common/mlcustomize/inject_virtio_win.mli
+++ b/common/mlcustomize/inject_virtio_win.mli
@@ -93,3 +93,11 @@ val inject_qemu_ga : t -> bool
the MSI(s).
Returns [true] iff we were able to inject qemu-ga. *)
+
+val inject_blnsvr : t -> bool
+(** Inject the Balloon Server ([blnsvr.exe]) into a Windows guest.
+
+ A firstboot script is also injected which should install
+ the server by running [blnsvr -i].
+
+ Returns [true] iff we were able to inject the Balloon Server. *)
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index 34cf341b..2d6e2059 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -357,6 +357,12 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
may want to install the guest agent manually after \
conversion.");
+ (* Install Balloon Server unconditionally and warn if missing *)
+ if not (Inject_virtio_win.inject_blnsvr virtio_win) then
+ warning (f_"Balloon Server (blnsvr.exe) not found on tools \
+ ISO/directory. You may want to install this component \
+ manually after conversion.");
+
unconfigure_xenpv ();
unconfigure_prltools ();
unconfigure_vmwaretools ()

View File

@ -1,4 +1,4 @@
From bcbfbf657376c8abae76f082d81d1c2d2682920c Mon Sep 17 00:00:00 2001 From 1594393855b0512af9a99da98fb2bfeee11037e8 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,26 +0,0 @@
From 9f7bb5fc33e3a828944f2d7987c84bcf17172b4c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 May 2024 13:43:29 +0100
Subject: [PATCH] docs: Add VDDK prereq that server must not be in maintenance
mode
Fixes: https://issues.redhat.com/browse/RHEL-33699
---
docs/virt-v2v-input-vmware.pod | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/virt-v2v-input-vmware.pod b/docs/virt-v2v-input-vmware.pod
index fe59222a..fc6be0e0 100644
--- a/docs/virt-v2v-input-vmware.pod
+++ b/docs/virt-v2v-input-vmware.pod
@@ -231,6 +231,10 @@ link above.
VDDK imports require a feature added in libvirt E<ge> 3.7.
+=item 5.
+
+The VMware server must not be in maintenance mode.
+
=back
=head2 VDDK: ESXi NFC service memory limits

View File

@ -1,4 +1,4 @@
From 45f949e08aa66486a65889768c006000f639135a Mon Sep 17 00:00:00 2001 From ccd0cef31a8ff164354843652d1392803efa730e 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 55316686f7d8aa806d83bbc576c8cc9c2b518f04 Mon Sep 17 00:00:00 2001 From 7f4537e4cfd20d4f05ab10c963fc57ef52434cca 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 447d296d141e64bbf594dbe8fc69ea58fc3de46e Mon Sep 17 00:00:00 2001 From 8717c34c79c317586e995a7865e0eec5e1e900bf 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)
@ -9,7 +9,7 @@ They are not supported in RHEL.
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
index 38dc8f7b..05c4e3f5 100644 index 4a0544f8..9c3981e1 100644
--- a/docs/virt-v2v-input-xen.pod --- a/docs/virt-v2v-input-xen.pod
+++ b/docs/virt-v2v-input-xen.pod +++ b/docs/virt-v2v-input-xen.pod
@@ -11,7 +11,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen @@ -11,7 +11,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen

View File

@ -1,4 +1,4 @@
From 44ea2e65e175c0acddf7f80db2c972a4d7ddea35 Mon Sep 17 00:00:00 2001 From bd843ec5942660f2a436ba0301e8c2908489db33 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 c2d09080f3c06416bd935c4a6eb9bb7822dceec7 Mon Sep 17 00:00:00 2001 From b4718d6e970f1efc8cc7e3ee0b679a4f52956017 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 55545e11..8d5d54d3 100644 index 725d6436..4f0693e2 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.
@ -116,7 +116,7 @@ index 55545e11..8d5d54d3 100644
=item B<-o> B<kubevirt> =item B<-o> B<kubevirt>
Set the output method to I<kubevirt>. B<Note the way this mode works Set the output method to I<kubevirt>. B<Note the way this mode works
@@ -1187,11 +1179,6 @@ and output methods may use disk space, as outlined in the table below. @@ -1191,11 +1183,6 @@ and output methods may use disk space, as outlined in the table below.
This temporarily places a full copy of the uncompressed source disks This temporarily places a full copy of the uncompressed source disks
in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>). in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>).
@ -128,7 +128,7 @@ index 55545e11..8d5d54d3 100644
=item I<-o local> =item I<-o local>
=item I<-o qemu> =item I<-o qemu>
@@ -1377,13 +1364,6 @@ See also L</Starting the libvirt system instance>. @@ -1381,13 +1368,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 8ec151f6376c65ef5706e14f28530514c9b9e877 Mon Sep 17 00:00:00 2001 From 97ca8fd46a808f2a225b1664933e688165326d96 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 8d5d54d3..0738f492 100644 index 4f0693e2..c6535d71 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 8d5d54d3..0738f492 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
@@ -1645,7 +1638,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c @@ -1649,7 +1642,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 21cdefbc81e796bb2ebfac25f69b8c249e4b8a8a Mon Sep 17 00:00:00 2001 From 9ebcbf072257f57ce54428eb002ff4f00e43d9cd 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 277e38252c123450e2eab0a8633ce59a1479aa7d Mon Sep 17 00:00:00 2001 From f8261b357faa7f7c036564c948437866d1febf10 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 79be5c20781a8e5efd7e5335a552ad69bedf5e76 Mon Sep 17 00:00:00 2001 From 41142627e326ec03918b7048e3c864e7674f731d 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 0738f492..021ac897 100644 index c6535d71..b7b30899 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 e08b337b0b36763b437901a6480d49f63f911ce9 Mon Sep 17 00:00:00 2001 From 3a99ae6c6a6d46b8426d3851a46ac67ec90a125c 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
@ -9,16 +9,16 @@ Fixes: https://issues.redhat.com/browse/RHEL-40903
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/in-place/in_place.ml b/in-place/in_place.ml diff --git a/in-place/in_place.ml b/in-place/in_place.ml
index 2049db16..2a031271 100644 index 2049db16..b74dbc8a 100644
--- a/in-place/in_place.ml --- a/in-place/in_place.ml
+++ b/in-place/in_place.ml +++ b/in-place/in_place.ml
@@ -33,6 +33,9 @@ let mac_re = PCRE.compile "^([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[: @@ -195,6 +195,9 @@ read the man page virt-v2v-in-place(1).
let mac_ip_re = PCRE.compile "^([[:xdigit:]]|:|\\.)+$" let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true ~machine_readable:true usage_msg in
Getopt.parse opthandle.getopt;
let rec main () =
+ warning "virt-v2v-in-place is NOT SUPPORTED for command line use. \ + warning "virt-v2v-in-place is NOT SUPPORTED for command line use. \
+ It is almost always better to use virt-v2v instead of this tool."; + It is almost always better to use virt-v2v instead of this tool.";
+ +
let set_string_option_once optname optref arg = (* Print the version, easier than asking users to tell us. *)
match !optref with debug "%s: %s %s (%s)"
| Some _ -> prog Config.package_name Config.package_version_full

View File

@ -1,52 +0,0 @@
From 16c17aa39ff95c8c533e75e901055396caa4d0b9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 3 Jul 2024 11:36:11 +0100
Subject: [PATCH] inspector: Add more fields to the output
Add more inspection fields in the <operatingsystem> element of
virt-v2v-inspector output. I've tried to keep these field names
consistent with virt-inspector (if there is a difference then it's a
bug in this tool).
See: https://issues.redhat.com/browse/MTV-1079
(cherry picked from commit 4df3dcf64da91645d20aa9f74cd04fa8985c4610)
---
inspector/inspector.ml | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
index 02d1a0e7..c79dd687 100644
--- a/inspector/inspector.ml
+++ b/inspector/inspector.ml
@@ -490,6 +490,31 @@ and inspector_xml v2vdir inspect =
[PCData inspect.i_package_management]);
if inspect.i_product_name <> "" then
List.push_back os (e "product_name" [] [PCData inspect.i_product_name]);
+ if inspect.i_product_variant <> "" then
+ List.push_back os (e "product_variant" []
+ [PCData inspect.i_product_variant]);
+
+ if inspect.i_windows_systemroot <> "" then
+ List.push_back os (e "windows_systemroot" []
+ [PCData inspect.i_windows_systemroot]);
+ if inspect.i_windows_software_hive <> "" then
+ List.push_back os (e "windows_software_hive" []
+ [PCData inspect.i_windows_software_hive]);
+ if inspect.i_windows_systemroot <> "" then
+ List.push_back os (e "windows_system_hive" []
+ [PCData inspect.i_windows_system_hive]);
+ if inspect.i_windows_current_control_set <> "" then
+ List.push_back os (e "windows_current_control_set" []
+ [PCData inspect.i_windows_current_control_set]);
+
+ List.push_back os (e "root" [] [PCData inspect.i_root]);
+ let mps = ref [] in
+ List.iter (
+ fun (fs, dev) ->
+ List.push_back mps (e "mountpoint" [ "dev", dev ] [PCData fs])
+ ) inspect.i_mountpoints;
+ List.push_back os (e "mountpoints" [] !mps);
+
List.push_back body (e "operatingsystem" [] !os);
(* Construct the final document. *)

View File

@ -1,60 +0,0 @@
From 528cae619a10c7cb62e1d9d72ec2475b1543f512 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 28 Jun 2024 14:52:11 +0100
Subject: [PATCH] Revert "docs: Remove paragraph about -ip passwords and
ssh/scp"
Previously we removed this paragraph, believing that the -ip option
now copes with all cases. However this still isn't true because
libvirt runs this ssh command:
ssh -l root -T -e none -- [XEN-HOST] sh -c 'which virt-ssh-helper 1>/dev/null 2>&1; if test $? = 0; then virt-ssh-helper 'xen://'; else if 'nc' -q 2>&1 | grep "requires an argument" >/dev/null 2>&1; then ARG=-q0;else ARG=;fi;'nc' $ARG -U /var/run/libvirt/libvirt-sock; fi'
I checked with Dan and there is no way to suppress this or pass in a
password, so we still need ssh-agent even with -ip. Note this applies
to any libvirt ssh connection, thus to Xen or VMware over SSH.
Reported-by: Ming Xie
Fixes: https://issues.redhat.com/browse/RHEL-45527
Thanks: Daniel Berrange
This reverts commit 67fcf66904c7f1f6da858eba35e95dad670427c0.
(cherry picked from commit 2a6c24227380a43f1a31cd22281f48dc586653b0)
---
docs/virt-v2v-input-vmware.pod | 5 +++++
docs/virt-v2v-input-xen.pod | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/docs/virt-v2v-input-vmware.pod b/docs/virt-v2v-input-vmware.pod
index fc6be0e0..b28268c2 100644
--- a/docs/virt-v2v-input-vmware.pod
+++ b/docs/virt-v2v-input-vmware.pod
@@ -155,6 +155,11 @@ virt-v2v server to the ESXi hypervisor. For example:
$ ssh root@esxi.example.com
[ logs straight into the shell, no password is requested ]
+Note that support for non-interactive authentication via the I<-ip>
+option is incomplete. Some operations remain that still require the
+user to enter the password manually. Therefore ssh-agent is recommended
+over the I<-ip> option. See L<https://bugzilla.redhat.com/1854275>.
+
=head3 VMX: Construct the SSH URI
When using the SSH input transport you must specify a remote
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
index 05c4e3f5..9c3981e1 100644
--- a/docs/virt-v2v-input-xen.pod
+++ b/docs/virt-v2v-input-xen.pod
@@ -32,6 +32,11 @@ server to the Xen host. For example:
$ ssh root@xen.example.com
[ logs straight into the shell, no password is requested ]
+Note that support for non-interactive authentication via the I<-ip>
+option is incomplete. Some operations remain that still require the
+user to enter the password manually. Therefore ssh-agent is recommended
+over the I<-ip> option. See L<https://bugzilla.redhat.com/1854275>.
+
With some modern ssh implementations, legacy crypto algorithms required
to interoperate with RHEL 5 sshd are disabled. To enable them, you may
need to add the following C<Host> stanza to your F<~/.ssh/config>:

View File

@ -1,2 +1,2 @@
SHA512 (virt-v2v-2.5.4.tar.gz) = ea872978eefc9feacb6048bb217449804612e5cc68bfbd1f20e5aaf637ca7ca8be92798ba1cbc1d2d6ddbf6a07628e79beea7db1966150675d9fbda9d4361b7a SHA512 (virt-v2v-2.5.5.tar.gz) = 06c8ba67cb604387c5aa371815b0be333378eac2bc3672f6f5c61d6914ed93b49d72355a9e549aca1e3f6d4bf07b357b800aa4e30cd7fe14de05d39f1c4a4007
SHA512 (virt-v2v-2.5.4.tar.gz.sig) = 02780e8ae0bdff8c5b22b52bdd24d5f9dfa2d808b792abf7f8bcaa8c4e2c12ea52d3f2cd2c64b8a261437db69409f9ea1d12ac182dbc96e2bb5441a434ac7f84 SHA512 (virt-v2v-2.5.5.tar.gz.sig) = 74397d5d890018ac604d1f563ec2d2298c34dd01b406a90d8e3db52a0f80696938dd7d93a08c93130780a2b6e9f47c74c9eb9be5b7c7c2e0a4fdf72561d40d08

View File

@ -7,8 +7,8 @@
Name: virt-v2v Name: virt-v2v
Epoch: 1 Epoch: 1
Version: 2.5.4 Version: 2.5.5
Release: 2%{?dist} Release: 1%{?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
@ -28,24 +28,19 @@ Source3: copy-patches.sh
# https://github.com/libguestfs/virt-v2v/commits/rhel-9.5 # https://github.com/libguestfs/virt-v2v/commits/rhel-9.5
# Patches. # Patches.
Patch0001: 0001-Update-common-submodule.patch Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0002: 0002-convert-windows-Install-blnsvr-from-virtio-win.patch Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0003: 0003-docs-Add-VDDK-prereq-that-server-must-not-be-in-main.patch Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0004: 0004-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0005: 0005-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0006: 0006-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch Patch0006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0007: 0007-RHEL-Fixes-for-libguestfs-winsupport.patch Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch Patch0008: 0008-RHEL-Disable-o-glance.patch
Patch0009: 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch Patch0009: 0009-RHEL-Remove-the-in-place-option.patch
Patch0010: 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch Patch0010: 0010-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch
Patch0011: 0011-RHEL-Disable-o-glance.patch Patch0011: 0011-RHEL-9-tests-Remove-btrfs-test.patch
Patch0012: 0012-RHEL-Remove-the-in-place-option.patch Patch0012: 0012-RHEL-9-Remove-block-driver-option.patch
Patch0013: 0013-RHEL-9-oo-compressed-Remove-nbdcopy-version-check-an.patch Patch0013: 0013-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0014: 0014-RHEL-9-tests-Remove-btrfs-test.patch
Patch0015: 0015-RHEL-9-Remove-block-driver-option.patch
Patch0016: 0016-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0017: 0017-inspector-Add-more-fields-to-the-output.patch
Patch0018: 0018-Revert-docs-Remove-paragraph-about-ip-passwords-and-.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 +344,11 @@ make -C tests TESTS=test-v2v-fedora-luks-on-lvm-conversion.sh check
%changelog %changelog
* Thu Jul 11 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.5-1
- Rebase to virt-v2v 2.5.5
- Enhance -o kubevirt output
resolves: RHEL-45992
* Tue Jul 09 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.4-2 * Tue Jul 09 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.4-2
- Package virt-v2v-in-place in libexec as unsupported tool - Package virt-v2v-in-place in libexec as unsupported tool
- Add warning about virt-v2v-in-place not being supported - Add warning about virt-v2v-in-place not being supported