Backport RHEL 9 patches, remove input from Xen and output to RHV
RHEL patches: * Select correct qemu binary for -o qemu mode * Disable the --qemu-boot / -oo qemu-boot option * Fix list of supported sound cards to match RHEL qemu * Fixes for libguestfs-winsupport * -i disk: force VNC as display * point to KB for supported v2v hypervisors/guests * Remove -o glance * Remove the --in-place option * tests: Remove btrfs test * Remove --block-driver option Remove input from Xen resolves: RHEL-37687 Remove -o rhv, -o rhv-upload and -o vdsm modes resolves: RHEL-36712
This commit is contained in:
parent
c08e5d9af4
commit
331c6bc244
66
0001-Update-common-submodule.patch
Normal file
66
0001-Update-common-submodule.patch
Normal file
@ -0,0 +1,66 @@
|
||||
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++;
|
212
0002-convert-windows-Install-blnsvr-from-virtio-win.patch
Normal file
212
0002-convert-windows-Install-blnsvr-from-virtio-win.patch
Normal file
@ -0,0 +1,212 @@
|
||||
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 ()
|
@ -0,0 +1,26 @@
|
||||
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
|
51
0004-inspector-Add-more-fields-to-the-output.patch
Normal file
51
0004-inspector-Add-more-fields-to-the-output.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 4df3dcf64da91645d20aa9f74cd04fa8985c4610 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
|
||||
---
|
||||
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. *)
|
@ -0,0 +1,58 @@
|
||||
From 2a6c24227380a43f1a31cd22281f48dc586653b0 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.
|
||||
---
|
||||
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 38dc8f7b..4a0544f8 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>:
|
@ -0,0 +1,27 @@
|
||||
From 9cedbf00c8166be81e7bab9b278522f9803f6758 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2024 10:03:19 +0100
|
||||
Subject: [PATCH] docs: Update -oo "?" example to use libvirt instead of RHV
|
||||
mode
|
||||
|
||||
---
|
||||
docs/virt-v2v.pod | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index bc946dc1..b53face6 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -589,7 +589,11 @@ the output name is the same as the input name.
|
||||
Set output option(s) related to the current output mode.
|
||||
To display short help on what options are available you can use:
|
||||
|
||||
- virt-v2v -o rhv-upload -oo "?"
|
||||
+ $ virt-v2v -o libvirt -oo "?"
|
||||
+ Output options that can be used with -o libvirt:
|
||||
+
|
||||
+ -oo compressed Compress the output file (used only with
|
||||
+ -of qcow2)
|
||||
|
||||
=item B<-oo compressed>
|
||||
|
@ -0,0 +1,30 @@
|
||||
From a8dc0a8f6ca43a1c4dea49a1ad46b0a4d1458942 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 28 Sep 2014 19:14:43 +0100
|
||||
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode
|
||||
(RHBZ#1147313).
|
||||
|
||||
RHEL does not have qemu-system-x86_64 (etc), and in addition the
|
||||
qemu binary is located in /usr/libexec. Encode the path to this
|
||||
binary directly in the script.
|
||||
|
||||
Note that we don't support people running qemu directly like this.
|
||||
It's just for quick testing of converted VMs, and to help us with
|
||||
support cases.
|
||||
---
|
||||
output/output_qemu.ml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/output/output_qemu.ml b/output/output_qemu.ml
|
||||
index 26c1ba48..07dae8c2 100644
|
||||
--- a/output/output_qemu.ml
|
||||
+++ b/output/output_qemu.ml
|
||||
@@ -131,7 +131,7 @@ module QEMU = struct
|
||||
* module deals with shell and qemu comma quoting.
|
||||
*)
|
||||
let cmd = Qemuopts.create () in
|
||||
- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch);
|
||||
+ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm";
|
||||
|
||||
let flag = Qemuopts.flag cmd
|
||||
and arg = Qemuopts.arg cmd
|
121
0008-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Normal file
121
0008-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Normal file
@ -0,0 +1,121 @@
|
||||
From d8aad76492abb7e4f38e7b5ea82f38b6bf1c9f9b Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 30 Sep 2014 10:50:27 +0100
|
||||
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
|
||||
(RHBZ#1147313).
|
||||
|
||||
This cannot work because there is no Gtk or SDL output mode
|
||||
in RHEL's qemu-kvm.
|
||||
|
||||
In addition you will have to edit the -display option in the
|
||||
qemu script.
|
||||
---
|
||||
docs/virt-v2v-output-local.pod | 6 ++----
|
||||
docs/virt-v2v.pod | 17 -----------------
|
||||
output/output_qemu.ml | 3 +++
|
||||
v2v/v2v.ml | 2 --
|
||||
4 files changed, 5 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
|
||||
index d2a1c270..0be37f5e 100644
|
||||
--- a/docs/virt-v2v-output-local.pod
|
||||
+++ b/docs/virt-v2v-output-local.pod
|
||||
@@ -9,7 +9,7 @@ or libvirt
|
||||
|
||||
virt-v2v [-i* options] -o local -os DIRECTORY
|
||||
|
||||
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
|
||||
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
|
||||
|
||||
virt-v2v [-i* options] -o null
|
||||
|
||||
@@ -47,12 +47,10 @@ where C<NAME> is the guest name.
|
||||
|
||||
=item B<-o qemu -os> C<DIRECTORY>
|
||||
|
||||
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
|
||||
-
|
||||
This converts the guest to files in C<DIRECTORY>. Unlike I<-o local>
|
||||
above, a shell script is created which contains the raw qemu command
|
||||
you would need to boot the guest. However the shell script is not
|
||||
-run, I<unless> you also add the I<--qemu-boot> option.
|
||||
+run.
|
||||
|
||||
=item B<-o null>
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index b53face6..725d6436 100644
|
||||
--- a/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
|
||||
image(s) you do not need to specify the name of the disk image on the
|
||||
command line.
|
||||
|
||||
-To convert a local disk image and immediately boot it in local
|
||||
-qemu, do:
|
||||
-
|
||||
- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot
|
||||
-
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
@@ -522,9 +517,6 @@ This is similar to I<-o local>, except that a shell script is written
|
||||
which you can use to boot the guest in qemu. The converted disks and
|
||||
shell script are written to the directory specified by I<-os>.
|
||||
|
||||
-When using this output mode, you can also specify the I<-oo qemu-boot>
|
||||
-option which boots the guest under qemu immediately.
|
||||
-
|
||||
=item B<-o> B<rhev>
|
||||
|
||||
This is the same as I<-o rhv>.
|
||||
@@ -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>
|
||||
volume property.
|
||||
|
||||
-=item B<-oo qemu-boot>
|
||||
-
|
||||
-When using I<-o qemu> only, this boots the guest immediately after
|
||||
-virt-v2v finishes.
|
||||
-
|
||||
=item B<-oo verify-server-certificate>
|
||||
|
||||
=item B<-oo verify-server-certificate=>C<true|false>
|
||||
@@ -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.
|
||||
See L</Networks and bridges>.
|
||||
|
||||
-=item B<--qemu-boot>
|
||||
-
|
||||
-This is the same as I<-oo qemu-boot>.
|
||||
-
|
||||
=item B<-q>
|
||||
|
||||
=item B<--quiet>
|
||||
diff --git a/output/output_qemu.ml b/output/output_qemu.ml
|
||||
index 07dae8c2..b6f24565 100644
|
||||
--- a/output/output_qemu.ml
|
||||
+++ b/output/output_qemu.ml
|
||||
@@ -65,6 +65,9 @@ module QEMU = struct
|
||||
let compressed = !compressed
|
||||
and qemu_boot = !qemu_boot in
|
||||
|
||||
+ if qemu_boot then
|
||||
+ error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL");
|
||||
+
|
||||
(* -os must be set to a directory. *)
|
||||
let output_storage =
|
||||
match options.output_storage with
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 3b2eafbd..696ef75e 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -275,8 +275,6 @@ let rec main () =
|
||||
s_"Same as ‘-ip filename’";
|
||||
[ L"print-source" ], Getopt.Set print_source,
|
||||
s_"Print source and stop";
|
||||
- [ L"qemu-boot" ], Getopt.Unit (fun () -> set_output_option_compat "qemu-boot" ""),
|
||||
- s_"Boot in qemu (-o qemu only)";
|
||||
[ L"root" ], Getopt.String ("ask|... ", set_root_choice),
|
||||
s_"How to choose root filesystem";
|
||||
[ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
|
@ -0,0 +1,31 @@
|
||||
From bf87b2e9ca569c42d5446d65de03f6dc53474c22 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 24 Apr 2015 09:45:41 -0400
|
||||
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
|
||||
(RHBZ#1176493).
|
||||
|
||||
---
|
||||
lib/utils.ml | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/utils.ml b/lib/utils.ml
|
||||
index bf010a0a..4c9b7415 100644
|
||||
--- a/lib/utils.ml
|
||||
+++ b/lib/utils.ml
|
||||
@@ -60,13 +60,14 @@ let kvm_arch = function
|
||||
(* Does qemu support the given sound card? *)
|
||||
let qemu_supports_sound_card = function
|
||||
| Types.AC97
|
||||
- | Types.ES1370
|
||||
| Types.ICH6
|
||||
| Types.ICH9
|
||||
| Types.PCSpeaker
|
||||
+ -> true
|
||||
+ | Types.ES1370
|
||||
| Types.SB16
|
||||
| Types.USBAudio
|
||||
- -> true
|
||||
+ -> false
|
||||
|
||||
(* Find the UEFI firmware. *)
|
||||
let find_uefi_firmware guest_arch =
|
136
0010-RHEL-Fixes-for-libguestfs-winsupport.patch
Normal file
136
0010-RHEL-Fixes-for-libguestfs-winsupport.patch
Normal file
@ -0,0 +1,136 @@
|
||||
From 74a5bc4884452366c898a9a000e1b39f4aad30e7 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 30 Aug 2015 03:21:57 -0400
|
||||
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.
|
||||
|
||||
In tests we cannot use guestfish for arbitrary Windows edits.
|
||||
In virt-v2v helpers we must set the program name to virt-v2v.
|
||||
|
||||
For RHEL 9.3 and above, see this comment:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1
|
||||
---
|
||||
convert/convert.ml | 1 +
|
||||
test-data/phony-guests/make-windows-img.sh | 1 +
|
||||
tests/test-v2v-block-driver.sh | 6 +++++-
|
||||
tests/test-v2v-in-place.sh | 8 +++++++-
|
||||
tests/test-v2v-virtio-win-iso.sh | 8 +++++++-
|
||||
tests/test-v2v-windows-conversion.sh | 8 +++++++-
|
||||
6 files changed, 28 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/convert/convert.ml b/convert/convert.ml
|
||||
index d1dfcae8..e424930c 100644
|
||||
--- a/convert/convert.ml
|
||||
+++ b/convert/convert.ml
|
||||
@@ -52,6 +52,7 @@ let rec convert dir options source =
|
||||
|
||||
message (f_"Opening the source");
|
||||
let g = open_guestfs ~identifier:"v2v" () in
|
||||
+ g#set_program "virt-v2v";
|
||||
g#set_memsize (g#get_memsize () * 2);
|
||||
(* Setting the number of vCPUs allows parallel mkinitrd, but make
|
||||
* sure this is not too large because each vCPU consumes guest RAM.
|
||||
diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh
|
||||
index 30908a91..73cf5144 100755
|
||||
--- a/test-data/phony-guests/make-windows-img.sh
|
||||
+++ b/test-data/phony-guests/make-windows-img.sh
|
||||
@@ -37,6 +37,7 @@ fi
|
||||
|
||||
# Create a disk image.
|
||||
guestfish <<EOF
|
||||
+set-program virt-testing
|
||||
sparse windows.img-t 512M
|
||||
run
|
||||
|
||||
diff --git a/tests/test-v2v-block-driver.sh b/tests/test-v2v-block-driver.sh
|
||||
index db59a2cf..a0e56bed 100755
|
||||
--- a/tests/test-v2v-block-driver.sh
|
||||
+++ b/tests/test-v2v-block-driver.sh
|
||||
@@ -100,7 +100,11 @@ check_driver_presence ()
|
||||
|
||||
local virtio_dir="/Windows/Drivers/VirtIO"
|
||||
|
||||
- guestfish --ro -a "$img" -i >$response <<-EOM
|
||||
+ guestfish >$response <<-EOM
|
||||
+ add-ro $img
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ mount-ro /dev/sda2 /
|
||||
is-dir $virtio_dir
|
||||
is-file $virtio_dir/$drv.cat
|
||||
is-file $virtio_dir/$drv.inf
|
||||
diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh
|
||||
index 4373f140..2b31b0bb 100755
|
||||
--- a/tests/test-v2v-in-place.sh
|
||||
+++ b/tests/test-v2v-in-place.sh
|
||||
@@ -89,6 +89,12 @@ mktest ()
|
||||
:> "$script"
|
||||
:> "$expected"
|
||||
|
||||
+cat >> "$script" <<EOF
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ mount /dev/sda2 /
|
||||
+EOF
|
||||
+
|
||||
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
||||
mktest "is-dir \"$firstboot_dir\"" true
|
||||
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
||||
@@ -101,7 +107,7 @@ for drv in netkvm vioscsi viostor; do
|
||||
done
|
||||
done
|
||||
|
||||
-guestfish --ro -a "$img" -i < "$script" > "$response"
|
||||
+guestfish --ro -a "$img" < "$script" > "$response"
|
||||
diff -u "$expected" "$response"
|
||||
|
||||
# Test the base image remained untouched
|
||||
diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh
|
||||
index 69f6f414..b9b806fb 100755
|
||||
--- a/tests/test-v2v-virtio-win-iso.sh
|
||||
+++ b/tests/test-v2v-virtio-win-iso.sh
|
||||
@@ -82,6 +82,12 @@ mktest ()
|
||||
:> "$script"
|
||||
:> "$expected"
|
||||
|
||||
+cat >> "$script" <<EOF
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ mount /dev/sda2 /
|
||||
+EOF
|
||||
+
|
||||
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
||||
mktest "is-dir \"$firstboot_dir\"" true
|
||||
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
||||
@@ -94,5 +100,5 @@ for drv in netkvm vioscsi viostor; do
|
||||
done
|
||||
done
|
||||
|
||||
-guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response"
|
||||
+guestfish --ro -a "$d/windows-sda" < "$script" > "$response"
|
||||
diff -u "$expected" "$response"
|
||||
diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh
|
||||
index a4cf191d..1ff41f6a 100755
|
||||
--- a/tests/test-v2v-windows-conversion.sh
|
||||
+++ b/tests/test-v2v-windows-conversion.sh
|
||||
@@ -76,6 +76,12 @@ mktest ()
|
||||
:> "$script"
|
||||
:> "$expected"
|
||||
|
||||
+cat >> "$script" <<EOF
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ mount /dev/sda2 /
|
||||
+EOF
|
||||
+
|
||||
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
||||
mktest "is-dir \"$firstboot_dir\"" true
|
||||
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
||||
@@ -88,7 +94,7 @@ for drv in netkvm vioscsi viostor; do
|
||||
done
|
||||
done
|
||||
|
||||
-guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response"
|
||||
+guestfish --ro -a "$d/windows-sda" < "$script" > "$response"
|
||||
diff -u "$expected" "$response"
|
||||
|
||||
# We also update the Registry several times, for firstboot, and (ONLY
|
23
0011-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Normal file
23
0011-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 3d47ae499929a0327d66127987093c4a6f60f733 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 2 Mar 2017 14:21:37 +0100
|
||||
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)
|
||||
|
||||
The SDL output mode is not supported in RHEL's qemu-kvm.
|
||||
---
|
||||
input/input_disk.ml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/input/input_disk.ml b/input/input_disk.ml
|
||||
index 279250fe..c6b819c0 100644
|
||||
--- a/input/input_disk.ml
|
||||
+++ b/input/input_disk.ml
|
||||
@@ -77,7 +77,7 @@ module Disk = struct
|
||||
s_features = [ "acpi"; "apic"; "pae" ];
|
||||
s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *)
|
||||
s_display =
|
||||
- Some { s_display_type = Window; s_keymap = None; s_password = None;
|
||||
+ Some { s_display_type = VNC; s_keymap = None; s_password = None;
|
||||
s_listen = LNoListen; s_port = None };
|
||||
s_sound = None;
|
||||
s_disks = s_disks;
|
124
0012-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Normal file
124
0012-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Normal file
@ -0,0 +1,124 @@
|
||||
From 61b5a3d64e7f9d7dbee97b81a4c6969312152f8a Mon Sep 17 00:00:00 2001
|
||||
From: Pino Toscano <ptoscano@redhat.com>
|
||||
Date: Tue, 26 Mar 2019 09:42:25 +0100
|
||||
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests
|
||||
|
||||
---
|
||||
docs/virt-v2v-support.pod | 104 ++------------------------------------
|
||||
1 file changed, 4 insertions(+), 100 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod
|
||||
index 8b64a5ea..1ffc0f9d 100644
|
||||
--- a/docs/virt-v2v-support.pod
|
||||
+++ b/docs/virt-v2v-support.pod
|
||||
@@ -8,106 +8,10 @@ systems and guests in virt-v2v
|
||||
This page documents which foreign hypervisors, virtualization
|
||||
management systems and guest types that L<virt-v2v(1)> can support.
|
||||
|
||||
-Note this page applies to upstream virt-v2v from
|
||||
-L<http://libguestfs.org> and in downstream distributions of virt-v2v
|
||||
-sometimes features are intentionally removed, or are present but not
|
||||
-supported.
|
||||
-
|
||||
-=head2 Hypervisors (Input)
|
||||
-
|
||||
-=over 4
|
||||
-
|
||||
-=item VMware ESXi
|
||||
-
|
||||
-Must be managed by VMware vCenter E<ge> 5.0 unless VDDK is available.
|
||||
-
|
||||
-=item OVA exported from VMware
|
||||
-
|
||||
-OVAs from other hypervisors will not work.
|
||||
-
|
||||
-=item VMX from VMware
|
||||
-
|
||||
-VMX files generated by other hypervisors will not work.
|
||||
-
|
||||
-=item RHEL 5 Xen
|
||||
-
|
||||
-=item SUSE Xen
|
||||
-
|
||||
-=item Citrix Xen
|
||||
-
|
||||
-Citrix Xen has not been recently tested.
|
||||
-
|
||||
-=item Hyper-V
|
||||
-
|
||||
-Not recently tested. Requires that you export the disk or use
|
||||
-L<virt-p2v(1)> on Hyper-V.
|
||||
-
|
||||
-=item Direct from disk images
|
||||
-
|
||||
-Only disk images exported from supported hypervisors, and using
|
||||
-container formats supported by qemu.
|
||||
-
|
||||
-=item Physical machines
|
||||
-
|
||||
-Using the L<virt-p2v(1)> tool.
|
||||
-
|
||||
-=back
|
||||
-
|
||||
-=head2 Hypervisors (Output)
|
||||
-
|
||||
-QEMU and KVM only.
|
||||
-
|
||||
-=head2 Virtualization management systems (Output)
|
||||
-
|
||||
-=over 4
|
||||
-
|
||||
-=item OpenStack
|
||||
-
|
||||
-=item Red Hat Virtualization (RHV) 4.1 and up
|
||||
-
|
||||
-=item Local libvirt
|
||||
-
|
||||
-And hence L<virsh(1)>, L<virt-manager(1)>, and similar tools.
|
||||
-
|
||||
-=item Local disk
|
||||
-
|
||||
-=back
|
||||
-
|
||||
-=head2 Guests
|
||||
-
|
||||
-=over 4
|
||||
-
|
||||
-=item Red Hat Enterprise Linux 4, 5, 6, 7
|
||||
-
|
||||
-=item CentOS 4, 5, 6, 7
|
||||
-
|
||||
-=item Scientific Linux 4, 5, 6, 7
|
||||
-
|
||||
-=item Oracle Linux
|
||||
-
|
||||
-=item Fedora
|
||||
-
|
||||
-=item SLES 10 and up
|
||||
-
|
||||
-=item OpenSUSE 10 and up
|
||||
-
|
||||
-=item ALT Linux 9 and up
|
||||
-
|
||||
-=item Debian 6 and up
|
||||
-
|
||||
-=item Ubuntu 10.04, 12.04, 14.04, 16.04, and up
|
||||
-
|
||||
-=item Windows XP to Windows 10 / Windows Server 2016
|
||||
-
|
||||
-We use Windows internal version numbers, see
|
||||
-L<https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions>
|
||||
-
|
||||
-Currently NT 5.2 to NT 6.3 are supported.
|
||||
-
|
||||
-See L</WINDOWS> below for additional notes on converting Windows
|
||||
-guests.
|
||||
-
|
||||
-=back
|
||||
+For more information on supported hypervisors, and guest types in
|
||||
+RHEL, please consult the following Knowledgebase article on these
|
||||
+Red Hat Customer Portal:
|
||||
+L<https://access.redhat.com/articles/1351473>.
|
||||
|
||||
=head2 Guest firmware
|
||||
|
554
0013-RHEL-Remove-input-from-Xen.patch
Normal file
554
0013-RHEL-Remove-input-from-Xen.patch
Normal file
@ -0,0 +1,554 @@
|
||||
From c5f170f8431bb7f02d55ef778eb6e8224928ebf6 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2024 09:35:54 +0100
|
||||
Subject: [PATCH] RHEL: Remove input from Xen
|
||||
|
||||
Originally this bug was to remove input from RHEL 5 Xen only. This
|
||||
change actually removes all conversions from Xen as in RHEL 9 we only
|
||||
supported RHEL 5 Xen.
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-37687
|
||||
---
|
||||
docs/Makefile.am | 14 ----
|
||||
docs/virt-v2v-input-xen.pod | 154 ------------------------------------
|
||||
docs/virt-v2v.pod | 52 ++----------
|
||||
input/Makefile.am | 4 +-
|
||||
input/input_xen_ssh.ml | 132 -------------------------------
|
||||
input/input_xen_ssh.mli | 21 -----
|
||||
inspector/inspector.ml | 4 -
|
||||
v2v/v2v.ml | 5 --
|
||||
8 files changed, 6 insertions(+), 380 deletions(-)
|
||||
delete mode 100644 docs/virt-v2v-input-xen.pod
|
||||
delete mode 100644 input/input_xen_ssh.ml
|
||||
delete mode 100644 input/input_xen_ssh.mli
|
||||
|
||||
diff --git a/docs/Makefile.am b/docs/Makefile.am
|
||||
index 156dc18c..214cfc24 100644
|
||||
--- a/docs/Makefile.am
|
||||
+++ b/docs/Makefile.am
|
||||
@@ -23,7 +23,6 @@ EXTRA_DIST = \
|
||||
virt-v2v-hacking.pod \
|
||||
virt-v2v-in-place.pod \
|
||||
virt-v2v-input-vmware.pod \
|
||||
- virt-v2v-input-xen.pod \
|
||||
virt-v2v-inspector.pod \
|
||||
virt-v2v-output-local.pod \
|
||||
virt-v2v-output-openstack.pod \
|
||||
@@ -42,7 +41,6 @@ man_MANS = \
|
||||
virt-v2v-hacking.1 \
|
||||
virt-v2v-in-place.1 \
|
||||
virt-v2v-input-vmware.1 \
|
||||
- virt-v2v-input-xen.1 \
|
||||
virt-v2v-inspector.1 \
|
||||
virt-v2v-output-local.1 \
|
||||
virt-v2v-output-openstack.1 \
|
||||
@@ -58,7 +56,6 @@ noinst_DATA = \
|
||||
$(top_builddir)/website/virt-v2v-hacking.1.html \
|
||||
$(top_builddir)/website/virt-v2v-in-place.1.html \
|
||||
$(top_builddir)/website/virt-v2v-input-vmware.1.html \
|
||||
- $(top_builddir)/website/virt-v2v-input-xen.1.html \
|
||||
$(top_builddir)/website/virt-v2v-inspector.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-local.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-openstack.1.html \
|
||||
@@ -115,17 +112,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod
|
||||
$<
|
||||
touch $@
|
||||
|
||||
-virt-v2v-input-xen.1 $(top_builddir)/website/virt-v2v-input-xen.1.html: stamp-virt-v2v-input-xen.pod
|
||||
-
|
||||
-stamp-virt-v2v-input-xen.pod: virt-v2v-input-xen.pod
|
||||
- $(PODWRAPPER) \
|
||||
- --man virt-v2v-input-xen.1 \
|
||||
- --html $(top_builddir)/website/virt-v2v-input-xen.1.html \
|
||||
- --license GPLv2+ \
|
||||
- --warning safe \
|
||||
- $<
|
||||
- touch $@
|
||||
-
|
||||
virt-v2v-inspector.1 $(top_builddir)/website/virt-v2v-inspector.1.html: stamp-virt-v2v-inspector.pod
|
||||
|
||||
stamp-virt-v2v-inspector.pod: virt-v2v-inspector.pod
|
||||
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
|
||||
deleted file mode 100644
|
||||
index 4a0544f8..00000000
|
||||
--- a/docs/virt-v2v-input-xen.pod
|
||||
+++ /dev/null
|
||||
@@ -1,154 +0,0 @@
|
||||
-=head1 NAME
|
||||
-
|
||||
-virt-v2v-input-xen - Using virt-v2v to convert guests from Xen
|
||||
-
|
||||
-=head1 SYNOPSIS
|
||||
-
|
||||
- virt-v2v -ic 'xen+ssh://root@xen.example.com'
|
||||
- -ip passwordfile
|
||||
- GUEST_NAME [-o* options]
|
||||
-
|
||||
-=head1 DESCRIPTION
|
||||
-
|
||||
-This page documents how to use L<virt-v2v(1)> to convert guests from
|
||||
-RHEL 5 Xen, or SLES and OpenSUSE Xen hosts.
|
||||
-
|
||||
-=head1 INPUT FROM XEN
|
||||
-
|
||||
-=head2 SSH authentication
|
||||
-
|
||||
-You can use SSH password authentication, by supplying the name of a
|
||||
-file containing the password to the I<-ip> option (note this option
|
||||
-does I<not> take the password directly). You may need to adjust
|
||||
-F</etc/ssh/sshd_config> on the Xen server to set
|
||||
-C<PasswordAuthentication yes>.
|
||||
-
|
||||
-If you are not using password authentication, an alternative is to use
|
||||
-ssh-agent, and add your ssh public key to
|
||||
-F</root/.ssh/authorized_keys> (on the Xen host). After doing this,
|
||||
-you should check that passwordless access works from the virt-v2v
|
||||
-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>:
|
||||
-
|
||||
- Host xen.example.com
|
||||
- KexAlgorithms +diffie-hellman-group14-sha1
|
||||
- MACs +hmac-sha1
|
||||
- HostKeyAlgorithms +ssh-rsa
|
||||
- PubkeyAcceptedKeyTypes +ssh-rsa
|
||||
- PubkeyAcceptedAlgorithms +ssh-rsa
|
||||
-
|
||||
-(C<PubkeyAcceptedKeyTypes> and C<PubkeyAcceptedAlgorithms> have
|
||||
-identical meaning; the former is the old option name, the latter is the
|
||||
-new one. Virt-v2v uses both C<libssh> and C<ssh> when converting a guest
|
||||
-from Xen, and on some operating systems, C<libssh> and C<ssh> may not
|
||||
-both accept the same option variant.)
|
||||
-
|
||||
-When connecting to RHEL 5 sshd from RHEL 9, the SHA1 algorithm's use in
|
||||
-signatures has to be re-enabled at the OpenSSL level, in addition to the
|
||||
-above SSH configuration. Create a file called F<$HOME/openssl-sha1.cnf>
|
||||
-with the following contents:
|
||||
-
|
||||
- .include /etc/ssl/openssl.cnf
|
||||
- [openssl_init]
|
||||
- alg_section = evp_properties
|
||||
- [evp_properties]
|
||||
- rh-allow-sha1-signatures = yes
|
||||
-
|
||||
-and export the following variable into the environment of the
|
||||
-C<virt-v2v> process:
|
||||
-
|
||||
- OPENSSL_CONF=$HOME/openssl-sha1.cnf
|
||||
-
|
||||
-Note that the C<OPENSSL_CONF> environment variable will only take effect
|
||||
-if the libvirt client library used by virt-v2v is at least version
|
||||
-8.6.0.
|
||||
-
|
||||
-=head2 Test libvirt connection to remote Xen host
|
||||
-
|
||||
-Use the L<virsh(1)> command to list the guests on the remote Xen host:
|
||||
-
|
||||
- $ virsh -c xen+ssh://root@xen.example.com list --all
|
||||
- Id Name State
|
||||
- ----------------------------------------------------
|
||||
- 0 Domain-0 running
|
||||
- - rhel49-x86_64-pv shut off
|
||||
-
|
||||
-You should also try dumping the metadata from any guest on your
|
||||
-server, like this:
|
||||
-
|
||||
- $ virsh -c xen+ssh://root@xen.example.com dumpxml rhel49-x86_64-pv
|
||||
- <domain type='xen'>
|
||||
- <name>rhel49-x86_64-pv</name>
|
||||
- [...]
|
||||
- </domain>
|
||||
-
|
||||
-B<If the above commands do not work, then virt-v2v is not going to
|
||||
-work either>. Fix your libvirt configuration or the remote server
|
||||
-before continuing.
|
||||
-
|
||||
-B<If the guest disks are located on a host block device>, then the
|
||||
-conversion will fail. See L</Xen or ssh conversions from block devices>
|
||||
-below for a workaround.
|
||||
-
|
||||
-=head2 Importing a guest
|
||||
-
|
||||
-To import a particular guest from a Xen server, do:
|
||||
-
|
||||
- $ virt-v2v -ic 'xen+ssh://root@xen.example.com' \
|
||||
- rhel49-x86_64-pv \
|
||||
- -o local -os /var/tmp
|
||||
-
|
||||
-where C<rhel49-x86_64-pv> is the name of the guest (which must be shut
|
||||
-down).
|
||||
-
|
||||
-In this case the output flags are set to write the converted guest to
|
||||
-a temporary directory as this is just an example, but you can also
|
||||
-write to libvirt or any other supported target.
|
||||
-
|
||||
-=head2 Xen or ssh conversions from block devices
|
||||
-
|
||||
-Currently virt-v2v cannot directly access a Xen guest (or any guest
|
||||
-located remotely over ssh) if that guest’s disks are located on host
|
||||
-block devices.
|
||||
-
|
||||
-To tell if a Xen guest uses host block devices, look at the guest XML.
|
||||
-You will see:
|
||||
-
|
||||
- <disk type='block' device='disk'>
|
||||
- ...
|
||||
- <source dev='/dev/VG/guest'/>
|
||||
-
|
||||
-where C<type='block'>, C<source dev=> and C</dev/...> are all
|
||||
-indications that the disk is located on a host block device.
|
||||
-
|
||||
-This happens because the qemu ssh block driver that we use to access
|
||||
-remote disks uses the ssh sftp protocol, and this protocol cannot
|
||||
-correctly detect the size of host block devices.
|
||||
-
|
||||
-The workaround is to copy the block device from the remote Xen
|
||||
-server to a regular local file, copy the libvirt guest XML,
|
||||
-adjust the C<disk> element to point to the local file, and use
|
||||
-C<-i libvirtxml> mode instead.
|
||||
-
|
||||
-=head1 SEE ALSO
|
||||
-
|
||||
-L<virt-v2v(1)>.
|
||||
-
|
||||
-=head1 AUTHOR
|
||||
-
|
||||
-Richard W.M. Jones
|
||||
-
|
||||
-=head1 COPYRIGHT
|
||||
-
|
||||
-Copyright (C) 2009-2020 Red Hat Inc.
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 725d6436..0c78f07c 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -11,7 +11,7 @@ virt-v2v - Convert a guest to use KVM
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Virt-v2v converts a single guest from a foreign hypervisor to run on
|
||||
-KVM. It can read Linux and Windows guests running on VMware, Xen,
|
||||
+KVM. It can read Linux and Windows guests running on VMware,
|
||||
Hyper-V and some other hypervisors, and convert them to KVM managed by
|
||||
libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several
|
||||
other targets. It can modify the guest to make it bootable on KVM and
|
||||
@@ -50,8 +50,6 @@ management systems, guests.
|
||||
|
||||
L<virt-v2v-input-vmware(1)> — Input from VMware.
|
||||
|
||||
-L<virt-v2v-input-xen(1)> — Input from Xen.
|
||||
-
|
||||
L<virt-v2v-output-local(1)> — Output to local files or local libvirt.
|
||||
|
||||
L<virt-v2v-output-rhv(1)> — Output to oVirt or RHV.
|
||||
@@ -175,10 +173,6 @@ This is only supported for:
|
||||
|
||||
=item *
|
||||
|
||||
-L<input from Xen|virt-v2v-input-xen(1)>
|
||||
-
|
||||
-=item *
|
||||
-
|
||||
L<input from VMware VMX|virt-v2v-input-vmware(1)/INPUT FROM VMWARE VMX>
|
||||
when using the SSH transport method
|
||||
|
||||
@@ -294,12 +288,10 @@ hypervisor. See L<virt-v2v-input-vmware(1)>.
|
||||
Specify a libvirt connection URI to use when reading the guest. This
|
||||
is only used when S<I<-i libvirt>>.
|
||||
|
||||
-Only local libvirt connections, VMware vCenter connections, or RHEL 5
|
||||
-Xen remote connections can be used. Other remote libvirt connections
|
||||
-will not work in general.
|
||||
+Only local libvirt connections or VMware vCenter connections.
|
||||
+Other remote libvirt connections will not work in general.
|
||||
|
||||
-See also L<virt-v2v-input-vmware(1)>,
|
||||
-L<virt-v2v-input-xen(1)>.
|
||||
+See also L<virt-v2v-input-vmware(1)>.
|
||||
|
||||
=item B<-if> format
|
||||
|
||||
@@ -844,40 +836,6 @@ Enable tracing of libguestfs API calls.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
-=head2 Xen paravirtualized guests
|
||||
-
|
||||
-Older versions of virt-v2v could turn a Xen paravirtualized (PV) guest
|
||||
-into a KVM guest by installing a new kernel. This version of virt-v2v
|
||||
-does I<not> attempt to install any new kernels. Instead it will give
|
||||
-you an error if there are I<only> Xen PV kernels available.
|
||||
-
|
||||
-Therefore before conversion you should check that a regular kernel is
|
||||
-installed. For some older Linux distributions, this means installing
|
||||
-a kernel from the table below:
|
||||
-
|
||||
- RHEL 3 (Does not apply, as there was no Xen PV kernel)
|
||||
-
|
||||
- RHEL 4 i686 with > 10GB of RAM: install 'kernel-hugemem'
|
||||
- i686 SMP: install 'kernel-smp'
|
||||
- other i686: install 'kernel'
|
||||
- x86-64 SMP with > 8 CPUs: install 'kernel-largesmp'
|
||||
- x86-64 SMP: install 'kernel-smp'
|
||||
- other x86-64: install 'kernel'
|
||||
-
|
||||
- RHEL 5 i686: install 'kernel-PAE'
|
||||
- x86-64: install 'kernel'
|
||||
-
|
||||
- SLES 10 i586 with > 10GB of RAM: install 'kernel-bigsmp'
|
||||
- i586 SMP: install 'kernel-smp'
|
||||
- other i586: install 'kernel-default'
|
||||
- x86-64 SMP: install 'kernel-smp'
|
||||
- other x86-64: install 'kernel-default'
|
||||
-
|
||||
- SLES 11+ i586: install 'kernel-pae'
|
||||
- x86-64: install 'kernel-default'
|
||||
-
|
||||
- Windows (Does not apply, as there is no Xen PV Windows kernel)
|
||||
-
|
||||
=head2 Enabling virtio
|
||||
|
||||
"Virtio" is the name for a set of drivers which make disk (block
|
||||
@@ -1169,7 +1127,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit
|
||||
ethernet speeds or greater.
|
||||
|
||||
Ensure that the network connections between servers (conversion
|
||||
-server, NFS server, vCenter, Xen) are as fast and as low latency as
|
||||
+server, NFS server, vCenter) are as fast and as low latency as
|
||||
possible.
|
||||
|
||||
=head3 Disk space
|
||||
diff --git a/input/Makefile.am b/input/Makefile.am
|
||||
index 4153f878..2f4ceb0c 100644
|
||||
--- a/input/Makefile.am
|
||||
+++ b/input/Makefile.am
|
||||
@@ -29,7 +29,6 @@ SOURCES_MLI = \
|
||||
input_vcenter_https.mli \
|
||||
input_vddk.mli \
|
||||
input_vmx.mli \
|
||||
- input_xen_ssh.mli \
|
||||
name_from_disk.mli \
|
||||
nbdkit_curl.mli \
|
||||
nbdkit_ssh.mli \
|
||||
@@ -60,8 +59,7 @@ SOURCES_ML = \
|
||||
input_ova.ml \
|
||||
input_vcenter_https.ml \
|
||||
input_vddk.ml \
|
||||
- input_vmx.ml \
|
||||
- input_xen_ssh.ml
|
||||
+ input_vmx.ml
|
||||
|
||||
# We pretend that we're building a C library. automake handles the
|
||||
# compilation of the C sources for us. At the end we take the C
|
||||
diff --git a/input/input_xen_ssh.ml b/input/input_xen_ssh.ml
|
||||
deleted file mode 100644
|
||||
index c4235a4b..00000000
|
||||
--- a/input/input_xen_ssh.ml
|
||||
+++ /dev/null
|
||||
@@ -1,132 +0,0 @@
|
||||
-(* helper-v2v-input
|
||||
- * Copyright (C) 2009-2021 Red Hat Inc.
|
||||
- *
|
||||
- * This program is free software; you can redistribute it and/or modify
|
||||
- * it under the terms of the GNU General Public License as published by
|
||||
- * the Free Software Foundation; either version 2 of the License, or
|
||||
- * (at your option) any later version.
|
||||
- *
|
||||
- * This program is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License along
|
||||
- * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
- *)
|
||||
-
|
||||
-open Printf
|
||||
-open Unix
|
||||
-
|
||||
-open Std_utils
|
||||
-open Tools_utils
|
||||
-open Common_gettext.Gettext
|
||||
-
|
||||
-open Types
|
||||
-open Utils
|
||||
-
|
||||
-open Parse_libvirt_xml
|
||||
-open Input
|
||||
-
|
||||
-module XenSSH = struct
|
||||
- let to_string options args =
|
||||
- let xs = args in
|
||||
- let xs =
|
||||
- match options.input_conn with
|
||||
- | Some ic -> ("-ic " ^ ic) :: xs
|
||||
- | None -> xs in
|
||||
- let xs = "-i libvirt" :: xs in
|
||||
- String.concat " " xs
|
||||
-
|
||||
- let query_input_options () =
|
||||
- printf (f_"No input options can be used in this mode.\n")
|
||||
-
|
||||
- let setup dir options args =
|
||||
- if options.input_options <> [] then
|
||||
- error (f_"no -io (input options) are allowed here");
|
||||
-
|
||||
- if not options.read_only then
|
||||
- error (f_"in-place mode does not work with Xen over SSH source");
|
||||
-
|
||||
- (* Get the guest name. *)
|
||||
- let guest =
|
||||
- match args with
|
||||
- | [arg] -> arg
|
||||
- | _ ->
|
||||
- error (f_"-i libvirt: expecting a libvirt guest name \
|
||||
- on the command line") in
|
||||
-
|
||||
- (* -ic must be set. *)
|
||||
- let input_conn =
|
||||
- match options.input_conn with
|
||||
- | Some ic -> ic
|
||||
- | None ->
|
||||
- error (f_"-i libvirt: expecting -ic parameter for \
|
||||
- Xen over SSH connection") in
|
||||
-
|
||||
- let uri =
|
||||
- try Xml.parse_uri input_conn
|
||||
- with Invalid_argument msg ->
|
||||
- error (f_"could not parse '-ic %s'. Original error message was: %s")
|
||||
- input_conn msg in
|
||||
-
|
||||
- (* Connect to the hypervisor. *)
|
||||
- let conn =
|
||||
- let auth = Libvirt_utils.auth_for_password_file
|
||||
- ?password_file:options.input_password () in
|
||||
- Libvirt.Connect.connect_auth ~name:input_conn auth in
|
||||
-
|
||||
- (* Parse the libvirt XML. *)
|
||||
- let source, disks, _ = parse_libvirt_domain conn guest in
|
||||
-
|
||||
- let server =
|
||||
- match uri.Xml.uri_server with
|
||||
- | Some server -> server
|
||||
- | None ->
|
||||
- error (f_"‘-ic %s’ URL does not contain a host name field")
|
||||
- input_conn in
|
||||
-
|
||||
- let port =
|
||||
- match uri.uri_port with
|
||||
- | 0 | 22 -> None
|
||||
- | i -> Some (string_of_int i) in
|
||||
-
|
||||
- let user = uri.uri_user in
|
||||
-
|
||||
- let password =
|
||||
- match options.input_password with
|
||||
- | None -> None
|
||||
- | Some ip -> Some (Nbdkit_ssh.PasswordFile ip) in
|
||||
-
|
||||
- (* Create an nbdkit instance for each disk. *)
|
||||
- List.iteri (
|
||||
- fun i { d_format = format; d_type } ->
|
||||
- let socket = sprintf "%s/in%d" dir i in
|
||||
- On_exit.unlink socket;
|
||||
-
|
||||
- match d_type with
|
||||
- | NBD _ | HTTP _ -> (* These should never happen? *)
|
||||
- assert false
|
||||
-
|
||||
- | BlockDev _ ->
|
||||
- (* Conversion from a remote block device over SSH isn't
|
||||
- * supported because OpenSSH sftp server doesn't know how
|
||||
- * to get the size of a block device. Therefore we disallow
|
||||
- * this and refer users to the manual.
|
||||
- *)
|
||||
- error (f_"input from xen over ssh does not support disks stored on \
|
||||
- remote block devices. See virt-v2v-input-xen(1) \
|
||||
- section \"Xen or ssh conversions from block devices\".")
|
||||
-
|
||||
- | LocalFile path ->
|
||||
- let cor = dir // "convert" in
|
||||
- let bandwidth = options.bandwidth in
|
||||
- let nbdkit = Nbdkit_ssh.create_ssh ?bandwidth ~cor ?password
|
||||
- ?port ~server ?user path in
|
||||
- let _, pid = Nbdkit.run_unix socket nbdkit in
|
||||
- On_exit.kill pid
|
||||
- ) disks;
|
||||
-
|
||||
- source
|
||||
-end
|
||||
diff --git a/input/input_xen_ssh.mli b/input/input_xen_ssh.mli
|
||||
deleted file mode 100644
|
||||
index fa048231..00000000
|
||||
--- a/input/input_xen_ssh.mli
|
||||
+++ /dev/null
|
||||
@@ -1,21 +0,0 @@
|
||||
-(* virt-v2v
|
||||
- * Copyright (C) 2009-2021 Red Hat Inc.
|
||||
- *
|
||||
- * This program is free software; you can redistribute it and/or modify
|
||||
- * it under the terms of the GNU General Public License as published by
|
||||
- * the Free Software Foundation; either version 2 of the License, or
|
||||
- * (at your option) any later version.
|
||||
- *
|
||||
- * This program is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU General Public License along
|
||||
- * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
- *)
|
||||
-
|
||||
-(** Input from Xen over SSH *)
|
||||
-
|
||||
-module XenSSH : Input.INPUT
|
||||
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
|
||||
index c79dd687..9d9216c8 100644
|
||||
--- a/inspector/inspector.ml
|
||||
+++ b/inspector/inspector.ml
|
||||
@@ -283,10 +283,6 @@ read the man page virt-v2v-inspector(1).
|
||||
| Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK ->
|
||||
(module Input_vddk.VDDK)
|
||||
|
||||
- (* Xen over SSH *)
|
||||
- | Some server, Some "xen+ssh", _ ->
|
||||
- (module Input_xen_ssh.XenSSH)
|
||||
-
|
||||
(* Old virt-v2v also supported qemu+ssh://. However I am
|
||||
* deliberately not supporting this in new virt-v2v. Don't
|
||||
* use virt-v2v if a guest already runs on KVM.
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 696ef75e..be57a699 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -386,7 +386,6 @@ read the man page virt-v2v(1).
|
||||
pr "virt-v2v-2.0\n";
|
||||
pr "libguestfs-rewrite\n";
|
||||
pr "vcenter-https\n";
|
||||
- pr "xen-ssh\n";
|
||||
pr "vddk\n";
|
||||
pr "colours-option\n";
|
||||
pr "vdsm-compat-option\n";
|
||||
@@ -450,10 +449,6 @@ read the man page virt-v2v(1).
|
||||
| Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK ->
|
||||
(module Input_vddk.VDDK)
|
||||
|
||||
- (* Xen over SSH *)
|
||||
- | Some server, Some "xen+ssh", _ ->
|
||||
- (module Input_xen_ssh.XenSSH)
|
||||
-
|
||||
(* Old virt-v2v also supported qemu+ssh://. However I am
|
||||
* deliberately not supporting this in new virt-v2v. Don't
|
||||
* use virt-v2v if a guest already runs on KVM.
|
214
0014-RHEL-Remove-o-glance.patch
Normal file
214
0014-RHEL-Remove-o-glance.patch
Normal file
@ -0,0 +1,214 @@
|
||||
From 2541c4ea5d66008d1a3fd532af0844e247f4680d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 30 Jun 2021 11:15:52 +0100
|
||||
Subject: [PATCH] RHEL: Remove -o glance
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539
|
||||
---
|
||||
docs/virt-v2v-output-openstack.pod | 54 ++----------------------------
|
||||
docs/virt-v2v.pod | 20 -----------
|
||||
output/output_glance.mli | 2 +-
|
||||
tests/test-v2v-o-glance.sh | 3 ++
|
||||
v2v/v2v.ml | 7 +---
|
||||
5 files changed, 7 insertions(+), 79 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod
|
||||
index cd4862b1..54cd276e 100644
|
||||
--- a/docs/virt-v2v-output-openstack.pod
|
||||
+++ b/docs/virt-v2v-output-openstack.pod
|
||||
@@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack
|
||||
[-oo verify-server-certificate=false]
|
||||
[-oo os-username=admin] [-oo os-*=*]
|
||||
|
||||
- virt-v2v [-i* options] -o glance
|
||||
-
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This page documents how to use L<virt-v2v(1)> to convert guests to run
|
||||
-on OpenStack. There are two output modes you can select, but only
|
||||
-I<-o openstack> should be used normally.
|
||||
+on OpenStack.
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -27,15 +24,6 @@ Full description: L</OUTPUT TO OPENSTACK>
|
||||
This is the modern method for uploading to OpenStack via the REST API.
|
||||
Guests can be directly converted into Cinder volumes.
|
||||
|
||||
-=item B<-o glance>
|
||||
-
|
||||
-Full description: L</OUTPUT TO GLANCE>
|
||||
-
|
||||
-This is the old method for uploading to Glance. Unfortunately Glance
|
||||
-is not well suited to storing converted guests (since virt-v2v deals
|
||||
-with "pets" not templated "cattle"), so this method is not recommended
|
||||
-unless you really know what you are doing.
|
||||
-
|
||||
=back
|
||||
|
||||
=head1 OUTPUT TO OPENSTACK
|
||||
@@ -176,48 +164,10 @@ no Cinder volume type is used.
|
||||
The following options are B<not> supported with OpenStack: I<-oa>,
|
||||
I<-of>.
|
||||
|
||||
-=head1 OUTPUT TO GLANCE
|
||||
-
|
||||
-Note this is a legacy option. In most cases you should use
|
||||
-L</OUTPUT TO OPENSTACK> instead.
|
||||
-
|
||||
-To output to OpenStack Glance, use the I<-o glance> option.
|
||||
-
|
||||
-This runs the L<glance(1)> CLI program which must be installed on the
|
||||
-virt-v2v conversion host. For authentication to work, you will need
|
||||
-to set C<OS_*> environment variables. See
|
||||
-L</OpenStack: Authentication> above.
|
||||
-
|
||||
-Virt-v2v adds metadata for the guest to Glance, describing such things
|
||||
-as the guest operating system and what drivers it requires. The
|
||||
-command C<glance image-show> will display the metadata as "Property"
|
||||
-fields such as C<os_type> and C<hw_disk_bus>.
|
||||
-
|
||||
-=head2 Glance and sparseness
|
||||
-
|
||||
-Glance image upload doesn't appear to correctly handle sparseness.
|
||||
-For this reason, using qcow2 will be faster and use less space on the
|
||||
-Glance server. Use the virt-v2v S<I<-of qcow2>> option.
|
||||
-
|
||||
-=head2 Glance and multiple disks
|
||||
-
|
||||
-If the guest has a single disk, then the name of the disk in Glance
|
||||
-will be the name of the guest. You can control this using the I<-on>
|
||||
-option.
|
||||
-
|
||||
-Glance doesn't have a concept of associating multiple disks with a
|
||||
-single guest, and Nova doesn't allow you to boot a guest from multiple
|
||||
-Glance disks either. If the guest has multiple disks, then the first
|
||||
-(assumed to be the system disk) will have the name of the guest, and
|
||||
-the second and subsequent data disks will be called
|
||||
-C<I<guestname>-disk2>, C<I<guestname>-disk3> etc. It may be best to
|
||||
-leave the system disk in Glance, and import the data disks to Cinder.
|
||||
-
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<virt-v2v(1)>,
|
||||
-L<https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html>,
|
||||
-L<glance(1)>.
|
||||
+L<https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html>.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 0c78f07c..b1669a59 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -427,14 +427,6 @@ See L</Networks and bridges> below.
|
||||
|
||||
This is the same as I<-o local>.
|
||||
|
||||
-=item B<-o> B<glance>
|
||||
-
|
||||
-This is a legacy option. You should probably use I<-o openstack>
|
||||
-instead.
|
||||
-
|
||||
-Set the output method to OpenStack Glance. In this mode the converted
|
||||
-guest is uploaded to Glance. See L<virt-v2v-output-openstack(1)>.
|
||||
-
|
||||
=item B<-o> B<kubevirt>
|
||||
|
||||
Set the output method to I<kubevirt>. B<Note the way this mode works
|
||||
@@ -1149,11 +1141,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
|
||||
in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>).
|
||||
|
||||
-=item I<-o glance>
|
||||
-
|
||||
-This temporarily places a full copy of the output disks in
|
||||
-C<$VIRT_V2V_TMPDIR> (or F</var/tmp>).
|
||||
-
|
||||
=item I<-o local>
|
||||
|
||||
=item I<-o qemu>
|
||||
@@ -1339,13 +1326,6 @@ See also L</Starting the libvirt system instance>.
|
||||
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.
|
||||
|
||||
-=item Writing to Glance
|
||||
-
|
||||
-This does I<not> need root (in fact it probably won’t work), but may
|
||||
-require either a special user and/or for you to source a script that
|
||||
-sets authentication environment variables. Consult the Glance
|
||||
-documentation.
|
||||
-
|
||||
=item Writing to block devices
|
||||
|
||||
This normally requires root. See the next section.
|
||||
diff --git a/output/output_glance.mli b/output/output_glance.mli
|
||||
index 972320a2..9befc461 100644
|
||||
--- a/output/output_glance.mli
|
||||
+++ b/output/output_glance.mli
|
||||
@@ -18,4 +18,4 @@
|
||||
|
||||
(** [-o glance] output mode. *)
|
||||
|
||||
-module Glance : Output.OUTPUT
|
||||
+(*module Glance : Output.OUTPUT*)
|
||||
diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh
|
||||
index c0db9115..074b5e16 100755
|
||||
--- a/tests/test-v2v-o-glance.sh
|
||||
+++ b/tests/test-v2v-o-glance.sh
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
+# Feature is disabled in RHEL 9.
|
||||
+exit 77
|
||||
+
|
||||
source ./functions.sh
|
||||
set -e
|
||||
set -x
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index be57a699..1bb44710 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -195,7 +195,6 @@ let rec main () =
|
||||
if !output_mode <> `Not_set then
|
||||
error (f_"%s option used more than once on the command line") "-o";
|
||||
match mode with
|
||||
- | "glance" -> output_mode := `Glance
|
||||
| "kubevirt" -> output_mode := `Kubevirt
|
||||
| "libvirt" -> output_mode := `Libvirt
|
||||
| "disk" | "local" -> output_mode := `Disk
|
||||
@@ -255,7 +254,7 @@ let rec main () =
|
||||
s_"Map network ‘in’ to ‘out’";
|
||||
[ L"no-trim" ], Getopt.String ("-", no_trim_warning),
|
||||
s_"Ignored for backwards compatibility";
|
||||
- [ S 'o' ], Getopt.String ("glance|kubevirt|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode),
|
||||
+ [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode),
|
||||
s_"Set output mode (default: libvirt)";
|
||||
[ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc),
|
||||
s_"Set output allocation mode";
|
||||
@@ -323,8 +322,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
|
||||
virt-v2v -i disk disk.img -o local -os /var/tmp
|
||||
|
||||
-virt-v2v -i disk disk.img -o glance
|
||||
-
|
||||
There is a companion front-end called \"virt-p2v\" which comes as an
|
||||
ISO or CD image that can be booted on physical machines.
|
||||
|
||||
@@ -398,7 +395,6 @@ read the man page virt-v2v(1).
|
||||
pr "input:libvirtxml\n";
|
||||
pr "input:ova\n";
|
||||
pr "input:vmx\n";
|
||||
- pr "output:glance\n";
|
||||
pr "output:kubevirt\n";
|
||||
pr "output:libvirt\n";
|
||||
pr "output:local\n";
|
||||
@@ -491,7 +487,6 @@ read the man page virt-v2v(1).
|
||||
| `Disk -> (module Output_disk.Disk)
|
||||
| `Null -> (module Output_null.Null)
|
||||
| `QEmu -> (module Output_qemu.QEMU)
|
||||
- | `Glance -> (module Output_glance.Glance)
|
||||
| `Kubevirt -> (module Output_kubevirt.Kubevirt)
|
||||
| `Openstack -> (module Output_openstack.Openstack)
|
||||
| `RHV_Upload -> (module Output_rhv_upload.RHVUpload)
|
84
0015-RHEL-Remove-the-in-place-option.patch
Normal file
84
0015-RHEL-Remove-the-in-place-option.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From a23393f008423b68eaa44b0c9c5dbc1ec36c9ccd Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 2 Dec 2021 11:56:05 +0000
|
||||
Subject: [PATCH] RHEL: Remove the --in-place option
|
||||
|
||||
This disables the virt-v2v --in-place option which we do not
|
||||
wish to support in RHEL.
|
||||
---
|
||||
docs/virt-v2v.pod | 8 --------
|
||||
tests/Makefile.am | 1 -
|
||||
v2v/v2v.ml | 8 --------
|
||||
3 files changed, 17 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index b1669a59..9f5bb385 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v).
|
||||
To estimate the disk space needed before conversion, see
|
||||
L<virt-v2v-inspector(1)>.
|
||||
|
||||
-For in-place conversion, there is a separate tool called
|
||||
-L<virt-v2v-in-place(1)>.
|
||||
-
|
||||
=head2 Input and Output
|
||||
|
||||
You normally run virt-v2v with several I<-i*> options controlling the
|
||||
@@ -39,10 +36,6 @@ The input and output sides of virt-v2v are separate and unrelated.
|
||||
Virt-v2v can read from any input and write to any output. Therefore
|
||||
these sides of virt-v2v are documented separately in this manual.
|
||||
|
||||
-Virt-v2v normally copies from the input to the output, called "copying
|
||||
-mode". In this case the source guest is always left unchanged.
|
||||
-In-place conversions may be done using L<virt-v2v-in-place(1)>.
|
||||
-
|
||||
=head2 Other virt-v2v topics
|
||||
|
||||
L<virt-v2v-support(1)> — Supported hypervisors, virtualization
|
||||
@@ -1607,7 +1600,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c
|
||||
|
||||
L<virt-p2v(1)>,
|
||||
L<virt-v2v-inspector(1)>,
|
||||
-L<virt-v2v-in-place(1)>,
|
||||
L<virt-customize(1)>,
|
||||
L<virt-df(1)>,
|
||||
L<virt-filesystems(1)>,
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 723a6506..4bfa1c7a 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -77,7 +77,6 @@ TESTS = \
|
||||
test-v2v-floppy.sh \
|
||||
test-v2v-i-disk.sh \
|
||||
test-v2v-i-ova.sh \
|
||||
- test-v2v-in-place.sh \
|
||||
test-v2v-block-driver.sh \
|
||||
test-v2v-inspector.sh \
|
||||
test-v2v-mac.sh \
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 1bb44710..a30019ac 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -217,12 +217,6 @@ let rec main () =
|
||||
warning (f_"the --vmtype option has been removed and now does nothing")
|
||||
in
|
||||
|
||||
- (* Options that are errors. *)
|
||||
- let in_place_error _ =
|
||||
- error (f_"The --in-place option has been replaced by the \
|
||||
- ‘virt-v2v-in-place’ program")
|
||||
- in
|
||||
-
|
||||
let argspec = [
|
||||
[ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth),
|
||||
s_"Set bandwidth to bits per sec";
|
||||
@@ -246,8 +240,6 @@ let rec main () =
|
||||
s_"Use password from file to connect to input hypervisor";
|
||||
[ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport),
|
||||
s_"Input transport";
|
||||
- [ L"in-place" ], Getopt.Unit in_place_error,
|
||||
- s_"Use virt-v2v-in-place instead";
|
||||
[ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac),
|
||||
s_"Map NIC to network or bridge or assign static IP";
|
||||
[ S 'n'; L"network" ], Getopt.String ("in:out", add_network),
|
22
0016-RHEL-tests-Remove-btrfs-test.patch
Normal file
22
0016-RHEL-tests-Remove-btrfs-test.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 410859a7b81684dfe3229e029cf07e6885d8da89 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 5 Jul 2022 11:58:09 +0100
|
||||
Subject: [PATCH] RHEL: tests: Remove btrfs test
|
||||
|
||||
RHEL does not have btrfs so this test always fails.
|
||||
---
|
||||
tests/Makefile.am | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 4bfa1c7a..a380a9bf 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -101,7 +101,6 @@ TESTS = \
|
||||
test-v2v-sound.sh \
|
||||
test-v2v-virtio-win-iso.sh \
|
||||
test-v2v-fedora-conversion.sh \
|
||||
- test-v2v-fedora-btrfs-conversion.sh \
|
||||
test-v2v-fedora-luks-on-lvm-conversion.sh \
|
||||
test-v2v-fedora-lvm-on-luks-conversion.sh \
|
||||
test-v2v-fedora-md-conversion.sh \
|
157
0017-RHEL-Remove-block-driver-option.patch
Normal file
157
0017-RHEL-Remove-block-driver-option.patch
Normal file
@ -0,0 +1,157 @@
|
||||
From 5a37ac0736a47e96d117a266363cf5a4fad5070e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 28 Apr 2023 12:28:19 +0100
|
||||
Subject: [PATCH] RHEL: Remove --block-driver option
|
||||
|
||||
Go back to the old default of always installing virtio-blk drivers in
|
||||
Windows guests.
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2190387
|
||||
---
|
||||
docs/virt-v2v-in-place.pod | 10 ----------
|
||||
docs/virt-v2v.pod | 10 ----------
|
||||
in-place/in_place.ml | 11 +----------
|
||||
tests/Makefile.am | 1 -
|
||||
v2v/v2v.ml | 11 +----------
|
||||
5 files changed, 2 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod
|
||||
index ce57e229..6e1c5363 100644
|
||||
--- a/docs/virt-v2v-in-place.pod
|
||||
+++ b/docs/virt-v2v-in-place.pod
|
||||
@@ -47,16 +47,6 @@ Display help.
|
||||
|
||||
See I<--network> below.
|
||||
|
||||
-=item B<--block-driver> B<virtio-blk>
|
||||
-
|
||||
-=item B<--block-driver> B<virtio-scsi>
|
||||
-
|
||||
-When choosing a block driver for Windows guests, prefer C<virtio-blk> or
|
||||
-C<virtio-scsi>. The default is C<virtio-blk>.
|
||||
-
|
||||
-Note this has no effect for Linux guests at the moment. That may be
|
||||
-added in future.
|
||||
-
|
||||
=item B<--colors>
|
||||
|
||||
=item B<--colours>
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 9f5bb385..59843d35 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -191,16 +191,6 @@ The options are silently ignored for other input methods.
|
||||
|
||||
See I<--network> below.
|
||||
|
||||
-=item B<--block-driver> B<virtio-blk>
|
||||
-
|
||||
-=item B<--block-driver> B<virtio-scsi>
|
||||
-
|
||||
-When choosing a block driver for Windows guests, prefer C<virtio-blk> or
|
||||
-C<virtio-scsi>. The default is C<virtio-blk>.
|
||||
-
|
||||
-Note this has no effect for Linux guests at the moment. That may be
|
||||
-added in future.
|
||||
-
|
||||
=item B<--colors>
|
||||
|
||||
=item B<--colours>
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index e8c260c2..2049db16 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -43,7 +43,6 @@ let rec main () =
|
||||
|
||||
let bandwidth = ref None in
|
||||
let bandwidth_file = ref None in
|
||||
- let block_driver = ref None in
|
||||
let input_conn = ref None in
|
||||
let input_format = ref None in
|
||||
let input_password = ref None in
|
||||
@@ -157,8 +156,6 @@ let rec main () =
|
||||
let argspec = [
|
||||
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
- [ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver),
|
||||
- s_"Prefer 'virtio-blk' or 'virtio-scsi'";
|
||||
[ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
@@ -214,12 +211,6 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
- let block_driver =
|
||||
- match !block_driver with
|
||||
- | None | Some "virtio-blk" -> Virtio_blk
|
||||
- | Some "virtio-scsi" -> Virtio_SCSI
|
||||
- | Some driver ->
|
||||
- error (f_"unknown block driver ‘--block-driver %s’") driver in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
let print_source = !print_source in
|
||||
@@ -303,7 +294,7 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
||||
- Convert.block_driver = block_driver;
|
||||
+ Convert.block_driver = Virtio_blk;
|
||||
keep_serial_console = true;
|
||||
ks = opthandle.ks;
|
||||
network_map;
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index a380a9bf..1ec1a702 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -77,7 +77,6 @@ TESTS = \
|
||||
test-v2v-floppy.sh \
|
||||
test-v2v-i-disk.sh \
|
||||
test-v2v-i-ova.sh \
|
||||
- test-v2v-block-driver.sh \
|
||||
test-v2v-inspector.sh \
|
||||
test-v2v-mac.sh \
|
||||
test-v2v-machine-readable.sh \
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index a30019ac..fb1ee64d 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -48,7 +48,6 @@ let rec main () =
|
||||
|
||||
let bandwidth = ref None in
|
||||
let bandwidth_file = ref None in
|
||||
- let block_driver = ref None in
|
||||
let input_conn = ref None in
|
||||
let input_format = ref None in
|
||||
let input_password = ref None in
|
||||
@@ -224,8 +223,6 @@ let rec main () =
|
||||
s_"Set bandwidth dynamically from file";
|
||||
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
- [ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver),
|
||||
- s_"Prefer 'virtio-blk' or 'virtio-scsi'";
|
||||
[ L"compressed" ], Getopt.Unit (fun () -> set_output_option_compat "compressed" ""),
|
||||
s_"Compress output file (-of qcow2 only)";
|
||||
[ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
@@ -341,12 +338,6 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
- let block_driver =
|
||||
- match !block_driver with
|
||||
- | None | Some "virtio-blk" -> Virtio_blk
|
||||
- | Some "virtio-scsi" -> Virtio_SCSI
|
||||
- | Some driver ->
|
||||
- error (f_"unknown block driver ‘--block-driver %s’") driver in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
let input_transport =
|
||||
@@ -513,7 +504,7 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
||||
- Convert.block_driver = block_driver;
|
||||
+ Convert.block_driver = Virtio_blk;
|
||||
keep_serial_console = not remove_serial_console;
|
||||
ks = opthandle.ks;
|
||||
network_map;
|
4672
0018-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch
Normal file
4672
0018-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,24 +6,29 @@ set -e
|
||||
# directory. Use it like this:
|
||||
# ./copy-patches.sh
|
||||
|
||||
rhel_version=av-8.3.0
|
||||
project=virt-v2v
|
||||
rhel_version=10.0
|
||||
|
||||
# Check we're in the right directory.
|
||||
if [ ! -f virt-v2v.spec ]; then
|
||||
echo "$0: run this from the directory containing 'virt-v2v.spec'"
|
||||
if [ ! -f $project.spec ]; then
|
||||
echo "$0: run this from the directory containing '$project.spec'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git_checkout=$HOME/d/virt-v2v-rhel-$rhel_version
|
||||
case `id -un` in
|
||||
rjones) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
||||
lacos) git_checkout=$HOME/src/v2v/$project ;;
|
||||
*) git_checkout=$HOME/d/$project-rhel-$rhel_version ;;
|
||||
esac
|
||||
if [ ! -d $git_checkout ]; then
|
||||
echo "$0: $git_checkout does not exist"
|
||||
echo "This script is only for use by the maintainer when preparing a"
|
||||
echo "virt-v2v release on RHEL."
|
||||
echo "$project release on RHEL."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the base version of virt-v2v.
|
||||
version=`grep '^Version:' virt-v2v.spec | awk '{print $2}'`
|
||||
# Get the base version of the project.
|
||||
version=`grep '^Version:' $project.spec | awk '{print $2}'`
|
||||
tag="v$version"
|
||||
|
||||
# Remove any existing patches.
|
||||
@ -31,7 +36,12 @@ git rm -f [0-9]*.patch ||:
|
||||
rm -f [0-9]*.patch
|
||||
|
||||
# Get the patches.
|
||||
(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N --submodule=diff $tag)
|
||||
(
|
||||
cd $git_checkout
|
||||
rm -f [0-9]*.patch
|
||||
git -c core.abbrev=8 format-patch -O/dev/null --subject-prefix=PATCH -N \
|
||||
--submodule=diff --no-signature --patience $tag
|
||||
)
|
||||
mv $git_checkout/[0-9]*.patch .
|
||||
|
||||
# Remove any not to be applied.
|
||||
@ -42,7 +52,7 @@ git add [0-9]*.patch
|
||||
|
||||
# Print out the patch lines.
|
||||
echo
|
||||
echo "--- Copy the following text into virt-v2v.spec file"
|
||||
echo "--- Copy the following text into $project.spec file"
|
||||
echo
|
||||
|
||||
echo "# Patches."
|
||||
|
@ -7,7 +7,7 @@
|
||||
Name: virt-v2v
|
||||
Epoch: 1
|
||||
Version: 2.5.4
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Convert a virtual machine to run on KVM
|
||||
|
||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||
@ -23,6 +23,29 @@ Source2: libguestfs.keyring
|
||||
# Maintainer script which helps with handling patches.
|
||||
Source3: copy-patches.sh
|
||||
|
||||
# Patches are maintained in the following repository:
|
||||
# https://github.com/libguestfs/virt-v2v/commits/rhel-10.0
|
||||
|
||||
# Patches.
|
||||
Patch0001: 0001-Update-common-submodule.patch
|
||||
Patch0002: 0002-convert-windows-Install-blnsvr-from-virtio-win.patch
|
||||
Patch0003: 0003-docs-Add-VDDK-prereq-that-server-must-not-be-in-main.patch
|
||||
Patch0004: 0004-inspector-Add-more-fields-to-the-output.patch
|
||||
Patch0005: 0005-Revert-docs-Remove-paragraph-about-ip-passwords-and-.patch
|
||||
Patch0006: 0006-docs-Update-oo-example-to-use-libvirt-instead-of-RHV.patch
|
||||
Patch0007: 0007-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
|
||||
Patch0008: 0008-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
|
||||
Patch0009: 0009-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
|
||||
Patch0010: 0010-RHEL-Fixes-for-libguestfs-winsupport.patch
|
||||
Patch0011: 0011-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
|
||||
Patch0012: 0012-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
|
||||
Patch0013: 0013-RHEL-Remove-input-from-Xen.patch
|
||||
Patch0014: 0014-RHEL-Remove-o-glance.patch
|
||||
Patch0015: 0015-RHEL-Remove-the-in-place-option.patch
|
||||
Patch0016: 0016-RHEL-tests-Remove-btrfs-test.patch
|
||||
Patch0017: 0017-RHEL-Remove-block-driver-option.patch
|
||||
Patch0018: 0018-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch
|
||||
|
||||
%if !0%{?rhel}
|
||||
# libguestfs hasn't been built on i686 for a while since there is no
|
||||
# kernel built for this architecture any longer and libguestfs rather
|
||||
@ -299,6 +322,23 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 08 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.4-5
|
||||
- RHEL patches:
|
||||
* Select correct qemu binary for -o qemu mode
|
||||
* Disable the --qemu-boot / -oo qemu-boot option
|
||||
* Fix list of supported sound cards to match RHEL qemu
|
||||
* Fixes for libguestfs-winsupport
|
||||
* -i disk: force VNC as display
|
||||
* point to KB for supported v2v hypervisors/guests
|
||||
* Remove -o glance
|
||||
* Remove the --in-place option
|
||||
* tests: Remove btrfs test
|
||||
* Remove --block-driver option
|
||||
- Remove input from Xen
|
||||
resolves: RHEL-37687
|
||||
- Remove -o rhv, -o rhv-upload and -o vdsm modes
|
||||
resolves: RHEL-36712
|
||||
|
||||
* Tue Jun 25 2024 Troy Dawson <tdawson@redhat.com> - 1:2.5.4-4
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user