Rebase to upstream 1.45.95.

- Fix q35 error "IDE controllers are unsupported"
- Add virt-v2v and libvirt version in debug output
- Fix -o rhv output mode showing no guests listed
  resolves: rhbz#1637857, rhbz#2032112, rhbz#2027598
This commit is contained in:
Richard W.M. Jones 2021-12-18 11:33:02 +00:00
parent 818a2d3d6a
commit 7f5895afd1
13 changed files with 39 additions and 138 deletions

View File

@ -1,4 +1,4 @@
From a0cc1fcb8f577802908887ed6cf98913f4260481 Mon Sep 17 00:00:00 2001
From 218bef64ae44c8256028ae8b53e4b6ac62e40668 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

View File

@ -1,57 +0,0 @@
From ac59d3b2310511b1537d408b675b19ec9a5d384e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Dec 2021 12:53:41 +0000
Subject: [PATCH] output: Don't use nbdkit-file-plugin cache=none when writing
nbdkit-file-plugin flag cache=none is meant to ensure that the file
plugin does not pollute the page cache. However it doesn't yet work
very well, especially for writing. As you can see here:
https://gitlab.com/nbdkit/nbdkit/-/blob/048d5b9818c88355e596824355269773e5c4f6ad/plugins/file/file.c#L594
it is currently implemented by flushing the whole file (including
parallel requests), and then evicting the data from the page cache.
This implementation is naive. (See nbdcopy copy/file-ops.c for a much
better implementation.)
This causes quite a considerable slow down when writing to a local
file (eg -os local). The penalty varies between machines and possibly
kernels. On my Fedora Rawhide AMD server with 12 cores and SSDs, the
slow down is under 5%. But on my RHEL 9 Intel NUC server with 2 cores
and a hard disk, it makes a really huge difference, nearly doubling
the total time taken.
I left a note in the code that we should fix this in nbdkit and re-add
this option or similar when it is working.
I also removed the fadvise=sequential option. This is associated with
cache=none in the nbdkit documentation, and anyway we are not doing
sequential writes. (This makes no measurable difference in my testing)
---
output/output.ml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index 7e976508..f829fe43 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -98,8 +98,14 @@ let output_to_local_file ?(changeuid = fun f -> f ())
let cmd = Nbdkit.add_arg cmd "file" filename in
let cmd =
if Nbdkit.version nbdkit_config >= (1, 22, 0) then (
- let cmd = Nbdkit.add_arg cmd "fadvise" "sequential" in
- let cmd = Nbdkit.add_arg cmd "cache" "none" in
+ (* nbdkit 1.28 has a very naive implementation of
+ * page cache eviction. We need to copy the one from
+ * nbdcopy copy/file-ops.c. Until then do not use
+ * this flag because it causes a large slow down on
+ * some machines. XXX
+ *)
+ (*let cmd = Nbdkit.add_arg cmd "fadvise" "sequential" in
+ let cmd = Nbdkit.add_arg cmd "cache" "none" in*)
cmd
)
else cmd in
--
2.31.1

View File

@ -1,4 +1,4 @@
From 46ae00f83c2f4459fcdbf090d02a3f5cb4421fe9 Mon Sep 17 00:00:00 2001
From ab9ef03b330e4d222c69655911404c73a75796b6 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
@ -95,7 +95,7 @@ index c4265703..822e4c72 100644
let output_storage =
match options.output_storage with
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index c6746b5d..55aaf514 100644
index a2414598..5bbcc9e9 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -277,8 +277,6 @@ let rec main () =

View File

@ -1,4 +1,4 @@
From b12adf807a16e71764601f5912f98ead7839e25a Mon Sep 17 00:00:00 2001
From 4e0eb0a0ea5d888c5074c04e4c1ffdd1efffc070 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
@ -9,7 +9,7 @@ Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/utils.ml b/lib/utils.ml
index c18a467c..d3e23662 100644
index d6861d08..a2fccf29 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -59,13 +59,14 @@ let kvm_arch = function

View File

@ -1,4 +1,4 @@
From 836076de3059b12d54f098853bf5b35087885eeb Mon Sep 17 00:00:00 2001
From fb1a9d9c2070397209c938d207e4995725797d0c 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.

View File

@ -1,4 +1,4 @@
From 9b570f662ac6e72abeec7271856a08c759a3bca7 Mon Sep 17 00:00:00 2001
From da2dbc6437368a25553616097b57120b88da425e 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)
@ -9,7 +9,7 @@ The SDL output mode is not supported in RHEL's qemu-kvm.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/input/input_disk.ml b/input/input_disk.ml
index ab74dd64..5deb291b 100644
index 0d92f256..753938f6 100644
--- a/input/input_disk.ml
+++ b/input/input_disk.ml
@@ -70,7 +70,7 @@ let rec disk_source dir options args =

View File

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

View File

@ -1,4 +1,4 @@
From d3536cfb1a741b296cd904db303cb002cae4fbfd Mon Sep 17 00:00:00 2001
From 3fe67ae802e810910350e6b77647f2573b8d41d5 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

View File

@ -1,4 +1,4 @@
From 608b966f2f41ccd3e500a16496b9ff1b456d99e0 Mon Sep 17 00:00:00 2001
From 854aeda3efc4befaec21a7854e2ce02e30d34b92 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: Disable -o glance
@ -169,7 +169,7 @@ index c0db9115..074b5e16 100755
set -e
set -x
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 55aaf514..8b85232b 100644
index 5bbcc9e9..335c3171 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -205,7 +205,6 @@ let rec main () =
@ -198,7 +198,7 @@ index 55aaf514..8b85232b 100644
There is a companion front-end called \"virt-p2v\" which comes as an
ISO or CD image that can be booted on physical machines.
@@ -385,7 +382,6 @@ read the man page virt-v2v(1).
@@ -396,7 +393,6 @@ read the man page virt-v2v(1).
pr "input:libvirtxml\n";
pr "input:ova\n";
pr "input:vmx\n";
@ -206,7 +206,7 @@ index 55aaf514..8b85232b 100644
pr "output:json\n";
pr "output:libvirt\n";
pr "output:local\n";
@@ -475,7 +471,6 @@ read the man page virt-v2v(1).
@@ -486,7 +482,6 @@ read the man page virt-v2v(1).
| `Disk -> (module Output_disk.Disk)
| `Null -> (module Output_null.Null)
| `QEmu -> (module Output_qemu.QEMU)

View File

@ -1,4 +1,4 @@
From c4e64b06d8e92cf82fc1fee881876ffe45add057 Mon Sep 17 00:00:00 2001
From 43e0bcece9e257e7ca55cefa34aba856918b629d 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
@ -101,7 +101,7 @@ index 7c101513..4f89d2b2 100644
The I<--machine-readable> option can be used to make the output more
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 8b85232b..6f294d77 100644
index 335c3171..89e432c3 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -183,7 +183,6 @@ let rec main () =
@ -121,7 +121,7 @@ index 8b85232b..6f294d77 100644
[ 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),
@@ -336,7 +333,6 @@ read the man page virt-v2v(1).
@@ -347,7 +344,6 @@ read the man page virt-v2v(1).
(* Dereference the arguments. *)
let args = List.rev !args in
@ -129,7 +129,7 @@ index 8b85232b..6f294d77 100644
let input_conn = !input_conn in
let input_mode = !input_mode in
let input_transport =
@@ -356,9 +352,6 @@ read the man page virt-v2v(1).
@@ -367,9 +363,6 @@ read the man page virt-v2v(1).
let root_choice = !root_choice in
let static_ips = !static_ips in
@ -139,7 +139,7 @@ index 8b85232b..6f294d77 100644
(* No arguments and machine-readable mode? Print out some facts
* about what this binary supports.
*)
@@ -372,7 +365,6 @@ read the man page virt-v2v(1).
@@ -383,7 +376,6 @@ read the man page virt-v2v(1).
pr "vddk\n";
pr "colours-option\n";
pr "vdsm-compat-option\n";

View File

@ -1,44 +0,0 @@
From 2ff5ee8bde44b5d0ff7ff3cbc732abb17c559979 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Dec 2021 21:30:09 +0000
Subject: [PATCH] Revert "output: Don't use nbdkit-file-plugin cache=none when
writing"
I have now fixed the implementation of cache=none in nbdkit, so this
reverts the previous commit (except we still drop fadvise=sequential
as that is not needed).
You must have nbdkit >= 1.29.10 with this commit otherwise performance
will be poor:
https://gitlab.com/nbdkit/nbdkit/-/commit/a956e2e75d6c88eeefecd967505667c9f176e3af
This reverts commit ac59d3b2310511b1537d408b675b19ec9a5d384e.
(cherry picked from commit 5d5383b91280aeb59b84f442ac333dc700a04d0c)
---
output/output.ml | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index f829fe43..414f01eb 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -98,14 +98,7 @@ let output_to_local_file ?(changeuid = fun f -> f ())
let cmd = Nbdkit.add_arg cmd "file" filename in
let cmd =
if Nbdkit.version nbdkit_config >= (1, 22, 0) then (
- (* nbdkit 1.28 has a very naive implementation of
- * page cache eviction. We need to copy the one from
- * nbdcopy copy/file-ops.c. Until then do not use
- * this flag because it causes a large slow down on
- * some machines. XXX
- *)
- (*let cmd = Nbdkit.add_arg cmd "fadvise" "sequential" in
- let cmd = Nbdkit.add_arg cmd "cache" "none" in*)
+ let cmd = Nbdkit.add_arg cmd "cache" "none" in
cmd
)
else cmd in
--
2.31.1

View File

@ -1,2 +1,2 @@
SHA512 (virt-v2v-1.45.94.tar.gz) = d3a7644f08decf50074632df727605c9adcf7fa0eada39c5def99f6f682353a40355e48fe5e2207b976fa3bfa42127a226317f7502f32dc7cc0666efcabb44ce
SHA512 (virt-v2v-1.45.94.tar.gz.sig) = 61d4ba66ceea91312ca1b730179d6ce2a565f2bfab17c7ebd54f5f54f3ac176b922987f217fbb02b6906004ebefb22fb8e66e4c88da579352d643ddbbe175249
SHA512 (virt-v2v-1.45.95.tar.gz) = 2d408d98d8a67f0aed264cb15fb69d9e5ab4f9b31577ae58a0da7d180f705efb81997308fade3018d16b816a3e3e789927c1a1f03ddc9c02883c37ca0f70e3db
SHA512 (virt-v2v-1.45.95.tar.gz.sig) = cfa919ae26f9497f113c85fa320797eca6977cabc91048cbeacc97e596439fdc93fa9feba2fb3ed1164c7e221dc993344faa4ce07214ee2a697dbd0dc06daf77

View File

@ -14,8 +14,8 @@
Name: virt-v2v
Epoch: 1
Version: 1.45.94
Release: 3%{?dist}
Version: 1.45.95
Release: 1%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPLv2+
@ -51,17 +51,15 @@ ExclusiveArch: x86_64
# Downstream (RHEL-only) patches.
%if 0%{?rhel}
# Patches.
Patch0001: 0001-output-Don-t-use-nbdkit-file-plugin-cache-none-when-.patch
Patch0002: 0002-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0003: 0003-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0004: 0004-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0005: 0005-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0006: 0006-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0007: 0007-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0008: 0008-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0009: 0009-RHEL-Disable-o-glance.patch
Patch0010: 0010-RHEL-Remove-the-in-place-option.patch
Patch0011: 0011-Revert-output-Don-t-use-nbdkit-file-plugin-cache-non.patch
Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0006: 0006-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0008: 0008-RHEL-Disable-o-glance.patch
Patch0009: 0009-RHEL-Remove-the-in-place-option.patch
%endif
%if 0%{patches_touch_autotools}
@ -302,13 +300,17 @@ popd
%changelog
* Wed Dec 08 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.94-3
- Rebase to upstream 1.45.94.
* Sat Dec 18 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.95-1
- Rebase to upstream 1.45.95.
- Change video type to VGA (instead of QXL).
- Remove --in-place support properly.
- Remove -o glance support properly.
- Fix quoting with openssh >= 8.7 (RHEL) / 8.8
resolves: rhbz#2011713, rhbz#1961107, rhbz#2027673
- Fix q35 error "IDE controllers are unsupported"
- Add virt-v2v and libvirt version in debug output
- Fix -o rhv output mode showing no guests listed
resolves: rhbz#2011713, rhbz#1961107, rhbz#2027673,
rhbz#1637857, rhbz#2032112, rhbz#2027598
* Wed Aug 18 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.3-3
- Fix conversion of Windows BitLocker guests