Import from AlmaLinux stable repository

This commit is contained in:
eabdullin 2025-12-04 13:40:10 +00:00
parent dd99427134
commit 341f500a65
28 changed files with 2088 additions and 63 deletions

View File

@ -0,0 +1,31 @@
From b9259a577edf5532d936af491afd8789e5f7d874 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 11 Mar 2025 11:43:05 +0000
Subject: [PATCH] Update common submodule
Richard W.M. Jones (1):
mlcustomize: Remove dnf --verbose option
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2351282
(cherry picked from commit 97b73320fe8f65e48c514064e4cb1acffa8e1573)
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 18310179..57c2b3f0:
diff --git a/common/mlcustomize/guest_packages.ml b/common/mlcustomize/guest_packages.ml
index 2602fc71..96614b6c 100644
--- a/common/mlcustomize/guest_packages.ml
+++ b/common/mlcustomize/guest_packages.ml
@@ -61,10 +61,7 @@ let install_command packages package_management =
apt-get $apt_opts update
apt-get $apt_opts install %s
" quoted_args
- | "dnf" ->
- sprintf "dnf%s -y install %s"
- (if verbose () then " --verbose" else "")
- quoted_args
+ | "dnf" -> sprintf "dnf -y install %s" quoted_args
| "pisi" -> sprintf "pisi it %s" quoted_args
| "pacman" -> sprintf "pacman -S --noconfirm %s" quoted_args
| "urpmi" -> sprintf "urpmi %s" quoted_args

View File

@ -1,4 +1,4 @@
From f3fc9875d1c9449a74ad8444703bd65f79d47d5d Mon Sep 17 00:00:00 2001
From d42726148753250e741b030a1aff09310fb9938a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 2 Dec 2024 13:25:49 +0000
Subject: [PATCH] build: Remove --with-virt-v2v-nbdkit-python-plugin=...
@ -18,7 +18,6 @@ allowed you to override the default nbdkit-python-plugin name (usually
parameter).
(cherry picked from commit 9e25b211a48804b27228e17d8e123b5f1d44df8b)
(cherry picked from commit d42726148753250e741b030a1aff09310fb9938a)
---
config.sh.in | 1 -
configure.ac | 4 ----

View File

@ -1,4 +1,4 @@
From 134b7aa79cb617c5db5794904254cfb495a1635e Mon Sep 17 00:00:00 2001
From 52bbbfed912b723f5a4618571fbab57cd9d459b7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 2 Dec 2024 13:43:39 +0000
Subject: [PATCH] build: Use nbdcopy and nbdinfo from ./configure
@ -7,7 +7,6 @@ Use the configured binaries, so that (eg) ./configure NBDCOPY=...
will do the right thing.
(cherry picked from commit 5c866e7bb2c7a08a37bb71dea094141802e849e7)
(cherry picked from commit 52bbbfed912b723f5a4618571fbab57cd9d459b7)
---
input/ssh.ml | 4 ++--
lib/config.ml.in | 2 ++

View File

@ -1,4 +1,4 @@
From 9197091bf47218ab2ce3ef31c2d83286bb3ca96b Mon Sep 17 00:00:00 2001
From 7d36586c5a299ecf17ef241063988bc1b9ace2bb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 31 Mar 2025 11:06:09 +0100
Subject: [PATCH] v2v: Use nbdcopy --blkhash in verbose mode
@ -23,7 +23,6 @@ Fixes: https://issues.redhat.com/browse/RHEL-85508
Fixes: https://issues.redhat.com/browse/RHEL-85512
Fixes: https://issues.redhat.com/browse/RHEL-85514
(cherry picked from commit cffd129d8fd47554255d52ad611d58a30b6b9951)
(cherry picked from commit 7d36586c5a299ecf17ef241063988bc1b9ace2bb)
---
lib/utils.ml | 8 ++++++++
lib/utils.mli | 3 +++

View File

@ -0,0 +1,35 @@
From 193ed2a762bf3182d760370739c7add83e89f21c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 4 Apr 2025 14:47:09 +0100
Subject: [PATCH] v2v: Print nbdcopy command in debug output
Commit fd1148f795 ("v2v: Implement --parallel=N for parallel disk
copies") changed how we run nbdcopy from using Tools_utils.run_command
to calling Unix.execvp directly. However a side effect of this is
that we no longer printed the nbdcopy command that we were about to
run in verbose mode. Fix this by printing it in debug output.
Reported-by: Ming Xie
Fixes: https://issues.redhat.com/browse/RHEL-86022
Fixes: commit fd1148f79581b148525eb12154aef7603ccf0baa
(cherry picked from commit 802172c1a868e9287416d26e77a94d01c2d7b871)
---
v2v/v2v.ml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 3436ce14..10d24364 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -713,7 +713,10 @@ and nbdcopy ?request_size output_alloc input_uri output_uri =
if not (quiet ()) then List.push_back cmd "--progress";
if output_alloc = Types.Preallocated then List.push_back cmd "--allocated";
- let args = Array.of_list !cmd in
+ let args = !cmd in
+ debug "%s" (stringify_args args);
+
+ let args = Array.of_list args in
match fork () with
| 0 ->
(* Child process (nbdcopy). *)

View File

@ -1,4 +1,4 @@
From 314476e7aaf9c0d8e9a55239f6d4ea58a9d2ac27 Mon Sep 17 00:00:00 2001
From cd55bd8d160cdcdfe21aaafc15f7a1cefee98b85 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 25 Apr 2025 11:44:15 +0100
Subject: [PATCH] lib/libvirt_utils.ml: Turn live domain error into a warning

View File

@ -0,0 +1,24 @@
From 43dc900cee261bf5b090d63745b2ddcee6590583 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 28 Apr 2025 14:53:21 +0100
Subject: [PATCH] convert: flush output after printing debug information
Make sure this information gets into the log early.
(cherry picked from commit b0494befae461f1f34f5d40a4fb901befbc8e380)
---
convert/convert.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/convert/convert.ml b/convert/convert.ml
index 604902d1..7a27467b 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -301,6 +301,7 @@ and debug_info source inspect
target_nics;
eprintf "mountpoint stats:\n";
List.iter debug_mpstat mpstats;
+ flush Stdlib.stderr
and debug_mpstat { mp_dev = dev; mp_path = path;
mp_statvfs = s; mp_vfs = vfs } =

View File

@ -0,0 +1,69 @@
From d382827a7342a9ee9835d95ed86f864c960d8c71 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 28 Apr 2025 14:53:52 +0100
Subject: [PATCH] convert: Print more readable mountpoint stats
Print mountpoint stats which are more similar to what 'virt-df -h'
prints. This makes them easier to follow.
Before this change:
mountpoint stats:
mountpoint statvfs /dev/sda1 /boot/efi (vfat):
bsize=4096 blocks=65467 bfree=63058 bavail=63058
mountpoint statvfs /dev/sda2 /boot (xfs):
bsize=4096 blocks=130219 bfree=90268 bavail=90268
mountpoint statvfs /dev/vg00/lv_root / (xfs):
bsize=4096 blocks=24956001 bfree=22727257 bavail=22727257
After this change:
mountpoint stats:
Size Used Available Use%
/dev/sda1 /boot (ext4):
510873600 81379328 391917568
487.2M 77.6M 373.8M 15.9%
/dev/sda3 / (xfs): 4820303872 898846720 3921457152
4.5G 857.2M 3.7G 18.6%
(cherry picked from commit 9b786f36ddbb76b1c7857a94c53a8b8479c57ac4)
---
convert/convert.ml | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index 7a27467b..d4d28f68 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -300,11 +300,27 @@ and debug_info source inspect
List.iter (fun nic -> eprintf "%s\n" (string_of_source_nic nic))
target_nics;
eprintf "mountpoint stats:\n";
+ eprintf "%20s %-16s %-16s %-16s %s\n" "" "Size" "Used" "Available" "Use%";
List.iter debug_mpstat mpstats;
flush Stdlib.stderr
+(* The calculations here are similar to virt-df df/output.c *)
and debug_mpstat { mp_dev = dev; mp_path = path;
- mp_statvfs = s; mp_vfs = vfs } =
- eprintf " mountpoint statvfs %s %s (%s):\n" dev path vfs;
- eprintf " bsize=%Ld blocks=%Ld bfree=%Ld bavail=%Ld\n"
- s.Guestfs.bsize s.Guestfs.blocks s.Guestfs.bfree s.Guestfs.bavail
+ mp_statvfs = { G.bsize; G.blocks; G.bfree; G.bavail };
+ mp_vfs = vfs } =
+ let label = sprintf "%s %s (%s):" dev path vfs
+ and size = blocks *^ bsize
+ and used = (blocks -^ bfree) *^ bsize
+ and avail = bavail *^ bsize
+ and percent =
+ if blocks <> 0_L then
+ 100. -. 100. *. (Int64.to_float bfree /. Int64.to_float blocks)
+ else
+ 0. in
+ if String.length label > 20 then
+ eprintf "%s\n%20s " label ""
+ else
+ eprintf "%-20s " label;
+ eprintf "%-16Ld %-16Ld %-16Ld\n" size used avail;
+ eprintf "%20s %-16s %-16s %-16s %.1f%%\n"
+ "" (human_size size) (human_size used) (human_size avail) percent

View File

@ -0,0 +1,97 @@
From 212beda84cd9366b65f73d71664f1a2aaeafc9f8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 10:29:08 +0100
Subject: [PATCH] input: Remove usage of nbdkit-cacheextents-filter
The caching in this filter
(https://libguestfs.org/nbdkit-cacheextents-filter.1.html) is very
simple. It is basically designed so that if a client asks for one
extent at a time (using the NBD flag NBD_CMD_FLAG_REQ_ONE) then we ask
for all the extents that the underlying plugin will give us, and cache
those. However only a single contiguous set of extents is cached, and
any non-contiguous read will blow away the cache.
This was designed entirely to work around the buggy behaviour of
'qemu-img convert', which makes lots of req_one requests like this.
nbdcopy works completely differently, and doesn't have this problem.
nbdcopy also reads non-contiguous stretches of the input from multiple
threads. The filter in this case isn't effective (it doesn't do
anything bad since nbdcopy doesn't use the req_one flag).
In addition, the infamously slow QueryAllocatedBlocks API is only
called from the copy stage, and never (or maybe almost never) from the
conversion stage, so nothing that qemu does could justify caching
extents.
As this filter is essentially useless with current virt-v2v / nbdcopy,
remove its use completely.
(cherry picked from commit 48c4ce8e6cf6f1c390a48245ef0f99233f80cfe8)
---
README | 1 -
input/nbdkit_curl.ml | 5 -----
input/nbdkit_ssh.ml | 5 -----
input/nbdkit_vddk.ml | 5 -----
4 files changed, 16 deletions(-)
diff --git a/README b/README
index 4354754f..e4785166 100644
--- a/README
+++ b/README
@@ -69,7 +69,6 @@ REQUIREMENTS
+ nbdkit-ssh-plugin
+ nbdkit-vddk-plugin
- + nbdkit-cacheextents-filter
+ nbdkit-cow-filter
+ nbdkit-multi-conn-filter
+ nbdkit-rate-filter
diff --git a/input/nbdkit_curl.ml b/input/nbdkit_curl.ml
index 7e13c205..695f6d7c 100644
--- a/input/nbdkit_curl.ml
+++ b/input/nbdkit_curl.ml
@@ -71,11 +71,6 @@ let create_curl ?bandwidth ?cookie_script ?cookie_script_renew ?cor
*)
Nbdkit.add_filter_if_available cmd "retry";
- (* Caching extents speeds up qemu-img, especially its consecutive
- * block_status requests with req_one=1.
- *)
- Nbdkit.add_filter_if_available cmd "cacheextents";
-
(* IMPORTANT! Add the COW filter. It must be furthest away
* except for the rate filter.
*)
diff --git a/input/nbdkit_ssh.ml b/input/nbdkit_ssh.ml
index 1a2d2b56..4aba74f3 100644
--- a/input/nbdkit_ssh.ml
+++ b/input/nbdkit_ssh.ml
@@ -69,11 +69,6 @@ let create_ssh ?bandwidth ?cor ?(retry=true)
if retry then
Nbdkit.add_filter_if_available cmd "retry";
- (* Caching extents speeds up qemu-img, especially its consecutive
- * block_status requests with req_one=1.
- *)
- Nbdkit.add_filter_if_available cmd "cacheextents";
-
(* IMPORTANT! Add the COW filter. It must be furthest away
* except for the rate filter.
*)
diff --git a/input/nbdkit_vddk.ml b/input/nbdkit_vddk.ml
index 0cb45e89..b79c28cc 100644
--- a/input/nbdkit_vddk.ml
+++ b/input/nbdkit_vddk.ml
@@ -140,11 +140,6 @@ See also the virt-v2v-input-vmware(1) manual.") libNN
*)
Nbdkit.add_filter_if_available cmd "retry";
- (* Caching extents speeds up qemu-img, especially its consecutive
- * block_status requests with req_one=1.
- *)
- Nbdkit.add_filter_if_available cmd "cacheextents";
-
(* Split very large requests to avoid out of memory errors on the
* server. Since we're using this filter, also add minblock=512
* although it will make no difference.

View File

@ -0,0 +1,55 @@
From 65a9c8ed09f4cd04ae2176b48c4c9c1f69b08399 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 10:42:46 +0100
Subject: [PATCH] input: Document my findings with nbdkit-noextents-filter
This just adds a comment, so makes no change.
(cherry picked from commit 29fae7985eda1d1cf3e176f123a16b60cac2db53)
---
input/nbdkit_vddk.ml | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/input/nbdkit_vddk.ml b/input/nbdkit_vddk.ml
index b79c28cc..3ba00d55 100644
--- a/input/nbdkit_vddk.ml
+++ b/input/nbdkit_vddk.ml
@@ -140,6 +140,38 @@ See also the virt-v2v-input-vmware(1) manual.") libNN
*)
Nbdkit.add_filter_if_available cmd "retry";
+ (* VDDK's QueryAllocatedBlocks API is infamously slow. It appears
+ * to block all other requests while it is running. This API is
+ * also only called during the copy phase, not during conversion
+ * (or if it is, extremely rarely).
+ *
+ * If fstrim was successful, then trimmed blocks are stored in
+ * the COW filter (see below), and so requests for extents stop
+ * at that layer. However for areas of the disk that fstrim
+ * thinks contain data, we still have to go through to VDDK to
+ * fetch extents.
+ *
+ * We could therefore add nbdkit-noextents-filter here (below COW,
+ * above VDDK plugin) which stops extents requests from going
+ * to VDDK, which would stop QueryAllocatedBlocks ever being
+ * called. In my testing this is a moderate performance win.
+ *
+ * However ... in the case where fstrim failed, or for filesystems
+ * or partitions on the disk that we don't understand, doing this
+ * would mean that those are copied completely, as there would be
+ * no extent data (nbdcopy will still sparsify them on the target,
+ * but we'd have to copy all the bits from VMware). Because
+ * here we don't know if this is the case, be conservative and
+ * actually don't use this filter.
+ *
+ * If used, this filter should be close to the plugin and MUST
+ * be below the COW filter.
+ *
+ * XXX Add some kind of debugging flag so we can test how this
+ * works in production.
+ *)
+ (*Nbdkit.add_filter_if_available cmd "noextents";*)
+
(* Split very large requests to avoid out of memory errors on the
* server. Since we're using this filter, also add minblock=512
* although it will make no difference.

View File

@ -0,0 +1,95 @@
From 7ba9e7322e5828686fee9e71d7ffa17fe406c28a Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 12:47:00 +0100
Subject: [PATCH] input: Add undocumented -io vddk-noextents=true option
This turns on the noextents filter, so that the slow VDDK API
QueryAllocatedBlocks will never be called. This is just so we can
test in production if this is effective or not.
(cherry picked from commit 191b8cf418076ae3766b134ffa96eee048c7eb9d)
---
input/input_vddk.ml | 8 +++++++-
input/nbdkit_vddk.ml | 8 +++-----
input/nbdkit_vddk.mli | 1 +
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/input/input_vddk.ml b/input/input_vddk.ml
index 6444ce18..2edd7294 100644
--- a/input/input_vddk.ml
+++ b/input/input_vddk.ml
@@ -52,6 +52,7 @@ All other settings are optional:
-io vddk-cookie=COOKIE VDDK cookie
-io vddk-libdir=LIBDIR VDDK library parent directory
-io vddk-nfchostport=PORT VDDK nfchostport
+ -io vddk-noextents=true Avoid slow VDDK QueryAllocatedBlocks API
-io vddk-port=PORT VDDK port
-io vddk-snapshot=SNAPSHOT-MOREF
VDDK snapshot moref
@@ -71,6 +72,7 @@ information on these settings.
"cookie";
"libdir";
"nfchostport";
+ "noextents";
"port";
"snapshot";
"thumbprint";
@@ -173,6 +175,9 @@ information on these settings.
try Some (List.assoc "libdir" io_options) with Not_found -> None in
let nfchostport =
try Some (List.assoc "nfchostport" io_options) with Not_found -> None in
+ let noextents =
+ try bool_of_string (List.assoc "noextents" io_options)
+ with Not_found -> false in
let port =
try Some (List.assoc "port" io_options) with Not_found -> None in
let snapshot =
@@ -204,7 +209,8 @@ information on these settings.
Nbdkit_vddk.create_vddk ?bandwidth:options.bandwidth
?config ?cookie ~cor
?libdir ~moref
- ?nfchostport ?password_file:options.input_password ?port
+ ?nfchostport ~noextents
+ ?password_file:options.input_password ?port
~server ?snapshot ~thumbprint ?transports ?user
path in
let _, pid = Nbdkit.run_unix socket nbdkit in
diff --git a/input/nbdkit_vddk.ml b/input/nbdkit_vddk.ml
index 3ba00d55..5c23efd1 100644
--- a/input/nbdkit_vddk.ml
+++ b/input/nbdkit_vddk.ml
@@ -51,7 +51,7 @@ let libNN = sprintf "lib%d" Sys.word_size
(* Create an nbdkit module specialized for reading from VDDK sources. *)
let create_vddk ?bandwidth ?config ?cookie ?cor ?libdir ~moref
- ?nfchostport ?password_file ?port
+ ?nfchostport ~noextents ?password_file ?port
~server ?snapshot ~thumbprint ?transports ?user path =
if not (Nbdkit.is_installed ()) then
error (f_"nbdkit is not installed or not working");
@@ -166,11 +166,9 @@ See also the virt-v2v-input-vmware(1) manual.") libNN
*
* If used, this filter should be close to the plugin and MUST
* be below the COW filter.
- *
- * XXX Add some kind of debugging flag so we can test how this
- * works in production.
*)
- (*Nbdkit.add_filter_if_available cmd "noextents";*)
+ if noextents then
+ Nbdkit.add_filter_if_available cmd "noextents";
(* Split very large requests to avoid out of memory errors on the
* server. Since we're using this filter, also add minblock=512
diff --git a/input/nbdkit_vddk.mli b/input/nbdkit_vddk.mli
index 2345e6e2..ef2082db 100644
--- a/input/nbdkit_vddk.mli
+++ b/input/nbdkit_vddk.mli
@@ -25,6 +25,7 @@ val create_vddk : ?bandwidth:Types.bandwidth ->
?libdir:string ->
moref:string ->
?nfchostport:string ->
+ noextents:bool ->
?password_file:string ->
?port:string ->
server:string ->

View File

@ -0,0 +1,136 @@
From 510f8a451723303d2af527e66c73ff18a03330e8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 12:48:51 +0100
Subject: [PATCH] v2v: Remove --vddk-*, --vdsm-*, --compressed, --qemu-boot
compat options
These were deprecated in commit 0802485f2e ("v2v: Add general
mechanism for input and output options (-io/-oo).", March 2018), and
most of them haven't appeared in any documentation for a long time.
It's time to remove them now.
(cherry picked from commit 471607b01543debfb2f44d9a8aa0dc7a592f5c06)
---
docs/test-docs.sh | 14 --------------
docs/virt-v2v.pod | 4 ----
v2v/v2v.ml | 40 ++--------------------------------------
3 files changed, 2 insertions(+), 56 deletions(-)
diff --git a/docs/test-docs.sh b/docs/test-docs.sh
index 4537e774..59df4344 100755
--- a/docs/test-docs.sh
+++ b/docs/test-docs.sh
@@ -87,20 +87,6 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \
--oo,\
--op,\
--os,\
---vddk-config,\
---vddk-cookie,\
---vddk-libdir,\
---vddk-nfchostport,\
---vddk-port,\
---vddk-snapshot,\
---vddk-thumbprint,\
---vddk-transports,\
---vdsm-compat,\
---vdsm-image-uuid,\
---vdsm-ovf-flavour,\
---vdsm-ovf-output,\
---vdsm-vm-uuid,\
---vdsm-vol-uuid,\
--vmtype,\
$virt_customize_options
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 216e617d..57714022 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -217,10 +217,6 @@ when the output is a tty. If the output of the program is redirected
to a file, ANSI colour sequences are disabled unless you use this
option.
-=item B<--compressed>
-
-This is the same as I<-oo compressed>.
-
=item B<--echo-keys>
When prompting for keys and passphrases, virt-v2v normally turns
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 10d24364..5f36be1c 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -55,27 +55,21 @@ let rec main () =
let input_options = ref [] in
let io_query = ref false in
- let set_input_option_compat k v =
- List.push_back input_options (k, v)
- in
let set_input_option option =
if option = "?" then io_query := true
else (
let k, v = String.split "=" option in
- set_input_option_compat k v
+ List.push_back input_options (k, v)
)
in
let output_options = ref [] in
let oo_query = ref false in
- let set_output_option_compat k v =
- List.push_back output_options (k, v)
- in
let set_output_option option =
if option = "?" then oo_query := true
else (
let k, v = String.split "=" option in
- set_output_option_compat k v
+ List.push_back output_options (k, v)
)
in
@@ -226,8 +220,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"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),
s_"Set input mode (default: libvirt)";
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
@@ -270,34 +262,6 @@ let rec main () =
s_"Print source and stop";
[ 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"),
- s_"Same as -io vddk-config=filename";
- [ L"vddk-cookie" ], Getopt.String ("cookie", set_input_option_compat "vddk-cookie"),
- s_"Same as -io vddk-cookie=filename";
- [ L"vddk-libdir" ], Getopt.String ("libdir", set_input_option_compat "vddk-libdir"),
- s_"Same as -io vddk-libdir=libdir";
- [ L"vddk-nfchostport" ], Getopt.String ("nfchostport", set_input_option_compat "vddk-nfchostport"),
- s_"Same as -io vddk-nfchostport=nfchostport";
- [ L"vddk-port" ], Getopt.String ("port", set_input_option_compat "vddk-port"),
- s_"Same as -io vddk-port=port";
- [ L"vddk-snapshot" ], Getopt.String ("snapshot-moref", set_input_option_compat "vddk-snapshot"),
- s_"Same as -io vddk-snapshot=snapshot-moref";
- [ L"vddk-thumbprint" ], Getopt.String ("thumbprint", set_input_option_compat "vddk-thumbprint"),
- s_"Same as -io vddk-thumbprint=thumbprint";
- [ L"vddk-transports" ], Getopt.String ("transports", set_input_option_compat "vddk-transports"),
- s_"Same as -io vddk-transports=transports";
- [ L"vdsm-compat" ], Getopt.String ("0.10|1.1", set_output_option_compat "vdsm-compat"),
- s_"Same as -oo vdsm-compat=0.10|1.1";
- [ L"vdsm-image-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-image-uuid"),
- s_"Same as -oo vdsm-image-uuid=uuid";
- [ L"vdsm-vol-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vol-uuid"),
- s_"Same as -oo vdsm-vol-uuid=uuid";
- [ L"vdsm-vm-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vm-uuid"),
- s_"Same as -oo vdsm-vm-uuid=uuid";
- [ L"vdsm-ovf-output" ], Getopt.String ("dir", set_output_option_compat "vdsm-ovf-output"),
- s_"Same as -oo vdsm-ovf-output=dir";
- [ L"vdsm-ovf-flavour" ], Getopt.String ("ovirt|rhvexp", set_output_option_compat "vdsm-ovf-flavour"),
- s_"Same as -oo vdsm-ovf-flavour=flavour";
[ L"vmtype" ], Getopt.String ("-", vmtype_warning),
s_"Ignored for backwards compatibility";
] in

View File

@ -0,0 +1,87 @@
From 0fab89ac2c144dc521b9b2cd803801cdbb94fb5c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 12:57:29 +0100
Subject: [PATCH] v2v: Remove --no-trim and --vmtype options
These were removed and changed so the otions do nothing a long time ago:
Related: commit 740c5b10cb ("v2v: Remove --no-trim option.", Apr 2016)
Related: commit 6086c0ffcf ("v2v: Remove the --vmtype option.", Apr 2016)
(cherry picked from commit 3fe878c36f23889426ef9b032a7516a94c1f9af4)
---
bash/virt-v2v | 3 ---
docs/test-docs.sh | 2 --
v2v/v2v.ml | 12 ------------
3 files changed, 17 deletions(-)
diff --git a/bash/virt-v2v b/bash/virt-v2v
index cddd0739..1234134c 100644
--- a/bash/virt-v2v
+++ b/bash/virt-v2v
@@ -34,9 +34,6 @@ _virt_v2v ()
-oa)
COMPREPLY=( $( compgen -W "sparse preallocated" -- "$cur") )
return ;;
- --vmtype)
- COMPREPLY=( $( compgen -W "server desktop" -- "$cur") )
- return ;;
esac
case "$cur" in
diff --git a/docs/test-docs.sh b/docs/test-docs.sh
index 59df4344..1037bf7e 100755
--- a/docs/test-docs.sh
+++ b/docs/test-docs.sh
@@ -78,7 +78,6 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \
--ip,\
--it,\
--in-place,\
---no-trim,\
--password-file,\
--oa,\
--oc,\
@@ -87,7 +86,6 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \
--oo,\
--op,\
--os,\
---vmtype,\
$virt_customize_options
$srcdir/../podcheck.pl virt-v2v-in-place.pod virt-v2v-in-place \
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 5f36be1c..30f317ee 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -205,14 +205,6 @@ let rec main () =
error (f_"unknown -o option: %s") s
in
- (* Options that are ignored for backwards compatibility. *)
- let no_trim_warning _ =
- warning (f_"the --no-trim option has been removed and now does nothing")
- in
- let vmtype_warning _ =
- warning (f_"the --vmtype option has been removed and now does nothing")
- in
-
let argspec = [
[ L"bandwidth" ], Getopt.String ("bps", set_string_option_once "--bandwidth" bandwidth),
s_"Set bandwidth to bits per sec";
@@ -236,8 +228,6 @@ let rec main () =
s_"Map NIC to network or bridge or assign static IP";
[ S 'n'; L"network" ], Getopt.String ("in:out", add_network),
s_"Map network in to out";
- [ L"no-trim" ], Getopt.String ("-", no_trim_warning),
- s_"Ignored for backwards compatibility";
[ 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),
@@ -262,8 +252,6 @@ let rec main () =
s_"Print source and stop";
[ L"root" ], Getopt.String ("ask|... ", set_root_choice),
s_"How to choose root filesystem";
- [ L"vmtype" ], Getopt.String ("-", vmtype_warning),
- s_"Ignored for backwards compatibility";
] in
(* Append virt-customize options. *)

View File

@ -0,0 +1,49 @@
From ce1525716b247b0c8eec8a9f0adb2c4009dcdf23 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 13:53:01 +0100
Subject: [PATCH] v2v: Remove --password-file option
This was changed to '-ip' in commit eb508ba22d ("v2v: Use -ip to pass
input password (instead of --password-file).", June 2018). It also
now can be confused with the similar --password and --password-crypto
options, used by the virt-customize code.
(cherry picked from commit 21d914d6b2443d2f41ef62c7f185e188de4a1aab)
---
docs/test-docs.sh | 2 --
v2v/v2v.ml | 2 --
2 files changed, 4 deletions(-)
diff --git a/docs/test-docs.sh b/docs/test-docs.sh
index 1037bf7e..9a4c58ab 100755
--- a/docs/test-docs.sh
+++ b/docs/test-docs.sh
@@ -78,7 +78,6 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \
--ip,\
--it,\
--in-place,\
---password-file,\
--oa,\
--oc,\
--of,\
@@ -96,7 +95,6 @@ $srcdir/../podcheck.pl virt-v2v-in-place.pod virt-v2v-in-place \
--io,\
--ip,\
--it,\
---password-file,\
--oa,\
--oc,\
--of,\
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 30f317ee..7f1d4352 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -244,8 +244,6 @@ let rec main () =
s_"Use password from file to connect to output hypervisor";
[ M"os" ], Getopt.String ("storage", set_string_option_once "-os" output_storage),
s_"Set output storage location";
- [ L"password-file" ], Getopt.String ("filename", set_string_option_once "-ip" input_password),
- s_"Same as -ip filename";
[ L"parallel" ], Getopt.Set_int ("N", parallel),
s_"Run up to N instances of nbdcopy in parallel";
[ L"print-source" ], Getopt.Set print_source,

View File

@ -1,4 +1,4 @@
From 7b2641bd22350802261b657df5e3d0de92784521 Mon Sep 17 00:00:00 2001
From 63c3d929e947a3c7a37dafd6ba188f38ef8a2bd0 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 13:16:41 +0100
Subject: [PATCH] input/nbdkit_vddk.ml: Rename 'path' parameter to 'file'
@ -8,14 +8,14 @@ The nbdkit parameter is called 'file'. There is no actual change here.
(cherry picked from commit 5acc67d454add0b75f6671c06979a0cc90562f7e)
---
input/input_vddk.ml | 4 ++--
input/nbdkit_vddk.ml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
input/nbdkit_vddk.ml | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/input/input_vddk.ml b/input/input_vddk.ml
index 6444ce18..982dff17 100644
index 2edd7294..659ff08f 100644
--- a/input/input_vddk.ml
+++ b/input/input_vddk.ml
@@ -193,7 +193,7 @@ information on these settings.
@@ -198,7 +198,7 @@ information on these settings.
| BlockDev _ | NBD _ | HTTP _ -> (* These should never happen? *)
assert false
@ -24,9 +24,9 @@ index 6444ce18..982dff17 100644
(* The <source file=...> attribute returned by the libvirt
* VMX driver looks like "[datastore] path". We can use it
* directly as the nbdkit file= parameter, and it is passed
@@ -206,7 +206,7 @@ information on these settings.
?libdir ~moref
?nfchostport ?password_file:options.input_password ?port
@@ -212,7 +212,7 @@ information on these settings.
?nfchostport ~noextents
?password_file:options.input_password ?port
~server ?snapshot ~thumbprint ?transports ?user
- path in
+ file in
@ -34,15 +34,17 @@ index 6444ce18..982dff17 100644
On_exit.kill pid
) disks;
diff --git a/input/nbdkit_vddk.ml b/input/nbdkit_vddk.ml
index 0cb45e89..597ae88f 100644
index 5c23efd1..801182d1 100644
--- a/input/nbdkit_vddk.ml
+++ b/input/nbdkit_vddk.ml
@@ -52,7 +52,7 @@ let libNN = sprintf "lib%d" Sys.word_size
@@ -51,8 +51,8 @@ let libNN = sprintf "lib%d" Sys.word_size
(* Create an nbdkit module specialized for reading from VDDK sources. *)
let create_vddk ?bandwidth ?config ?cookie ?cor ?libdir ~moref
?nfchostport ?password_file ?port
- ?nfchostport ~noextents ?password_file ?port
- ~server ?snapshot ~thumbprint ?transports ?user path =
+ ~server ?snapshot ~thumbprint ?transports ?user file =
+ ?nfchostport ~noextents ?password_file ?port
+ ~server ?snapshot ~thumbprint ?transports ?user file =
if not (Nbdkit.is_installed ()) then
error (f_"nbdkit is not installed or not working");

View File

@ -1,4 +1,4 @@
From 96e4e9a036cfbf069b6383916687c3dac804f55a Mon Sep 17 00:00:00 2001
From fb8a4d851946677d5c79afb575267f17a8b649a5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 29 Apr 2025 13:44:07 +0100
Subject: [PATCH] input: Add -io vddk-file=... option
@ -22,7 +22,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-88543
input/input_vddk.ml | 35 ++++++++++++++++++++++++++--------
3 files changed, 33 insertions(+), 13 deletions(-)
Submodule common 18310179..3da17d53:
Submodule common 57c2b3f0..3873d593:
diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml
index 212a1513..6880fce5 100644
--- a/common/mlstdutils/std_utils.ml
@ -56,6 +56,31 @@ index 72a2d44c..ae6004b2 100644
end
(** Override the List module from stdlib. *)
diff --git a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml
index 4e368152..5f8c1440 100644
--- a/common/mlstdutils/std_utils_tests.ml
+++ b/common/mlstdutils/std_utils_tests.ml
@@ -179,6 +179,12 @@ let test_which ctx =
end;
()
+(* Test List.make. *)
+let test_list_make ctx =
+ assert_equal_stringlist [] (List.make 0 "1");
+ assert_equal_stringlist ["1"; "1"; "1"] (List.make 3 "1");
+ assert_raises (Invalid_argument "make") (fun () -> List.make (-1) "1")
+
(* Suites declaration. *)
let suite =
"mllib Std_utils" >:::
@@ -195,6 +201,7 @@ let suite =
"strings.span" >:: test_string_span;
"strings.chomp" >:: test_string_chomp;
"which" >:: test_which;
+ "list.make" >:: test_list_make;
]
let () =
diff --git a/docs/virt-v2v-input-vmware.pod b/docs/virt-v2v-input-vmware.pod
index b28268c2..80ca560a 100644
--- a/docs/virt-v2v-input-vmware.pod
@ -77,7 +102,7 @@ index b28268c2..80ca560a 100644
=head2 VDDK: Debugging VDDK failures
diff --git a/input/input_vddk.ml b/input/input_vddk.ml
index 982dff17..36d5d624 100644
index 659ff08f..316fe5f8 100644
--- a/input/input_vddk.ml
+++ b/input/input_vddk.ml
@@ -50,6 +50,7 @@ All other settings are optional:
@ -87,16 +112,16 @@ index 982dff17..36d5d624 100644
+ -io vddk-file=FILE Override nbdkit-vddk-plugin file= parameter
-io vddk-libdir=LIBDIR VDDK library parent directory
-io vddk-nfchostport=PORT VDDK nfchostport
-io vddk-port=PORT VDDK port
@@ -69,6 +70,7 @@ information on these settings.
-io vddk-noextents=true Avoid slow VDDK QueryAllocatedBlocks API
@@ -70,6 +71,7 @@ information on these settings.
let vddk_option_keys =
[ "config";
"cookie";
+ "file";
"libdir";
"nfchostport";
"port";
@@ -88,11 +90,6 @@ information on these settings.
"noextents";
@@ -90,11 +92,6 @@ information on these settings.
(key, value)
) options.input_options in
@ -108,7 +133,7 @@ index 982dff17..36d5d624 100644
(* thumbprint is mandatory. *)
if not (List.mem_assoc "thumbprint" io_options) then
error (f_"You must pass the -io vddk-thumbprint option with the \
@@ -135,6 +132,7 @@ information on these settings.
@@ -137,6 +134,7 @@ information on these settings.
(* Parse the libvirt XML. *)
let source, disks, xml = parse_libvirt_domain conn guest in
@ -116,7 +141,7 @@ index 982dff17..36d5d624 100644
(* Find the <vmware:moref> element from the XML. This was added
* in libvirt >= 3.7 and is required.
@@ -183,9 +181,27 @@ information on these settings.
@@ -188,9 +186,27 @@ information on these settings.
let transports =
try Some (List.assoc "transports" io_options) with Not_found -> None in
@ -145,7 +170,7 @@ index 982dff17..36d5d624 100644
let socket = sprintf "%s/in%d" dir i in
On_exit.unlink socket;
@@ -193,7 +209,10 @@ information on these settings.
@@ -198,7 +214,10 @@ information on these settings.
| BlockDev _ | NBD _ | HTTP _ -> (* These should never happen? *)
assert false
@ -157,7 +182,7 @@ index 982dff17..36d5d624 100644
(* The <source file=...> attribute returned by the libvirt
* VMX driver looks like "[datastore] path". We can use it
* directly as the nbdkit file= parameter, and it is passed
@@ -209,7 +228,7 @@ information on these settings.
@@ -215,7 +234,7 @@ information on these settings.
file in
let _, pid = Nbdkit.run_unix socket nbdkit in
On_exit.kill pid

View File

@ -0,0 +1,40 @@
From 8e3d1747271cdf112d05e099302de7520f7f8111 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 30 Apr 2025 13:26:54 +0100
Subject: [PATCH] inspector: Simplify input bandwidth code
We dropped the virt-v2v --bandwidth parameters from
virt-v2v-inspector, but left some dead code around. Simplify that
code.
(cherry picked from commit 7a96d82fb6a6330bc7e667677f62dea64a957188)
---
inspector/inspector.ml | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
index ac26146f..16300d45 100644
--- a/inspector/inspector.ml
+++ b/inspector/inspector.ml
@@ -48,8 +48,6 @@ let rec main () =
else output_file := Some filename
in
- let bandwidth = ref None in
- let bandwidth_file = ref None in
let input_conn = ref None in
let input_format = ref None in
let input_password = ref None in
@@ -313,11 +311,7 @@ read the man page virt-v2v-inspector(1).
(module Input_libvirt.Libvirt_) in
let input_options = {
- Input.bandwidth =
- (match !bandwidth, !bandwidth_file with
- | None, None -> None
- | Some rate, None -> Some (StaticBandwidth rate)
- | rate, Some filename -> Some (DynamicBandwidth (rate, filename)));
+ Input.bandwidth = None;
input_conn = input_conn;
input_format = !input_format;
input_options = !input_options;

View File

@ -0,0 +1,49 @@
From e1b9a34aa4e140d3fafea4d0883d0c29fcc204bb Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 11 Apr 2025 10:01:13 +0100
Subject: [PATCH] docs: Rearrange --root titles
Makes the documentation easier to read instead of having a big block
of text.
(cherry picked from commit c1d8ed9bac616c3ba8a807da350f24c7fa54e56a)
---
docs/virt-v2v.pod | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 57714022..1746afa7 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -774,12 +774,6 @@ This disables progress bars and other unnecessary output.
=item B<--root single>
-=item B<--root first>
-
-=item B<--root> /dev/sdX
-
-=item B<--root> /dev/VG/LV
-
Choose the root filesystem to be converted.
In the case where the virtual machine is dual-boot or multi-boot, or
@@ -798,11 +792,17 @@ VM is found to be multi-boot, then virt-v2v will stop and list the
possible root filesystems and ask the user which to use. This
requires that virt-v2v is run interactively.
+=item B<--root first>
+
S<I<--root first>> means to choose the first root device in the case
of a multi-boot operating system. Since this is a heuristic, it may
sometimes choose the wrong one.
-You can also name a specific root device, eg. S<I<--root /dev/sda2>>
+=item B<--root> /dev/sdX
+
+=item B<--root> /dev/VG/LV
+
+Name a specific root device to convert, eg. S<I<--root /dev/sda2>>
would mean to use the second partition on the first hard drive. If
the named root device does not exist or was not detected as a root
device, then virt-v2v will fail.

View File

@ -0,0 +1,39 @@
From bd20b2429f04d8c7b37fbcce243687413dbe434f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 11 Apr 2025 09:49:06 +0100
Subject: [PATCH] docs: Clarify --root first documentation
Clarify that we don't necessarily choose the default bootloader option
(since we don't collect that information). It's just the first in the
list of roots returned by libguestfs.
What is intentionally not documented here is that libguestfs doesn't
necessarily return the roots in any particular order (eg. it's not
sorted alphabetically). If we fix that in future, we might break how
this option works, so don't document any expectations.
(cherry picked from commit bc936379e20e1aab5f569a577663082411f56dc2)
---
docs/virt-v2v.pod | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 1746afa7..84a7d6ac 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -794,9 +794,12 @@ requires that virt-v2v is run interactively.
=item B<--root first>
-S<I<--root first>> means to choose the first root device in the case
-of a multi-boot operating system. Since this is a heuristic, it may
-sometimes choose the wrong one.
+Choose the first root device in the case of a multi-boot operating
+system. Since this is a heuristic, it may sometimes choose the wrong
+one, and it may not choose the default option from the guest
+bootloader. For predictable results it is better to use
+L<virt-v2v-inspector(1)> to inspect the guest and then specify which
+root you want to convert.
=item B<--root> /dev/sdX

View File

@ -0,0 +1,30 @@
From 26d2ba8c21fefb14b6ad2efb380ef08bff0b3b46 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 11 Apr 2025 10:07:20 +0100
Subject: [PATCH] docs: Remove old paragraph about a bug in Grub
This paragraph dates back to 2011 and is unlikely to be relevant now:
https://github.com/rwmjones/old-virt-v2v/commit/36cc57baf395c5b05cc2174d1c04b386b94aaefd
(cherry picked from commit 3019f70565727fb7f03d475be154b1578ea2c51f)
---
docs/virt-v2v.pod | 6 ------
1 file changed, 6 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 84a7d6ac..d65e13ed 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -810,12 +810,6 @@ would mean to use the second partition on the first hard drive. If
the named root device does not exist or was not detected as a root
device, then virt-v2v will fail.
-Note that there is a bug in grub which prevents it from successfully
-booting a multiboot system if virtio is enabled. Grub is only able to
-boot an operating system from the first virtio disk. Specifically,
-F</boot> must be on the first virtio disk, and it cannot chainload an
-OS which is not in the first virtio disk.
-
=item B<-v>
=item B<--verbose>

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
From c941463a3b555dcd24b1b56abf1916ea273de982 Mon Sep 17 00:00:00 2001
From ca1952901efe18f8ebdbe1aecd54cd8d86d2c890 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 15 May 2025 16:41:30 +0100
Subject: [PATCH] docs: Document -io vddk-file in the main options listing
@ -11,10 +11,10 @@ Fixes: commit 5328142e6a9faae1db99c646991d27badc6efe91
1 file changed, 2 insertions(+)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 216e617d..886ae421 100644
index b946758c..4495e53d 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -328,6 +328,8 @@ See L<virt-v2v-input-vmware(1)> for details.
@@ -324,6 +324,8 @@ See L<virt-v2v-input-vmware(1)> for details.
=item B<-io vddk-cookie=>COOKIE

View File

@ -0,0 +1,125 @@
From 4df2b6c2f033b5122d0da5bbc50e10eebf038076 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 9 Jul 2025 09:38:50 +0100
Subject: [PATCH] vddk: Remove -io vddk-noextents option
Commit 191b8cf418 ("input: Add undocumented -io vddk-noextents=true
option") added an option which could be used to insert the nbdkit
noextents filter on top of the VDDK source. This was designed so we
could test in production if this improved performance (which it
didn't).
Since then we've spent more time investigating problems with
QueryAllocatedBlocks and believe we have a better solution in nbdkit.
See:
https://gitlab.com/nbdkit/nbdkit/-/commit/5a882e74cae3dbaa09bf3b942a02f9947b12f6e5
Reverts: commit 191b8cf418076ae3766b134ffa96eee048c7eb9d
(cherry picked from commit 563c581fd0d68792211edf15632bac3f419888b7)
---
input/input_vddk.ml | 7 +------
input/nbdkit_vddk.ml | 32 +-------------------------------
input/nbdkit_vddk.mli | 1 -
3 files changed, 2 insertions(+), 38 deletions(-)
diff --git a/input/input_vddk.ml b/input/input_vddk.ml
index 316fe5f8..f8b5b523 100644
--- a/input/input_vddk.ml
+++ b/input/input_vddk.ml
@@ -53,7 +53,6 @@ All other settings are optional:
-io vddk-file=FILE Override nbdkit-vddk-plugin file= parameter
-io vddk-libdir=LIBDIR VDDK library parent directory
-io vddk-nfchostport=PORT VDDK nfchostport
- -io vddk-noextents=true Avoid slow VDDK QueryAllocatedBlocks API
-io vddk-port=PORT VDDK port
-io vddk-snapshot=SNAPSHOT-MOREF
VDDK snapshot moref
@@ -74,7 +73,6 @@ information on these settings.
"file";
"libdir";
"nfchostport";
- "noextents";
"port";
"snapshot";
"thumbprint";
@@ -173,9 +171,6 @@ information on these settings.
try Some (List.assoc "libdir" io_options) with Not_found -> None in
let nfchostport =
try Some (List.assoc "nfchostport" io_options) with Not_found -> None in
- let noextents =
- try bool_of_string (List.assoc "noextents" io_options)
- with Not_found -> false in
let port =
try Some (List.assoc "port" io_options) with Not_found -> None in
let snapshot =
@@ -228,7 +223,7 @@ information on these settings.
Nbdkit_vddk.create_vddk ?bandwidth:options.bandwidth
?config ?cookie ~cor
?libdir ~moref
- ?nfchostport ~noextents
+ ?nfchostport
?password_file:options.input_password ?port
~server ?snapshot ~thumbprint ?transports ?user
file in
diff --git a/input/nbdkit_vddk.ml b/input/nbdkit_vddk.ml
index 801182d1..15460b99 100644
--- a/input/nbdkit_vddk.ml
+++ b/input/nbdkit_vddk.ml
@@ -51,7 +51,7 @@ let libNN = sprintf "lib%d" Sys.word_size
(* Create an nbdkit module specialized for reading from VDDK sources. *)
let create_vddk ?bandwidth ?config ?cookie ?cor ?libdir ~moref
- ?nfchostport ~noextents ?password_file ?port
+ ?nfchostport ?password_file ?port
~server ?snapshot ~thumbprint ?transports ?user file =
if not (Nbdkit.is_installed ()) then
error (f_"nbdkit is not installed or not working");
@@ -140,36 +140,6 @@ See also the virt-v2v-input-vmware(1) manual.") libNN
*)
Nbdkit.add_filter_if_available cmd "retry";
- (* VDDK's QueryAllocatedBlocks API is infamously slow. It appears
- * to block all other requests while it is running. This API is
- * also only called during the copy phase, not during conversion
- * (or if it is, extremely rarely).
- *
- * If fstrim was successful, then trimmed blocks are stored in
- * the COW filter (see below), and so requests for extents stop
- * at that layer. However for areas of the disk that fstrim
- * thinks contain data, we still have to go through to VDDK to
- * fetch extents.
- *
- * We could therefore add nbdkit-noextents-filter here (below COW,
- * above VDDK plugin) which stops extents requests from going
- * to VDDK, which would stop QueryAllocatedBlocks ever being
- * called. In my testing this is a moderate performance win.
- *
- * However ... in the case where fstrim failed, or for filesystems
- * or partitions on the disk that we don't understand, doing this
- * would mean that those are copied completely, as there would be
- * no extent data (nbdcopy will still sparsify them on the target,
- * but we'd have to copy all the bits from VMware). Because
- * here we don't know if this is the case, be conservative and
- * actually don't use this filter.
- *
- * If used, this filter should be close to the plugin and MUST
- * be below the COW filter.
- *)
- if noextents then
- Nbdkit.add_filter_if_available cmd "noextents";
-
(* Split very large requests to avoid out of memory errors on the
* server. Since we're using this filter, also add minblock=512
* although it will make no difference.
diff --git a/input/nbdkit_vddk.mli b/input/nbdkit_vddk.mli
index ef2082db..2345e6e2 100644
--- a/input/nbdkit_vddk.mli
+++ b/input/nbdkit_vddk.mli
@@ -25,7 +25,6 @@ val create_vddk : ?bandwidth:Types.bandwidth ->
?libdir:string ->
moref:string ->
?nfchostport:string ->
- noextents:bool ->
?password_file:string ->
?port:string ->
server:string ->

View File

@ -1,4 +1,4 @@
From 4888b96dec2e9670f7d9f239ceb7c57a51114937 Mon Sep 17 00:00:00 2001
From f93106129586d21c5326445b730113744d140ebd Mon Sep 17 00:00:00 2001
From: Vadim Rozenfeld <vrozenfe@redhat.com>
Date: Thu, 10 Jul 2025 10:12:56 +1000
Subject: [PATCH] Modify configure_pnputil_install script to check pending
@ -15,14 +15,12 @@ RWMJ:
Cherry picked from commit 594b05d6940c8719167d10c0cdfaa253349060ab.
I also updated the common submodule to cherry pick
libguestfs-common commit b40e534fefb74af32bd496904e44ce9bca1a7b34
(cherry picked from commit f93106129586d21c5326445b730113744d140ebd)
---
common | 2 +-
convert/convert_windows.ml | 48 +++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 4 deletions(-)
Submodule common 3da17d53..d7e9b334:
Submodule common 3873d593..b48c7d00:
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
index 6aca4c34..5f2642b0 100644
--- a/common/mlcustomize/firstboot.ml

View File

@ -1,4 +1,4 @@
From c655fbd1adb6ccc754b35cd669c4a99eab66883b Mon Sep 17 00:00:00 2001
From 7c27641fc6d0ff1dfa8fe50b1a1ff9532d3c55ab Mon Sep 17 00:00:00 2001
From: Vadim Rozenfeld <vrozenfe@redhat.com>
Date: Tue, 15 Jul 2025 18:35:16 +1000
Subject: [PATCH] Ignore ERROR_NO_MORE_ITEMS status from PnPUtil.
@ -8,7 +8,6 @@ better or newer driver installed.
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
(cherry picked from commit 523aff28975532a4fe715193c28c2ede21741392)
(cherry picked from commit 7c27641fc6d0ff1dfa8fe50b1a1ff9532d3c55ab)
---
convert/convert_windows.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

View File

@ -1,11 +1,10 @@
From c9015bccb28830cde9218d118ffe9ec42df4c29b Mon Sep 17 00:00:00 2001
From 6c75a47977f16ed3ce533cd04f29ef2c30a3f2c1 Mon Sep 17 00:00:00 2001
From: Vadim Rozenfeld <vrozenfe@redhat.com>
Date: Fri, 18 Jul 2025 19:31:34 +1000
Subject: [PATCH] remove timeout before installing virtio-win drivers
Signed-off-by: Vadim Rozenfeld <vrozenfe@redhat.com>
(cherry picked from commit 07192e2bf5e73dd4d3d7d3c1faa940c7a67e2d72)
(cherry picked from commit 6c75a47977f16ed3ce533cd04f29ef2c30a3f2c1)
---
convert/convert_windows.ml | 2 --
1 file changed, 2 deletions(-)

View File

@ -7,7 +7,7 @@ set -e
# ./copy-patches.sh
project=virt-v2v
rhel_version=9.6
rhel_version=9.7
# Check we're in the right directory.
if [ ! -f $project.spec ]; then

View File

@ -8,7 +8,7 @@
Name: virt-v2v
Epoch: 1
Version: 2.7.1
Release: 10%{?dist}
Release: 16%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -61,16 +61,32 @@ Patch0030: 0030-Update-common-submodule.patch
Patch0031: 0031-convert-Use-yum-apt-.-for-package-removals-not-rpm-d.patch
Patch0032: 0032-test-data-phony-fedora-Add-simple-static-bin-sh.patch
Patch0033: 0033-convert-Handle-large-output-from-rpm-ql-command.patch
Patch0034: 0034-build-Remove-with-virt-v2v-nbdkit-python-plugin.patch
Patch0035: 0035-build-Use-nbdcopy-and-nbdinfo-from-.-configure.patch
Patch0036: 0036-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch
Patch0037: 0037-lib-libvirt_utils.ml-Turn-live-domain-error-into-a-w.patch
Patch0038: 0038-input-nbdkit_vddk.ml-Rename-path-parameter-to-file.patch
Patch0039: 0039-input-Add-io-vddk-file-.-option.patch
Patch0040: 0040-docs-Document-io-vddk-file-in-the-main-options-listi.patch
Patch0041: 0041-Modify-configure_pnputil_install-script-to-check.patch
Patch0042: 0042-Ignore-ERROR_NO_MORE_ITEMS-status-from-PnPUtil.patch
Patch0043: 0043-remove-timeout-before-installing-virtio-win-drivers.patch
Patch0034: 0034-Update-common-submodule.patch
Patch0035: 0035-build-Remove-with-virt-v2v-nbdkit-python-plugin.patch
Patch0036: 0036-build-Use-nbdcopy-and-nbdinfo-from-.-configure.patch
Patch0037: 0037-v2v-Use-nbdcopy-blkhash-in-verbose-mode.patch
Patch0038: 0038-v2v-Print-nbdcopy-command-in-debug-output.patch
Patch0039: 0039-lib-libvirt_utils.ml-Turn-live-domain-error-into-a-w.patch
Patch0040: 0040-convert-flush-output-after-printing-debug-informatio.patch
Patch0041: 0041-convert-Print-more-readable-mountpoint-stats.patch
Patch0042: 0042-input-Remove-usage-of-nbdkit-cacheextents-filter.patch
Patch0043: 0043-input-Document-my-findings-with-nbdkit-noextents-fil.patch
Patch0044: 0044-input-Add-undocumented-io-vddk-noextents-true-option.patch
Patch0045: 0045-v2v-Remove-vddk-vdsm-compressed-qemu-boot-compat-opt.patch
Patch0046: 0046-v2v-Remove-no-trim-and-vmtype-options.patch
Patch0047: 0047-v2v-Remove-password-file-option.patch
Patch0048: 0048-input-nbdkit_vddk.ml-Rename-path-parameter-to-file.patch
Patch0049: 0049-input-Add-io-vddk-file-.-option.patch
Patch0050: 0050-inspector-Simplify-input-bandwidth-code.patch
Patch0051: 0051-docs-Rearrange-root-titles.patch
Patch0052: 0052-docs-Clarify-root-first-documentation.patch
Patch0053: 0053-docs-Remove-old-paragraph-about-a-bug-in-Grub.patch
Patch0054: 0054-Add-new-virt-v2v-open-tool.patch
Patch0055: 0055-docs-Document-io-vddk-file-in-the-main-options-listi.patch
Patch0056: 0056-vddk-Remove-io-vddk-noextents-option.patch
Patch0057: 0057-Modify-configure_pnputil_install-script-to-check.patch
Patch0058: 0058-Ignore-ERROR_NO_MORE_ITEMS-status-from-PnPUtil.patch
Patch0059: 0059-remove-timeout-before-installing-virtio-win-drivers.patch
%if !0%{?rhel}
# libguestfs hasn't been built on i686 for a while since there is no
@ -339,6 +355,7 @@ make -C tests TESTS=test-fedora-luks-on-lvm-conversion.sh check
%{_libexecdir}/virt-v2v-in-place
%endif
%{_bindir}/virt-v2v-inspector
%{_bindir}/virt-v2v-open
%{_mandir}/man1/virt-v2v.1*
%{_mandir}/man1/virt-v2v-hacking.1*
%{_mandir}/man1/virt-v2v-input-vmware.1*
@ -347,6 +364,7 @@ make -C tests TESTS=test-fedora-luks-on-lvm-conversion.sh check
%{_mandir}/man1/virt-v2v-in-place.1*
%endif
%{_mandir}/man1/virt-v2v-inspector.1*
%{_mandir}/man1/virt-v2v-open.1*
%{_mandir}/man1/virt-v2v-output-local.1*
%{_mandir}/man1/virt-v2v-output-openstack.1*
%{_mandir}/man1/virt-v2v-output-rhv.1*
@ -372,17 +390,27 @@ make -C tests TESTS=test-fedora-luks-on-lvm-conversion.sh check
%changelog
* Fri Jul 18 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-10
- Fix installation of drivers on firstboot with pending reboots
resolves: RHEL-103421
* Fri May 16 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-8
- Add -io vddk-file option
resolves: RHEL-91098
* Wed Apr 02 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-6
* Fri Jul 18 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-16
- mlcustomize: Remove dnf --verbose option
resolves: RHEL-83289
- Print blkhash of converted image in virt-v2v debugging output
resolves: RHEL-85833
resolves: RHEL-85512
- Print nbdcopy command in debug output
resolves: RHEL-86022
- Turn live domain error into a warning
resolves: RHEL-88543
- Remove usage of nbdkit-cacheextents-filter
resolves: RHEL-88857
- Print better mountpoint stats in debug output
resolves: RHEL-88861
- Remove several ancient, deprecated options
resolves: RHEL-88866
- New tool: virt-v2v-open
resolves: RHEL-88985
- Remove virt-v2v -io vddk-noextents=true option
resolves: RHEL-102618
- Fix installation of drivers on firstboot with pending reboots
resolves: RHEL-100682
* Tue Feb 25 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.1-5
- Rebase to upstream development version 2.7.1