import Oracle_OSS virt-v2v-2.10.0-18.0.1.el10_2

This commit is contained in:
AlmaLinux RelEng Bot 2026-08-06 08:37:11 -04:00
parent e4dfb1c7e6
commit fa1b8757a1
31 changed files with 2316 additions and 59 deletions

View File

@ -1,4 +1,4 @@
From 2666493010b1b82d5b8dbb517c9976727b05184f Mon Sep 17 00:00:00 2001
From 63b2ed3a1d3381a5674ff885d28e1104814d52ef Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 11 Feb 2026 19:09:26 -0500
Subject: [PATCH] Update common submodule

View File

@ -1,4 +1,4 @@
From 4e06515083d7effdee91195dbf93082e544a6283 Mon Sep 17 00:00:00 2001
From 0ff94fda02a55353f6ff15ad974e12bc9e31bf3e Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 16 Feb 2026 13:58:08 -0500
Subject: [PATCH] convert: linux: properly match /etc/crypttab

View File

@ -1,4 +1,4 @@
From b820e5e7a6196ee49420b2b78b42aa388e082665 Mon Sep 17 00:00:00 2001
From 0082abe25fbad04ad22f0e6a555142e93b2cdd45 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 3 Mar 2026 21:11:39 +0000
Subject: [PATCH] Update common submodule

View File

@ -1,4 +1,4 @@
From ca7ef07dd45565f194dba8c172ecb29756577db4 Mon Sep 17 00:00:00 2001
From 78edeef5dabb46b4354d4708c4fb35901a771a23 Mon Sep 17 00:00:00 2001
From: sarika <sarika@platform9.com>
Date: Tue, 9 Dec 2025 16:12:14 +0530
Subject: [PATCH] Add --no-fstrim option to disable fstrim during conversion
@ -27,7 +27,7 @@ RWMJ: Added documentation, a test, and larger commit message.
create mode 100755 tests/test-no-fstrim.sh
diff --git a/convert/convert.ml b/convert/convert.ml
index eb51e9b9..1ff87e43 100644
index e3fd41b8..1c1ad2b4 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -40,6 +40,7 @@ type options = {
@ -38,7 +38,7 @@ index eb51e9b9..1ff87e43 100644
}
(* Mountpoint stats, used for free space estimation. *)
@@ -157,8 +158,13 @@ let rec convert input_disks options source =
@@ -156,8 +157,13 @@ let rec convert input_disks options source =
* because unused blocks are marked in the overlay and thus do
* not have to be copied.
*)
@ -67,10 +67,10 @@ index f2a8d662..faf671fc 100644
(** Command line options that get passed through to the conversion code. *)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index eb550da0..5c191889 100644
index 04764832..f1bda76a 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -468,6 +468,10 @@ are mapped to C<out>.
@@ -473,6 +473,10 @@ are mapped to C<out>.
See L</Networks and bridges> below.
@ -81,7 +81,7 @@ index eb550da0..5c191889 100644
=item B<-o> B<disk>
This is the same as I<-o local>.
@@ -1026,6 +1030,8 @@ fstrim support in the Linux kernel is improving gradually, so over
@@ -1039,6 +1043,8 @@ fstrim support in the Linux kernel is improving gradually, so over
time some of these restrictions will be lifted and virt-v2v will work
faster.
@ -91,7 +91,7 @@ index eb550da0..5c191889 100644
=head3 Free space in the guest
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
index 6c2790af..a96d55d9 100644
index 7e490867..e84266ab 100644
--- a/in-place/in_place.ml
+++ b/in-place/in_place.ml
@@ -151,6 +151,7 @@ let rec main () =
@ -111,7 +111,7 @@ index 6c2790af..a96d55d9 100644
[ L"print-source" ], Getopt.Set print_source,
s_"Print source and stop";
[ L"root" ], Getopt.String ("ask|... ", set_root_choice),
@@ -257,6 +260,7 @@ read the man page virt-v2v-in-place(1).
@@ -254,6 +257,7 @@ read the man page virt-v2v-in-place(1).
let customize_ops = get_customize_ops () in
let input_conn = !input_conn in
let input_mode = !input_mode in
@ -119,7 +119,7 @@ index 6c2790af..a96d55d9 100644
let memsize = !memsize in
let output_xml = !output_xml in
let print_source = !print_source in
@@ -329,6 +333,7 @@ read the man page virt-v2v-in-place(1).
@@ -326,6 +330,7 @@ read the man page virt-v2v-in-place(1).
smp;
static_ips;
customize_ops;
@ -128,10 +128,10 @@ index 6c2790af..a96d55d9 100644
(* Before starting the input module, check there is sufficient
diff --git a/in-place/virt-v2v-in-place.pod b/in-place/virt-v2v-in-place.pod
index 7c0a4d90..ac4142ae 100644
index 69d2092e..333a6827 100644
--- a/in-place/virt-v2v-in-place.pod
+++ b/in-place/virt-v2v-in-place.pod
@@ -239,6 +239,10 @@ are mapped to C<out>.
@@ -235,6 +235,10 @@ are mapped to C<out>.
See L<virt-v2v(1)/Networks and bridges>.
@ -194,10 +194,10 @@ index 26770459..65ce71ce 100644
=item B<--quiet>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8e142b09..7182f62b 100644
index 54cfd124..036cd3bb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -92,6 +92,7 @@ TESTS = \
@@ -93,6 +93,7 @@ TESTS = \
test-mac.sh \
test-machine-readable.sh \
test-networks-and-bridges.sh \
@ -205,7 +205,7 @@ index 8e142b09..7182f62b 100644
test-o-glance.sh \
test-o-kubevirt-fedora.sh \
test-o-kubevirt-oo-disk.sh \
@@ -291,6 +292,7 @@ EXTRA_DIST += \
@@ -292,6 +293,7 @@ EXTRA_DIST += \
test-machine-readable.sh \
test-networks-and-bridges-expected.xml \
test-networks-and-bridges.sh \

View File

@ -1,4 +1,4 @@
From 7b88bd2b5c35ec64c704b242ca7eb6b4ab5da977 Mon Sep 17 00:00:00 2001
From bb9ddf65787ec5e04a465da8d2eee303640b5f5f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 15 Apr 2026 11:22:34 +0100
Subject: [PATCH] convert: Stop using maxmem (xfs_repair -m option)
@ -30,10 +30,10 @@ Related: https://redhat.atlassian.net/browse/RHEL-165677
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index 1ff87e43..5aca94f1 100644
index 1c1ad2b4..1df8699a 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -334,13 +334,11 @@ and do_fsck ?(before=false) g =
@@ -333,13 +333,11 @@ and do_fsck ?(before=false) g =
*)
let nomodify = true
(* xfs_repair runs out of memory in the low memory environment

View File

@ -1,4 +1,4 @@
From f217991387a3cda520b1fe954ea9da44e1eea4cd Mon Sep 17 00:00:00 2001
From 5dd78362a45ed3d64811a606b49eba5435361912 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 23 Apr 2026 15:41:31 +0100
Subject: [PATCH] Update common submodule

View File

@ -0,0 +1,68 @@
From d26ac59e9c5b1d8d3d4175c9ef88212c7727f0d3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 18 Apr 2026 09:08:15 +0100
Subject: [PATCH] docs: Show input parameters for -i input methods
Show what input parameters (eg. list of disk images, XML file) should
be used for each input method. This is an attempt to make the
documentation a little clearer.
(cherry picked from commit 6cb43b899a52aa02d99b385fb270a421d58ce084)
---
docs/virt-v2v.pod | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index f1bda76a..945e8dfc 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -266,7 +266,7 @@ Note this options only applies to keys and passphrases for encrypted
devices and partitions, not for passwords used to connect to remote
servers.
-=item B<-i> B<disk>
+=item B<-i> B<disk> disk [disk ...]
Set the input method to I<disk>.
@@ -276,7 +276,7 @@ usually adequate but you can get finer control (eg. of memory and
vCPUs) by using I<-i libvirtxml> instead. Only guests that use a single
disk can be imported this way.
-=item B<-i> B<libvirt>
+=item B<-i> B<libvirt> name|UUID
Set the input method to I<libvirt>. This is the default.
@@ -286,7 +286,7 @@ I<-ic>).
See L</Starting the libvirt system instance> below.
-=item B<-i> B<libvirtxml>
+=item B<-i> B<libvirtxml> guestB<.xml>
Set the input method to I<libvirtxml>.
@@ -295,11 +295,11 @@ This file is read in order to get metadata about the source guest
(such as its name, amount of memory), and also to locate the input
disks. See L</Minimal XML for -i libvirtxml option> below.
-=item B<-i> B<local>
+=item B<-i> B<local> disk [disk ...]
This is the same as I<-i disk>.
-=item B<-i> B<ova>
+=item B<-i> B<ova> guestB<.ova>
Set the input method to I<ova>.
@@ -308,7 +308,7 @@ ova manifest file and check the vmdk volumes for validity (checksums)
as well as analyzing the ovf file, and then convert the guest. See
L<virt-v2v-input-vmware(1)>.
-=item B<-i> B<vmx>
+=item B<-i> B<vmx> guestB<.vmx>|B<ssh://>...
Set the input method to I<vmx>.

View File

@ -0,0 +1,32 @@
From 58103554de82a24b55b79e8319027b19c66f7e14 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 18 Apr 2026 09:09:04 +0100
Subject: [PATCH] docs: -i disk allows multiple disk images
Commit 255722cbf3 ("v2v: Modular virt-v2v") which modularized the
-i disk code silently added the ability to read from multiple disks.
The documentation was not updated and still stated that only a single
disk could be used.
Remove incorrect statement in the documentation.
Fixes: commit 255722cbf39afc0b012e2ac00d16fa6ba2f8c21f
(cherry picked from commit 9b758f808710490ccdb4c35d58b0861b32d295d8)
---
docs/virt-v2v.pod | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 945e8dfc..63d5814e 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -273,8 +273,7 @@ Set the input method to I<disk>.
In this mode you can read a virtual machine disk image with no
metadata. virt-v2v tries to guess the best default metadata. This is
usually adequate but you can get finer control (eg. of memory and
-vCPUs) by using I<-i libvirtxml> instead. Only guests that use a single
-disk can be imported this way.
+vCPUs) by using I<-i libvirtxml> instead.
=item B<-i> B<libvirt> name|UUID

View File

@ -0,0 +1,277 @@
From f748458503b327aedd6af47583f35533db2b472d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 18 Apr 2026 09:54:27 +0100
Subject: [PATCH] -i disk: Allow nbd:// URIs for input disks
As well as converting from local files, you can now convert from NBD
URIs. This feature lets you do things like converting from local
xz-compressed disk images (thus saving space), or from remote NBD
servers, eg:
$ nbdkit -r --filter=xz file windows.xz
$ virt-v2v -i disk nbd://localhost -o ...
or:
$ virt-v2v -i disk nbd+ssh://server/ -o ...
This requires nbdkit-nbd-plugin to proxy to connection. (In future we
could optimize this as noted in comments.)
This is mainly useful for testing, so I didn't yet document or test it
fully. Once we have more confidence in it we can extend the
documentation.
(cherry picked from commit a153d3e66eb3ce2f08c949f6dde483991aa4bd28)
---
docs/virt-v2v.pod | 4 +
input/Makefile.am | 2 +-
input/input_disk.ml | 192 +++++++++++++++++++++++++++-----------------
3 files changed, 124 insertions(+), 74 deletions(-)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 63d5814e..ecb29771 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -275,6 +275,10 @@ metadata. virt-v2v tries to guess the best default metadata. This is
usually adequate but you can get finer control (eg. of memory and
vCPUs) by using I<-i libvirtxml> instead.
+Each disk can be a local file or an C<nbd://> URI if you want to pull
+the guest disk from an NBD server (see L<nbd_connect_uri(3)> for the
+supported URI formats).
+
=item B<-i> B<libvirt> name|UUID
Set the input method to I<libvirt>. This is the default.
diff --git a/input/Makefile.am b/input/Makefile.am
index 0726b9a1..df116c69 100644
--- a/input/Makefile.am
+++ b/input/Makefile.am
@@ -98,7 +98,7 @@ BOBJECTS = $(SOURCES_ML:.ml=.cmo)
XOBJECTS = $(BOBJECTS:.cmo=.cmx)
OCAMLPACKAGES = \
- -package str,unix,guestfs,libvirt \
+ -package str,unix,guestfs,libvirt,nbd \
-I $(top_builddir)/common/utils/.libs \
-I $(top_builddir)/gnulib/lib/.libs \
-I $(top_builddir)/lib \
diff --git a/input/input_disk.ml b/input/input_disk.ml
index a5291031..20cd8214 100644
--- a/input/input_disk.ml
+++ b/input/input_disk.ml
@@ -38,23 +38,134 @@ module Disk = struct
if options.input_options <> [] then
error (f_"no -io (input options) are allowed here");
- if args = [] then
+ let nr_disks = List.length args in
+ if nr_disks = 0 then
error (f_"-i disk: expecting a disk image (filename) \
on the command line");
- (* Check the input files exist and are readable. *)
- List.iter (fun disk -> access disk [R_OK]) args;
+ (* Check nbdkit is installed. *)
+ if not (Nbdkit.is_installed ()) then
+ error (f_"nbdkit is not installed or not working. It is required to \
+ use -i disk.");
+ if not (Nbdkit.probe_plugin "file") then
+ error (f_"nbdkit-file-plugin is not installed or not working");
+ if options.read_only && not (Nbdkit.probe_filter "cow") then
+ error (f_"nbdkit-cow-filter is not installed or not working");
+
+ (* Each disk on the command line can be a local file or an NBD URI. *)
+ let is_nbd_uri =
+ let h = lazy (NBD.create ()) in
+ fun str -> NBD.is_uri (Lazy.force h) str
+ in
+
+ (* Function for detecting input format, using guestfs_disk_format. *)
+ let detect_input_format =
+ let g = lazy (open_guestfs ()) in
+ fun disk -> (Lazy.force g)#disk_format disk
+ in
+
+ (* If there are any NBD URIs on the command line, nbdkit-nbd-plugin
+ * must be available too.
+ *)
+ if List.exists is_nbd_uri args && not (Nbdkit.probe_plugin "nbd") then
+ error (f_"nbdkit-nbd-plugin is not installed or not working");
(* What name should we use for the guest? We try to derive it from
- * the first filename passed in. Users can override this using the
- * `-on name' option.
+ * the first filename passed in. If there are no filenames then
+ * we use "unknown".
+ *
+ * Users can override this using the '-on name' option.
*)
- let name = name_from_disk (List.hd args) in
+ let name =
+ let rec loop = function
+ | [] ->
+(* XXX can't print this because we don't know if the user set '-on'
+ warning (f_"-i disk: no local filenames given so we set \
+ the guest name to \"unknown\". Use -on name to \
+ override the guest name.");
+*)
+ "unknown"
+ | x :: xs when is_nbd_uri x ->
+ loop xs
+ | x :: _ ->
+ name_from_disk x
+ in
+ loop args in
+
+ (* Convert the command line disks to NBD URIs. *)
+ let uris =
+ List.mapi (
+ fun i disk ->
+ let sockname = sprintf "in%d" i in
+ let socket = sprintf "%s/%s" dir sockname in
+ On_exit.unlink socket;
+
+ if is_nbd_uri disk then (
+ (* For nbd:// on the command line, proxy through
+ * nbdkit-nbd-plugin. This is not ideal. We could
+ * catch special cases here, such as nbd+unix://
+ * and convert them directly to NBD_URI objects.
+ * That would require parsing NBD URIs ourselves
+ * but would avoid needing an extra nbdkit proxy.
+ * XXX
+ *)
+ let cmd = Nbdkit.create ~name:sockname "nbd" in
+ if options.read_only then
+ Nbdkit.add_filter cmd "cow";
+ Nbdkit.add_arg cmd "uri" disk;
+ let _, pid = Nbdkit.run_unix socket cmd in
+
+ (* --exit-with-parent should ensure nbdkit is cleaned
+ * up when we exit, but it's not supported everywhere.
+ *)
+ On_exit.kill pid
+ )
+ else (
+ (* Local filename. Use nbdkit-file-plugin for raw,
+ * or qemu-nbd for other formats.
+ *
+ * virt-v2v < 2.12 used to enforce that all disks
+ * had the same format, but that seems unnecessary.
+ *)
+
+ (* Check the input file exists and is readable. *)
+ access disk [R_OK];
+
+ let format =
+ match options.input_format with
+ | Some fmt -> fmt (* -if option overrides everything *)
+ | None -> detect_input_format disk in
+
+ match format with
+ | "raw" ->
+ let cmd = Nbdkit.create ~name:sockname "file" in
+ if options.read_only then
+ Nbdkit.add_filter cmd "cow";
+ Nbdkit.add_arg cmd "file" disk;
+ Nbdkit.reduce_memory_pressure cmd;
+ let _, pid = Nbdkit.run_unix socket cmd in
+
+ (* --exit-with-parent should ensure nbdkit is cleaned
+ * up when we exit, but it's not supported everywhere.
+ *)
+ On_exit.kill pid
+
+ | format ->
+ let cmd = QemuNBD.create disk in
+ QemuNBD.set_snapshot cmd options.read_only;
+ QemuNBD.set_format cmd (Some format);
+ let _, pid = QemuNBD.run_unix socket cmd in
+ On_exit.kill pid
+ );
+
+ NBD_URI.Unix (socket, None)
+ ) args in
let s_disks =
+ List.make nr_disks () |>
List.mapi (
- fun i _ -> { s_disk_id = i; s_controller = None }
- ) args in
+ fun i () -> { s_disk_id = i; s_controller = None }
+ ) in
(* Give the guest a simple generic network interface. *)
let s_nic = {
@@ -85,70 +196,5 @@ module Disk = struct
s_nics = [s_nic];
} in
- let input_format = detect_local_input_format options args in
-
- (* Check nbdkit is installed. *)
- if not (Nbdkit.is_installed ()) then
- error (f_"nbdkit is not installed or not working. It is required to \
- use -i disk.");
-
- if not (Nbdkit.probe_plugin "file") then
- error (f_"nbdkit-file-plugin is not installed or not working");
- if options.read_only && not (Nbdkit.probe_filter "cow") then
- error (f_"nbdkit-cow-filter is not installed or not working");
-
- let uris =
- List.mapi (
- fun i disk ->
- let sockname = sprintf "in%d" i in
- let socket = sprintf "%s/%s" dir sockname in
- On_exit.unlink socket;
-
- (match input_format with
- | "raw" ->
- let cmd = Nbdkit.create ~name:sockname "file" in
- if options.read_only then
- Nbdkit.add_filter cmd "cow";
- Nbdkit.add_arg cmd "file" disk;
- Nbdkit.reduce_memory_pressure cmd;
- let _, pid = Nbdkit.run_unix socket cmd in
-
- (* --exit-with-parent should ensure nbdkit is cleaned
- * up when we exit, but it's not supported everywhere.
- *)
- On_exit.kill pid
-
- | format ->
- let cmd = QemuNBD.create disk in
- QemuNBD.set_snapshot cmd options.read_only;
- QemuNBD.set_format cmd (Some format);
- let _, pid = QemuNBD.run_unix socket cmd in
- On_exit.kill pid
- );
-
- NBD_URI.Unix (socket, None)
- ) args in
-
source, uris
-
- (* For a list of local disks, try to detect the input format if
- * the [-if] option was not used on the command line. If the
- * formats of the disks are different, that is an error.
- *)
- and detect_local_input_format { input_format } filenames =
- match input_format with
- | Some fmt -> fmt
- | None ->
- let formats =
- let g = open_guestfs () in
- List.map g#disk_format filenames in
-
- let rec get_format = function
- | [] -> error (f_"expected >= 1 disk name on the command line")
- | [x] -> x
- | x :: y :: xs when compare x y = 0 -> get_format (y :: xs)
- | _ -> error (f_"disks on the command line have mixed formats")
- in
-
- get_format formats
end

View File

@ -0,0 +1,123 @@
From a4a65048989da029da637a1f6554c391ffe52fcf Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 18 Apr 2026 22:30:27 +0100
Subject: [PATCH] tests: Add test for -i disk nbd:// URI
Updates: commit a153d3e66eb3ce2f08c949f6dde483991aa4bd28
(cherry picked from commit 79d39ec12acfd5c90a2326ef417b948a2154adf4)
---
tests/Makefile.am | 6 ++--
tests/test-i-disk-nbd.sh | 78 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 2 deletions(-)
create mode 100755 tests/test-i-disk-nbd.sh
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 036cd3bb..19a60f73 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -70,8 +70,9 @@ TESTS = \
test-fedora-lvm-on-luks-conversion.sh \
test-fedora-md-conversion.sh \
test-floppy.sh \
- test-i-disk-parallel.sh \
test-i-disk.sh \
+ test-i-disk-nbd.sh \
+ test-i-disk-parallel.sh \
test-i-ova-bad-sha1.sh \
test-i-ova-bad-sha256.sh \
test-i-ova-directory.sh \
@@ -233,8 +234,9 @@ EXTRA_DIST += \
test-fedora-md-conversion.sh \
test-floppy.expected \
test-floppy.sh \
- test-i-disk-parallel.sh \
test-i-disk.sh \
+ test-i-disk-nbd.sh \
+ test-i-disk-parallel.sh \
test-i-ova-as-root.ovf \
test-i-ova-as-root.sh \
test-i-ova-bad-sha1.sh \
diff --git a/tests/test-i-disk-nbd.sh b/tests/test-i-disk-nbd.sh
new file mode 100755
index 00000000..12a23d7f
--- /dev/null
+++ b/tests/test-i-disk-nbd.sh
@@ -0,0 +1,78 @@
+#!/bin/bash -
+# libguestfs virt-v2v test script
+# Copyright (C) 2014 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.
+
+# Test -i disk with nbd URIs.
+
+source ./functions.sh
+set -e
+set -x
+
+skip_if_skipped
+
+b=fedora.img
+f=../test-data/phony-guests/$b
+requires test -f $f
+
+requires xz --version
+
+# Check we have nbdkit and the plugins and filters required.
+requires nbdkit --version
+requires nbdkit file --version
+requires nbdkit nbd --version
+requires nbdkit null --version
+requires nbdkit null --filter=cow --version
+requires nbdkit null --filter=xz --version
+
+# Check --exit-with-parent option will work.
+requires nbdkit --exit-with-parent --version
+
+d=test-i-disk-nbd.d
+rm -rf $d
+cleanup_fn rm -rf $d
+mkdir $d
+
+cp $f $d/$b
+xz $d/$b
+
+# Start nbdkit connected to the compressed file.
+nbdkit -r -f --exit-with-parent \
+ -U $d/sock -P $d/pid \
+ --filter=xz file $d/$b.xz &
+
+# Wait for the pidfile to appear.
+for i in {1..60}; do
+ if test -s "$d/pid"; then
+ break
+ fi
+ sleep 1
+done
+if ! test -s "$d/pid"; then
+ echo "$0: nbdkit: PID file $d/pid was not created"
+ exit 1
+fi
+cleanup_fn kill "$(cat $d/pid)"
+
+$VG virt-v2v --debug-gc \
+ -i disk nbd+unix:///?socket=$d/sock \
+ -o local -os $d
+
+# Test the libvirt XML metadata and a disk was created.
+test -f $d/unknown.xml
+test -f $d/unknown-sda
+
+cat $d/unknown.xml

View File

@ -0,0 +1,329 @@
From e342104e305251911ed4e769659fc708a9ab4d64 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 28 Apr 2026 17:01:26 +0100
Subject: [PATCH] common: update submodule
Richard W.M. Jones (4):
utils: Add read_whole_file function
options/keys.c: When reading key from user, prefix with "text:"
options/keys.c: When using --key <dev>:key:<string>, prefix with "text:"
options/keys.c: When reading the key from a file, encode it with base64
Also this now requires libguestfs >= 1.59.7 because we rely on text:
and base64: prefixes in LUKS functions.
Fixes: https://redhat.atlassian.net/browse/RHEL-170864
(cherry picked from commit 020fb2cdd145ae24f9d84ea60e0e3df15afdb0ff)
---
common | 2 +-
m4/guestfs-libraries.m4 | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
Submodule common 29176db2..31d0d6d4:
diff --git a/common/options/keys.c b/common/options/keys.c
index 7027104a..432e26dc 100644
--- a/common/options/keys.c
+++ b/common/options/keys.c
@@ -37,17 +37,23 @@
* Read a passphrase ('Key') from F</dev/tty> with echo off.
*
* The caller (F<fish/cmds.c>) will call free on the string
- * afterwards. Based on the code in cryptsetup file F<lib/utils.c>.
+ * afterwards.
+ *
+ * The entered string is prefixed with "text:..." to avoid ambiguity
+ * (with libguestfs >= 1.60). Base64 encoding cannot be used here.
+ *
+ * Based on the code in cryptsetup file F<lib/utils.c>.
*/
char *
read_key (const char *param)
{
FILE *infp, *outfp;
struct termios orig, temp;
+ CLEANUP_FREE char *key = NULL;
+ size_t keysize = 0;
char *ret = NULL;
int tty;
int tcset = 0;
- size_t allocsize = 0;
ssize_t len;
/* Read and write to /dev/tty if available. */
@@ -75,16 +81,21 @@ read_key (const char *param)
}
}
- len = getline (&ret, &allocsize, infp);
+ len = getline (&key, &keysize, infp);
if (len == -1) {
perror ("getline");
- ret = NULL;
goto error;
}
/* Remove the terminating \n if there is one. */
- if (len > 0 && ret[len-1] == '\n')
- ret[len-1] = '\0';
+ if (len > 0 && key[len-1] == '\n')
+ key[len-1] = '\0';
+
+ /* Prefix with "text:". */
+ if (asprintf (&ret, "text:%s", key) == -1) {
+ perror ("asprintf");
+ goto error;
+ }
error:
/* Restore echo, close file descriptor. */
@@ -99,27 +110,60 @@ read_key (const char *param)
return ret;
}
+/* Read a key from a file and base64 encode it, returning "base64:..." */
static char *
-read_first_line_from_file (const char *filename)
+read_key_and_base64_encode (const char *filename)
{
- CLEANUP_FCLOSE FILE *fp = NULL;
- char *ret = NULL;
- size_t allocsize = 0;
- ssize_t len;
+ CLEANUP_FREE char *inp = NULL;
+ char *out;
+ size_t inplen, outlen, i, j;
- fp = fopen (filename, "r");
- if (!fp)
- error (EXIT_FAILURE, errno, "fopen: %s", filename);
+ if (read_whole_file (filename, &inp, &inplen) == -1)
+ error (EXIT_FAILURE, 0, "read_key_and_base64_encode: read_whole_file: %s",
+ filename);
- len = getline (&ret, &allocsize, fp);
- if (len == -1)
- error (EXIT_FAILURE, errno, "getline: %s", filename);
+ /* From https://stackoverflow.com/a/6782480 */
+ static char encoding_table[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+ 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+ 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3',
+ '4', '5', '6', '7', '8', '9', '+', '/'};
+ static int mod_table[] = {0, 2, 1};
- /* Remove the terminating \n if there is one. */
- if (len > 0 && ret[len-1] == '\n')
- ret[len-1] = '\0';
+ outlen = 4 * ((inplen + 2) / 3);
+ out = malloc (outlen + 7 + 1);
+ if (!out)
+ error (EXIT_FAILURE, errno, "read_key_and_base64_encode: %s: malloc",
+ filename);
- return ret;
+ /* Add prefix and NUL-termination, then adjust 'out' to make the
+ * rest of the code simpler.
+ */
+ memcpy (out, "base64:", 7);
+ out[7 + outlen] = '\0';
+ out += 7;
+
+ for (i = 0, j = 0; i < inplen;) {
+ uint32_t octet_a = i < inplen ? (unsigned char) inp[i++] : 0;
+ uint32_t octet_b = i < inplen ? (unsigned char) inp[i++] : 0;
+ uint32_t octet_c = i < inplen ? (unsigned char) inp[i++] : 0;
+
+ uint32_t triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c;
+
+ assert (j <= outlen-4);
+ out[j++] = encoding_table[(triple >> 3 * 6) & 0x3F];
+ out[j++] = encoding_table[(triple >> 2 * 6) & 0x3F];
+ out[j++] = encoding_table[(triple >> 1 * 6) & 0x3F];
+ out[j++] = encoding_table[(triple >> 0 * 6) & 0x3F];
+ }
+
+ for (i = 0; i < mod_table[inplen % 3]; i++)
+ out[outlen - 1 - i] = '=';
+
+ return out - 7 /* see above */;
}
/* Return the key(s) matching this particular device from the
@@ -163,15 +207,14 @@ get_keys (struct key_store *ks, const char *device, const char *uuid,
switch (key->type) {
case key_string:
- s = strdup (key->string.s);
- if (!s)
- error (EXIT_FAILURE, errno, "strdup");
+ if (asprintf (&s, "text:%s", key->string.s) == -1)
+ error (EXIT_FAILURE, errno, "asprintf");
match->clevis = false;
match->passphrase = s;
++match;
break;
case key_file:
- s = read_first_line_from_file (key->file.name);
+ s = read_key_and_base64_encode (key->file.name);
match->clevis = false;
match->passphrase = s;
++match;
diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am
index 25c6100b..f328dcad 100644
--- a/common/utils/Makefile.am
+++ b/common/utils/Makefile.am
@@ -30,6 +30,7 @@ libutils_la_SOURCES = \
libxml2-writer-macros.h \
pcre2-cleanups.c \
stringlists-utils.c \
+ whole-file.c \
utils.c
libutils_la_CPPFLAGS = \
-DGUESTFS_NO_DEPRECATED=1 \
diff --git a/common/utils/guestfs-utils.h b/common/utils/guestfs-utils.h
index e861e7db..a8bd9ac2 100644
--- a/common/utils/guestfs-utils.h
+++ b/common/utils/guestfs-utils.h
@@ -113,4 +113,8 @@ extern const char *guestfs_int_strerror (int errnum, char *buf, size_t buflen);
/* environ.c */
extern char **guestfs_int_copy_environ (char **env, ...);
+/* whole-file.c */
+extern int read_whole_file (const char *filename,
+ char **data_r, size_t *size_r);
+
#endif /* GUESTFS_UTILS_H_ */
diff --git a/common/utils/whole-file.c b/common/utils/whole-file.c
new file mode 100644
index 00000000..a896e024
--- /dev/null
+++ b/common/utils/whole-file.c
@@ -0,0 +1,111 @@
+/* libguestfs
+ * Copyright (C) 2011-2026 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <libintl.h>
+
+#include "guestfs-utils.h"
+
+/**
+ * Read the whole file C<filename> into a memory buffer.
+ *
+ * The memory buffer is initialized and returned in C<data_r>. The
+ * size of the file in bytes is returned in C<size_r>. The return
+ * buffer must be freed by the caller.
+ *
+ * On error this prints an error on C<stderr> and returns -1. Unlike
+ * the similar C<guestfs_int_read_whole_file> this does not use the
+ * libguestfs handle or call C<error()>.
+ *
+ * For the convenience of callers, the returned buffer is
+ * NUL-terminated (the NUL is not included in the size).
+ *
+ * The file must be a B<regular>, B<local>, B<trusted> file. In
+ * particular, do not use this function to read files that might be
+ * under control of an untrusted user since that will lead to a
+ * denial-of-service attack.
+ */
+int
+read_whole_file (const char *filename, char **data_r, size_t *size_r)
+{
+ int fd;
+ char *data;
+ off_t size;
+ off_t n;
+ ssize_t r;
+ struct stat statbuf;
+
+ fd = open (filename, O_RDONLY|O_CLOEXEC);
+ if (fd == -1) {
+ perror (filename);
+ return -1;
+ }
+
+ if (fstat (fd, &statbuf) == -1) {
+ perror (filename);
+ close (fd);
+ return -1;
+ }
+
+ size = statbuf.st_size;
+ data = malloc (size + 1);
+ if (data == NULL) {
+ perror ("malloc");
+ close (fd);
+ return -1;
+ }
+
+ n = 0;
+ while (n < size) {
+ r = read (fd, &data[n], size - n);
+ if (r == -1) {
+ perror (filename);
+ free (data);
+ close (fd);
+ return -1;
+ }
+ if (r == 0) {
+ fprintf (stderr, "%s: unexpected end of input", filename);
+ free (data);
+ close (fd);
+ return -1;
+ }
+ n += r;
+ }
+
+ if (close (fd) == -1) {
+ perror (filename);
+ free (data);
+ return -1;
+ }
+
+ /* For convenience of callers, \0-terminate the data. */
+ data[size] = '\0';
+
+ *data_r = data;
+ if (size_r != NULL)
+ *size_r = size;
+
+ return 0;
+}
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 11c9974c..22af5db7 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -19,7 +19,8 @@ dnl Any C libraries required by virt-v2v.
dnl Of course we need libguestfs.
dnl
-dnl We need libguestfs >= 1.58.1-2.el10 for guestfs_xfs_info2.
+dnl We need libguestfs >= 1.58.1-6.el10 for guestfs_xfs_info2
+dnl and for text: and base64: prefix in LUKS funcs.
PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.58.1])
printf "libguestfs version is "; $PKG_CONFIG --modversion libguestfs

View File

@ -0,0 +1,122 @@
From bd5e315f274994bd0a537631ad80a1bcf2911647 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 May 2026 12:40:49 +0100
Subject: [PATCH] common: update submodule
Richard W.M. Jones (1):
mlcustomize: Update generated files
Srihari Parimi (1):
mlcustomize: firstboot.bat must not reboot VM on error code 250
(cherry picked from commit 463d0bbd471bc49df7dfb37231a468bfb0510fdc)
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 31d0d6d4..763a2102:
diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod
index c8de3953..95767cc7 100644
--- a/common/mlcustomize/customize-options.pod
+++ b/common/mlcustomize/customize-options.pod
@@ -161,10 +161,7 @@ conveniently wraps the command up in a single line script for you.
You can have multiple I<--firstboot> options. They run in the same
order that they appear on the command line.
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
-information and caveats about the first boot scripts.
-
-See also I<--run>.
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
=item B<--firstboot-command> 'CMD+ARGS'
@@ -174,10 +171,7 @@ boots up (as root, late in the boot process).
You can have multiple I<--firstboot> options. They run in the same
order that they appear on the command line.
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
-information and caveats about the first boot scripts.
-
-See also I<--run>.
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
=item B<--firstboot-install> PKG,PKG..
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
index 786f4ee4..b8eda519 100644
--- a/common/mlcustomize/customize_cmdline.ml
+++ b/common/mlcustomize/customize_cmdline.ml
@@ -252,13 +252,13 @@ let rec argspec ?(v2v = false) () =
Getopt.String (s_"SCRIPT", fun s -> List.push_front (`FirstbootScript s) ops),
s_"Run script at first guest boot"
),
- Some "SCRIPT", "Install C<SCRIPT> inside the guest, so that when the guest first boots\nup, the script runs (as root, late in the boot process).\n\nThe script is automatically chmod +x after installation in the guest.\n\nThe alternative version I<--firstboot-command> is the same, but it\nconveniently wraps the command up in a single line script for you.\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nPlease take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more\ninformation and caveats about the first boot scripts.\n\nSee also I<--run>.", false;
+ Some "SCRIPT", "Install C<SCRIPT> inside the guest, so that when the guest first boots\nup, the script runs (as root, late in the boot process).\n\nThe script is automatically chmod +x after installation in the guest.\n\nThe alternative version I<--firstboot-command> is the same, but it\nconveniently wraps the command up in a single line script for you.\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nSee also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.", false;
(
[ L"firstboot-command" ],
Getopt.String (s_"'CMD+ARGS'", fun s -> List.push_front (`FirstbootCommand s) ops),
s_"Run command at first guest boot"
),
- Some "'CMD+ARGS'", "Run command (and arguments) inside the guest when the guest first\nboots up (as root, late in the boot process).\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nPlease take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more\ninformation and caveats about the first boot scripts.\n\nSee also I<--run>.", false;
+ Some "'CMD+ARGS'", "Run command (and arguments) inside the guest when the guest first\nboots up (as root, late in the boot process).\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nSee also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.", false;
(
[ L"firstboot-install" ],
Getopt.String (
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
index 5e23a64b..fc3b7a69 100644
--- a/common/mlcustomize/firstboot.ml
+++ b/common/mlcustomize/firstboot.ml
@@ -320,13 +320,18 @@ for %%%%f in ("%%scripts%%"\*.bat) do (
echo Script failed, will retry on next boot
)
- :: Reboot the computer. This is necessary to free any locked
- :: files which may prevent later scripts from running.
- shutdown /r /t 0 /y
+ :: Reboot the computer only if exit code indicates.
+ :: Exit code 250 means do not reboot, otherwise reboot
+ :: Reboot is necessary to free any locked files which
+ :: may prevent later scripts from running.
+ if !elvl! NEQ 250 (
+ shutdown /r /t 0 /y
- :: Exit the script (in case shutdown returns before rebooting).
- :: On next boot, the whole firstboot service will be called again.
- exit /b
+ :: Exit the script (in case shutdown returns before rebooting).
+ :: On next boot, the whole firstboot service will be called again.
+
+ exit /b
+ )
)
:: Fallthrough here if there are no scripts.
diff --git a/common/mlcustomize/v2v-customize-options.pod b/common/mlcustomize/v2v-customize-options.pod
index f02f05da..6252ffe9 100644
--- a/common/mlcustomize/v2v-customize-options.pod
+++ b/common/mlcustomize/v2v-customize-options.pod
@@ -161,10 +161,7 @@ conveniently wraps the command up in a single line script for you.
You can have multiple I<--firstboot> options. They run in the same
order that they appear on the command line.
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
-information and caveats about the first boot scripts.
-
-See also I<--run>.
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
=item B<--firstboot-command> 'CMD+ARGS'
@@ -174,10 +171,7 @@ boots up (as root, late in the boot process).
You can have multiple I<--firstboot> options. They run in the same
order that they appear on the command line.
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
-information and caveats about the first boot scripts.
-
-See also I<--run>.
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
=item B<--firstboot-install> PKG,PKG..

View File

@ -1,4 +1,4 @@
From 5bb9b83c288b0c4bdac081e123f2fa54c840a6ca Mon Sep 17 00:00:00 2001
From a4c0eafbf3888e8d3d03a82ce9ba7d85ad858f03 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.
@ -19,10 +19,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1
7 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index e3fd41b8..eb51e9b9 100644
index 1df8699a..5aca94f1 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -55,6 +55,7 @@ let rec convert input_disks options source =
@@ -56,6 +56,7 @@ let rec convert input_disks options source =
message (f_"Opening the source");
let g = open_guestfs ~identifier:"v2v" () in

View File

@ -1,4 +1,4 @@
From 38516e4b16f2148db9d16c352e4bec6c9235e52a Mon Sep 17 00:00:00 2001
From 92b6d6587e303ed51d2e448040ee78e9651c7d58 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,4 +1,4 @@
From b00922090f704e97388dbc96f6f710fd5e22af92 Mon Sep 17 00:00:00 2001
From af3ceff3108a8470b35e3bc78b9d31ff4bd05e91 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
@ -43,7 +43,7 @@ index 49f00754..bdf12c5d 100644
=item B<-o null>
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 04764832..eb550da0 100644
index ecb29771..41bb58ce 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -169,11 +169,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
@ -58,7 +58,7 @@ index 04764832..eb550da0 100644
=head1 OPTIONS
=over 4
@@ -578,9 +573,6 @@ This is similar to I<-o local>, except that a shell script is written
@@ -585,9 +580,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>.
@ -68,7 +68,7 @@ index 04764832..eb550da0 100644
ifelse(ENABLE_OVIRT, yes, `
=item B<-o> B<vdsm>
@@ -653,11 +645,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
@@ -660,11 +652,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.

View File

@ -1,4 +1,4 @@
From f19e71394757c9f44ed3367addbe694140f34fea Mon Sep 17 00:00:00 2001
From 98c618ab6f22f1b791ec0e5f5ca41c68b9ddc64b 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

View File

@ -1,4 +1,4 @@
From 2e69a53b203968d77eb0a0447bdb347bd34481c6 Mon Sep 17 00:00:00 2001
From 2f4eb183837ee7a13fb10f64f6a0d34075acc871 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,10 +9,10 @@ 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 a5291031..599436f9 100644
index 20cd8214..b998a89d 100644
--- a/input/input_disk.ml
+++ b/input/input_disk.ml
@@ -77,7 +77,7 @@ module Disk = struct
@@ -188,7 +188,7 @@ module Disk = struct
s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *)
s_uefi_secureboot = false;
s_display =

View File

@ -1,4 +1,4 @@
From 19cd953d2b43f1d385845ed86c1802d4343093e7 Mon Sep 17 00:00:00 2001
From 57cd1fb96593e9bb7e4d09f316ade8b57a00bed6 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 57a29e5f33a5035917ef0bfffaa61326148c7afa Mon Sep 17 00:00:00 2001
From fe21f14e35d6b5606b1f5f84cca6fd4bea41d915 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
@ -9,7 +9,7 @@ RHEL does not have btrfs so this test always fails.
1 file changed, 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 54cfd124..8e142b09 100644
index 19a60f73..9a0726d2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -64,7 +64,6 @@ TESTS = \

View File

@ -1,4 +1,4 @@
From 61eac56a5cb787d591b9338324513b94f0f51b74 Mon Sep 17 00:00:00 2001
From 93ef7cb7183afaa4a5a6800ff0ecca0913010e79 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 9 Jul 2024 11:30:09 +0100
Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported
@ -10,10 +10,10 @@ Fixes: https://issues.redhat.com/browse/RHEL-40903
2 files changed, 7 insertions(+)
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
index 7e490867..6c2790af 100644
index e84266ab..a96d55d9 100644
--- a/in-place/in_place.ml
+++ b/in-place/in_place.ml
@@ -229,6 +229,9 @@ read the man page virt-v2v-in-place(1).
@@ -232,6 +232,9 @@ read the man page virt-v2v-in-place(1).
let opthandle = create_standard_options argspec ~anon_fun ~key_opts:true ~machine_readable:true usage_msg in
Getopt.parse opthandle.getopt;
@ -24,7 +24,7 @@ index 7e490867..6c2790af 100644
debug "info: %s: %s %s (%s)"
prog Config.package_name Config.package_version_full
diff --git a/in-place/virt-v2v-in-place.pod b/in-place/virt-v2v-in-place.pod
index 69d2092e..7c0a4d90 100644
index 333a6827..ac4142ae 100644
--- a/in-place/virt-v2v-in-place.pod
+++ b/in-place/virt-v2v-in-place.pod
@@ -16,6 +16,10 @@ virt-v2v-in-place - Convert a guest to use KVM in-place

View File

@ -1,4 +1,4 @@
From 9e9546aa983337e197407ce25ef3d3cd0a3cf173 Mon Sep 17 00:00:00 2001
From 7deb382a96bc6bfbff34b6880106d4875d8baeb8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 12 Dec 2025 16:18:15 +0000
Subject: [PATCH] RHEL: output/output.ml: Remove reduce-memory-pressure=on

View File

@ -0,0 +1,96 @@
From 02752f0c9ec3825cec6e96b78ef833a8ffac381f Mon Sep 17 00:00:00 2001
From: Susant Sahani <ssahani@redhat.com>
Date: Fri, 27 Mar 2026 06:54:25 +0530
Subject: [PATCH] smp: use cgroup CPU limits for appliance SMP
Use Cgroup.nr_cpus_available instead of nr_processors_online
to respect container cgroup CPU limits when setting SMP.
(cherry picked from commit db696f4cff486373a87c71d1de2d4dda4b047c8f)
[For RHEL 10.2 I also updated the common submodule to include:
commit bff133edf "smp: respect cgroup v2 CPU limits for appliance SMP"]
---
common | 2 +-
convert/convert.ml | 8 +-------
2 files changed, 2 insertions(+), 8 deletions(-)
Submodule common 763a2102..5971cbb3:
diff --git a/common/mlutils/unix_utils.ml b/common/mlutils/unix_utils.ml
index b79144a9..b21b9227 100644
--- a/common/mlutils/unix_utils.ml
+++ b/common/mlutils/unix_utils.ml
@@ -89,3 +89,28 @@ module Sysconf = struct
external nr_processors_online : unit -> int =
"guestfs_int_mllib_sysconf_nr_processors_online" [@@noalloc]
end
+
+module Cgroup = struct
+ let v2_cpus () =
+ let file = "/sys/fs/cgroup/cpu.max" in
+ if Sys.file_exists file then
+ try
+ let line = read_first_line_from_file file in
+ if String.starts_with ~prefix:"max" line then
+ None
+ else
+ let quota, period =
+ Scanf.sscanf line "%Ld %Ld" (fun q p -> (q, p)) in
+ if period > 0L then
+ Some (max 1 (Int64.to_int (Int64.div quota period)))
+ else None
+ with
+ | Scanf.Scan_failure _ | Failure _ | End_of_file -> None
+ else
+ None
+
+ let nr_cpus_available () =
+ match v2_cpus () with
+ | Some cpus -> cpus
+ | None -> Sysconf.nr_processors_online ()
+end
diff --git a/common/mlutils/unix_utils.mli b/common/mlutils/unix_utils.mli
index aead4df2..cb4f0426 100644
--- a/common/mlutils/unix_utils.mli
+++ b/common/mlutils/unix_utils.mli
@@ -130,3 +130,21 @@ module Sysconf : sig
Note this never fails. In case we cannot get the number of
cores it returns 1. *)
end
+
+module Cgroup : sig
+ (** Functions to read CPU limits from cgroup filesystems. *)
+
+ val v2_cpus : unit -> int option
+ (** [v2_cpus ()] reads the cgroup v2 CPU quota from
+ [/sys/fs/cgroup/cpu.max] and returns the number of CPUs
+ allocated (quota / period), or [None] if the file does not
+ exist, the quota is "max" (unlimited), or the file cannot
+ be parsed. The kernel stores quota and period as [long]
+ values in microseconds, so we parse them as [Int64]. *)
+
+ val nr_cpus_available : unit -> int
+ (** [nr_cpus_available ()] returns the number of CPUs available,
+ taking into account cgroup v2 CPU limits.
+ Falls back to {!Sysconf.nr_processors_online} if no cgroup
+ limits are set. *)
+end
diff --git a/convert/convert.ml b/convert/convert.ml
index 5aca94f1..bd1dfe65 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -69,13 +69,7 @@ let rec convert input_disks options source =
let smp =
match options.smp with
| None ->
- (* Default (if [--smp] option is not used) is to set the number
- * according to the number of physical CPUs on the host, but
- * limit it because each vCPU consumes guest RAM. This is
- * necessary to allow parallel mkinitrd which greatly improves
- * performance.
- *)
- min 8 (Sysconf.nr_processors_online ())
+ min 8 (Cgroup.nr_cpus_available ())
| Some smp -> smp in
g#set_smp smp;

View File

@ -0,0 +1,31 @@
From f3c6cbcfa3704800668e663c7767664f8be07737 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 12 May 2026 14:58:06 +0100
Subject: [PATCH] Update common submodule
Richard W.M. Jones (2):
mlcustomize: Remove fictitious "vista" virtio-win directory
mlcustomize: Use 2k8 drivers for Windows Vista and 2008 Server R1
Fixes: https://redhat.atlassian.net/browse/RHEL-174513
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 5971cbb3..3fdd2edc:
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
index a2938080..ce24332f 100644
--- a/common/mlcustomize/inject_virtio_win.ml
+++ b/common/mlcustomize/inject_virtio_win.ml
@@ -468,10 +468,8 @@ and virtio_iso_path_matches_guest_os t path =
((=) "winxp")
else if pathelem "2k3" then
(function "win2k3" | "win2k3r2" -> true | _ -> false)
- else if pathelem "vista" then
- ((=) "winvista")
else if pathelem "2k8" then
- ((=) "win2k8")
+ (function "win2k8" | "winvista" -> true | _ -> false)
else if pathelem "w7" then
((=) "win7")
else if pathelem "2k8r2" then

View File

@ -0,0 +1,48 @@
From 3ce689d219fa52ad1ffcf5ac5f5f703983b8efc9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Jul 2026 08:05:18 +0100
Subject: [PATCH] convert: Skip fsck after conversion for RHEL 7
RHEL 7 XFS has subtle incompatibilties with later kernels. There is a
workaround for this in libguestfs, but it does not fix the problem
entirely. The fsck after conversion still fails because the block
count is detected as being wrong. The easiest thing to do here is to
skip the fsck after conversion in this narrow case (RHEL 7 only) and
it will all get fixed up properly when the guest boots next time.
Fixes: https://redhat.atlassian.net/browse/RHEL-178287
Fixes: https://redhat.atlassian.net/browse/RHEL-191749
Thanks: Brian Foster, Eric Sandeen
(cherry picked from commit 0f212025a51f8696e892c00732d1da32d691c87e)
---
convert/convert.ml | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index bd1dfe65..dd033545 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -160,10 +160,19 @@ let rec convert input_disks options source =
message (f_"Skipping fstrim (--no-fstrim specified)")
);
- (* Check (fsck) the filesystems after conversion. *)
- g#umount_all ();
- message (f_"Checking filesystem integrity after conversion");
- do_fsck g;
+ (* Check (fsck) the filesystems after conversion.
+ *
+ * Skip this on RHEL 7 because of incompatibility issues with
+ * XFS in later kernels.
+ *)
+ (match inspect.i_distro, inspect.i_major_version with
+ | ("rhel" | "centos"), 7 ->
+ ()
+ | _ ->
+ g#umount_all ();
+ message (f_"Checking filesystem integrity after conversion");
+ do_fsck g;
+ );
message (f_"Closing the overlay");
g#umount_all ();

View File

@ -0,0 +1,102 @@
From 142feeb88475ecb426cbbfb9782c744613bf98e5 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 18 Feb 2026 10:35:12 -0500
Subject: [PATCH] convert: linux: Fix encrypted ubuntu 24.04
A default encrypted ubuntu24.04 VM has a crypttab like this:
$ cat /etc/crypttab
dm_crypt-0 UUID=49b424c0-7374-459f-bac2-4984aa86c1ba none luks
`update-initramfs` machinery is responsible for adding that line
to the initrd /cryptroot/crypttab file which tells the boot process
to prompt to unlock that volume.
`update-initramfs` expects that the volume name, /dev/mapper/dm_crypt-0,
exists on the host at initrd generation time. If it doesn't, it
skips adding that line to the initrd crypttab. This isn't an issue
in normal VM operation, however when running under libguestfs,
dm_crypt-0 is unlikely to exist, instead the volume will be mounted
at /dev/mapper/luks-$UUID which is the default naming libguestfs uses.
libguestfs can't know what the expected volume name from crypttab is,
since libguestfs needs needs to unlock the volume to even read
crypttab in the first place.
Let's work around it by adding the `initramfs` option to every crypttab
line on debian based distros. This forces the line to be copied to
initrd crypttab.
If a VM has multiple crypttab entries, some of which aren't necessary
for boot, then this may make converted VM bootup prompt for more
passwords than necessary. Hopefully that's a rare case.
Resolves: https://issues.redhat.com/browse/RHEL-137121
Signed-off-by: Cole Robinson <crobinso@redhat.com>
(cherry picked from commit 9eebf38bcaf59c1e07102d056c9df363976bf7c2)
---
convert/convert_linux.ml | 44 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index 484148ab..fe7df3aa 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -632,6 +632,47 @@ fi
install command for package %s could not be created: \
%s.") qga_pkg msg
+ and add_initramfs_option_to_crypttab () =
+ (* For debian based distros that use update-initramfs, an initrd
+ * rebuilt under libguestfs likely won't populate configure
+ * boot time crypttab correctly. We work around it by adding
+ * `initramfs` option to every /etc/crypttab entry.
+ *)
+ (* Get all crypttab entries *)
+ let entries = g#aug_match "/files/etc/crypttab/*" in
+ let entries = Array.to_list entries in
+
+ let changed = ref false in
+
+ List.iter (
+ fun entry_path ->
+ (* Check if this entry already has the initramfs option *)
+ let opts = g#aug_match (sprintf "%s/opt" entry_path) in
+ let opts = Array.to_list opts in
+
+ let has_initramfs = List.exists (
+ fun opt_path ->
+ let opt_name = g#aug_get opt_path in
+ opt_name = "initramfs"
+ ) opts in
+
+ if not has_initramfs then (
+ (* Add the initramfs option *)
+ let new_opt_path = sprintf "%s/opt[last()+1]" entry_path in
+ g#aug_set new_opt_path "initramfs";
+ changed := true;
+
+ let target = g#aug_get (sprintf "%s/target" entry_path) in
+ debug "convert_linux: added 'initramfs' option to crypttab entry '%s'" target
+ )
+ ) entries;
+
+ (* Save changes if any were made *)
+ if !changed then (
+ g#aug_save ();
+ Linux.augeas_reload g
+ )
+
and configure_kernel () =
(* Previously this function would try to install kernels, but we
* don't do that any longer.
@@ -799,6 +840,9 @@ fi
g#aug_save ();
);
+ (* Add initramfs option to crypttab entries *)
+ add_initramfs_option_to_crypttab ();
+
run_update_initramfs_command ()
)
else if g#is_file ~followsymlinks:true "/usr/sbin/make-initrd" then (

View File

@ -0,0 +1,47 @@
From ca3af8b94cdd6e207574f5029645719a16e18c03 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Thu, 21 May 2026 12:00:25 -0400
Subject: [PATCH] convert: fix ubuntu conversion regression
Stock ubuntu 22.04 and 24.04, and probably others, have this:
```
# cat /etc/crypttab
# <target name> <source device> <key file> <options>
```
The crypttab handling added in commit 9eebf38bcaf does not take
comments into account though. Leading to error like:
libguestfs: trace: v2v: aug_get "/files/etc/crypttab/#comment/target"
guestfsd: <= aug_get (0x13) request length 80 bytes^M
guestfsd: error: no matching node^M
guestfsd: => aug_get (0x13) took 0.00 secs^M
libguestfs: trace: v2v: aug_get = NULL (error)
virt-v2v: error: libguestfs error: aug_get: no matching node
Which breaks conversion. Fix it by only selecting lines that
have a 'target' field
Fixes: commit 9eebf38bcaf59c1e07102d056c9df363976bf7c2
Fixes: https://redhat.atlassian.net/browse/RHEL-178432
(cherry picked from commit 673f2d04a5ba86aec3f72e0a13d7b0db2f7006c1)
---
convert/convert_linux.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index fe7df3aa..7c32d312 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -638,8 +638,8 @@ fi
* boot time crypttab correctly. We work around it by adding
* `initramfs` option to every /etc/crypttab entry.
*)
- (* Get all crypttab entries *)
- let entries = g#aug_match "/files/etc/crypttab/*" in
+ (* Get all crypttab entries that have a target node *)
+ let entries = g#aug_match "/files/etc/crypttab/*[target]" in
let entries = Array.to_list entries in
let changed = ref false in

View File

@ -0,0 +1,55 @@
From 5f1030ad5d1b65aff2b2e879dd0d89b8c08646ee Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Jul 2026 06:45:35 +0100
Subject: [PATCH] common: update submodule
Richard W.M. Jones (3):
mlcustomize/inject_virtio_win.ml: Rewrite qemu-ga firstboot using {| |}
mlcustomize/inject_virtio_win.ml: Abstract $msi and $logfile
mlcustomize/inject_virtio_win.ml: Retry qemu-ga installation
---
common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule common 3fdd2edc..a901c174:
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
index ce24332f..0e5dcf05 100644
--- a/common/mlcustomize/inject_virtio_win.ml
+++ b/common/mlcustomize/inject_virtio_win.ml
@@ -556,11 +556,31 @@ and configure_qemu_ga t tempdir_win files =
add "# Run qemu-ga installers";
List.iter (
fun msi ->
- add (sprintf "Write-Host \"Writing log to %s\\%s.log\""
- tempdir_win msi);
- (* [`] is an escape char for quotes *)
- add (sprintf "Start-Process -Wait -FilePath \"%s\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"`\"%s\\%s.log`\"\""
- tempdir_win msi tempdir_win msi)
+ add (sprintf {|$msi = "%s\%s"|} tempdir_win msi);
+ add {|$logfile = "$msi.log"|};
+ add {|$maxAttempts = 10|};
+ add {|$retryDelay = 60|};
+ add {|for ($attempt = 1; $attempt -le $maxAttempts; $attempt++) {|};
+ add {| Write-Host "Attempt $attempt of $maxAttempts"|};
+ add {| Write-Host "Writing log to $logfile"|};
+ (* [`] is an escape char for double quotes.
+ * [-PassThru] ensures that [Start-Process] returns the cmd object
+ * so we can get the exit code.
+ *)
+ add {| $proc = Start-Process -Wait -PassThru -FilePath "$msi" -ArgumentList "/norestart","/qn","/l+*vx","`"$logfile`""|};
+ add {| $exitCode = $proc.ExitCode|};
+ add {| Write-Host "Exit code: $exitCode"|};
+ add {| if ($exitCode -eq 0) {|};
+ add {| Write-Host "QEMU Guest Agent installed successfully"|};
+ add {| break|};
+ add {| }|};
+ add {| if ($attempt -lt $maxAttempts) {|};
+ add {| Write-Host "Install failed, retrying in $retryDelay seconds..."|};
+ add {| Start-Sleep -Seconds $retryDelay|};
+ add {| } else {|};
+ add {| Write-Host "Install failed after $maxAttempts attempts"|};
+ add {| }|};
+ add {|}|}
) files;
Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga" !script

View File

@ -0,0 +1,441 @@
From ad3f8921dd6c2a7a715cf8e77b9f49d60d2d8c54 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 26 Jun 2026 05:51:37 +0100
Subject: [PATCH] Add new --collect option to collect pre-conversion Windows
information
'--collect GUEST_DIR[:LOCAL] --collect-output OUTPUT.tar.xz' options
will collect named files and directories before conversion, which
might be useful for diagnosing failed conversions later.
Thanks: Vadim Rozenfeld
Fixes: https://redhat.atlassian.net/browse/RHEL-188772
(cherry picked from commit 8f994323dedd270e8ff473830221e32233d2c616)
---
convert/convert.ml | 55 ++++++++++++++++++++++++++++++++
convert/convert.mli | 2 ++
docs/virt-v2v.pod | 37 +++++++++++++++++++++
in-place/in_place.ml | 14 ++++++++
in-place/virt-v2v-in-place.pod | 6 ++++
inspector/inspector.ml | 13 ++++++++
inspector/virt-v2v-inspector.pod | 4 +++
tests/Makefile.am | 2 ++
tests/test-collect.sh | 50 +++++++++++++++++++++++++++++
v2v/v2v.ml | 14 ++++++++
10 files changed, 197 insertions(+)
create mode 100755 tests/test-collect.sh
diff --git a/convert/convert.ml b/convert/convert.ml
index dd033545..d5ef91ae 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -32,6 +32,8 @@ module G = Guestfs
type options = {
block_driver : guestcaps_block_type;
+ collect : (string * string) list;
+ collect_file : string option;
keep_serial_console : bool;
ks : key_store;
memsize : int option;
@@ -134,6 +136,18 @@ let rec convert input_disks options source =
inspect.i_type inspect.i_distro in
debug "picked conversion module %s" Conversion_module.name;
+ (* Pre-conversion data collection ([--collect] option). *)
+ (match options.collect, options.collect_file with
+ | [], _ -> ()
+ | _::_, None ->
+ error (f_"--collect options found, \
+ but no --collect-output specified")
+ | collect_options, Some collect_output ->
+ message (f_"Collecting pre-conversion information in %s")
+ collect_output;
+ pre_conversion_collection g source inspect collect_options collect_output
+ );
+
(* Conversion. *)
let guestcaps =
do_convert g source inspect i_firmware
@@ -349,6 +363,47 @@ and do_fsck ?(before=false) g =
()
) fses
+(* Pre-conversion data collection ([--collect] options). *)
+and pre_conversion_collection g source inspect
+ collect_options collect_output =
+ (* Create temp output directory under large_tmpdir (/var/tmp). *)
+ let tmpdir =
+ let t = Mkdtemp.temp_dir ~base_dir:large_tmpdir "collect." in
+ On_exit.rm_rf t;
+ t in
+
+ (* Copy out directories. *)
+ List.iter (
+ fun (dir, localdir) ->
+ let local_path =
+ match localdir with
+ | "" | "." -> tmpdir
+ | localdir ->
+ if String.starts_with ~prefix:"/" localdir then
+ error (f_"in --collect do not use :/dir, \
+ drop the / character");
+ let p = sprintf "%s/%s" tmpdir localdir in
+ mkdir_p p 0o700;
+ p in
+ try
+ let guest_path = g#case_sensitive_path dir in
+ g#copy_out guest_path local_path
+ with G.Error msg ->
+ debug "--collect: copying out %s failed: %s (ignored)"
+ dir msg
+ ) collect_options;
+
+ (* Create final tarball. We need to ignore the original file
+ * permissions from the guest, otherwise tar might be unable to
+ * read some files (eg [/etc/gshadow]).
+ *)
+ let cmd = sprintf "chmod u+rw -R %s" (quote tmpdir) in
+ ignore (Sys.command cmd);
+ let cmd = sprintf "tar -J -c -f %s -C %s ."
+ (quote collect_output) (quote tmpdir) in
+ if Sys.command cmd <> 0 then
+ error (f_"could not create output tarball for --collect-output option")
+
(* Conversion. *)
and do_convert g source inspect i_firmware
block_driver keep_serial_console interfaces
diff --git a/convert/convert.mli b/convert/convert.mli
index faf671fc..0ab82bc2 100644
--- a/convert/convert.mli
+++ b/convert/convert.mli
@@ -18,6 +18,8 @@
type options = {
block_driver : Types.guestcaps_block_type; (** [--block-driver] option *)
+ collect : (string * string) list;(** [--collect] options *)
+ collect_file : string option; (** [--collect-output] option *)
keep_serial_console : bool;
ks : Tools_utils.key_store; (** [--key] option *)
memsize : int option; (** [--memsize] option *)
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 41bb58ce..1b0dedf0 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -241,6 +241,12 @@ Note this has no effect for Linux guests at the moment. That may be
added in future.
')
+=item B<--collect> GUEST[B<:>LOCAL]
+
+=item B<--collect-output> PATH/TO/OUTPUTB<.tar.xz>
+
+See L</Collecting files for later diagnostics>
+
=item B<--colors>
=item B<--colours>
@@ -1675,6 +1681,37 @@ use the MAC address to set up persistent associations between NICs and
internal names (like C<eth0>), with firewall settings, or even for
other purposes like software licensing.
+=head2 Collecting files for later diagnostics
+
+The virt-v2v I<--collect> and I<--collect-output> options are used to
+collect files and directories from inside the guest, before
+conversion, for later diagnosis in case the conversion goes wrong,
+especially if driver installation at firstboot fails.
+
+Typical usage is:
+
+ virt-v2v [...] \
+ --collect /windows/system32/config/ \
+ --collect /windows/system32/winevt/logs/ \
+ --collect /etc/ \
+ --collect-output output.tar.xz
+
+which would save the Windows registry, Windows event logs, and Linux
+F</etc> directory to F<output.tar.xz>.
+
+Guest files/directories which do not exist are ignored. The
+information collected may include sensitive data like passwords. The
+output could be arbitrarily large since it copies everything specified
+from the guest.
+
+You can rename directories in the output tarball by adding C<:dir>
+suffix to the I<--collect> option, eg:
+
+ virt-v2v [...] \
+ --collect /windows/system32/config/:registry
+
+which would create a F<registry/> directory in the tarball.
+
=head2 Minimal XML for -i libvirtxml option
When using the I<-i libvirtxml> option, you have to supply some
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
index a96d55d9..148d6e46 100644
--- a/in-place/in_place.ml
+++ b/in-place/in_place.ml
@@ -50,6 +50,11 @@ let rec main () =
let bandwidth = ref None in
let bandwidth_file = ref None in
let block_driver = ref None in
+
+ let collect = ref [] in
+ let add_collect dir = String.split ":" dir |> List.push_back collect in
+ let collect_file = ref None in
+
let input_conn = ref None in
let input_format = ref None in
let input_password = ref None in
@@ -168,6 +173,10 @@ let rec main () =
let argspec = ref [
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
s_"Map bridge in to out";
+ [ L"collect" ], Getopt.String ("collect", add_collect),
+ s_"Collect pre-conversion information";
+ [ L"collect-output" ], Getopt.String ("collect-output", set_string_option_once "--collect-output" collect_file),
+ s_"Collect output to .tar.xz file";
[ S 'i' ], Getopt.String (input_modes, set_input_mode),
s_"Set input mode (default: libvirt)";
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
@@ -257,6 +266,8 @@ read the man page virt-v2v-in-place(1).
| Some "virtio-scsi" -> Virtio_SCSI
| Some driver ->
error (f_"unknown block driver --block-driver %s") driver in
+ let collect = !collect in
+ let collect_file = !collect_file in
let customize_ops = get_customize_ops () in
let input_conn = !input_conn in
let input_mode = !input_mode in
@@ -285,6 +296,7 @@ read the man page virt-v2v-in-place(1).
pr "output-xml-option\n";
if Config.enable_block_driver then
pr "block-driver-option\n";
+ pr "collect-option\n";
Select_input.input_modes |>
List.map Select_input.string_of_input_mode |>
List.iter (pr "input:%s\n");
@@ -325,6 +337,8 @@ read the man page virt-v2v-in-place(1).
(* Get the conversion options. *)
let conv_options = {
Convert.block_driver = block_driver;
+ collect;
+ collect_file;
keep_serial_console = true;
ks = opthandle.ks;
memsize;
diff --git a/in-place/virt-v2v-in-place.pod b/in-place/virt-v2v-in-place.pod
index ac4142ae..76dba196 100644
--- a/in-place/virt-v2v-in-place.pod
+++ b/in-place/virt-v2v-in-place.pod
@@ -88,6 +88,12 @@ Note this has no effect for Linux guests at the moment. That may be
added in future.
')
+=item B<--collect> GUEST[B<:>LOCAL]
+
+=item B<--collect-output> PATH/TO/OUTPUTB<.tar.xz>
+
+See L<virt-v2v(1)/Collecting files for later diagnostics>
+
=item B<--colors>
=item B<--colours>
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
index 137d5f61..45b0f0a1 100644
--- a/inspector/inspector.ml
+++ b/inspector/inspector.ml
@@ -48,6 +48,10 @@ let rec main () =
else output_file := Some filename
in
+ let collect = ref [] in
+ let add_collect dir = String.split ":" dir |> List.push_back collect in
+ let collect_file = ref None in
+
let input_conn = ref None in
let input_format = ref None in
let input_password = ref None in
@@ -157,6 +161,10 @@ let rec main () =
let argspec = [
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
s_"Map bridge in to out";
+ [ L"collect" ], Getopt.String ("collect", add_collect),
+ s_"Collect pre-conversion information";
+ [ L"collect-output" ], Getopt.String ("collect-output", set_string_option_once "--collect-output" collect_file),
+ s_"Collect output to .tar.xz file";
[ S 'i' ], Getopt.String (input_modes, set_input_mode),
s_"Set input mode (default: libvirt)";
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
@@ -225,6 +233,8 @@ read the man page virt-v2v-inspector(1).
(* Dereference the arguments. *)
let args = List.rev !args in
+ let collect = !collect in
+ let collect_file = !collect_file in
let customize_ops = get_customize_ops () in
let output_file = !output_file in
let input_conn = !input_conn in
@@ -254,6 +264,7 @@ read the man page virt-v2v-inspector(1).
pr "mac-option\n";
pr "mac-ip-option\n";
pr "customize-ops\n";
+ pr "collect-option\n";
Select_input.input_modes |>
List.map Select_input.string_of_input_mode |>
List.iter (pr "input:%s\n");
@@ -290,6 +301,8 @@ read the man page virt-v2v-inspector(1).
(* Get the conversion options. *)
let conv_options = {
Convert.block_driver = Virtio_blk;
+ collect;
+ collect_file;
keep_serial_console = true;
ks = opthandle.ks;
memsize;
diff --git a/inspector/virt-v2v-inspector.pod b/inspector/virt-v2v-inspector.pod
index 65ce71ce..c35c8779 100644
--- a/inspector/virt-v2v-inspector.pod
+++ b/inspector/virt-v2v-inspector.pod
@@ -178,6 +178,10 @@ virt-v2v-inspector.
=item B<--bridge> ...
+=item B<--collect> ...
+
+=item B<--collect-output> ...
+
=item B<--colors>
=item B<--colours>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9a0726d2..8168cf30 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,7 @@ TESTS = \
test-checksum-good-qcow2.sh \
test-checksum-good.sh \
test-checksum-print.sh \
+ test-collect.sh \
test-customize.sh \
test-fedora-conversion.sh \
test-fedora-luks-on-lvm-conversion.sh \
@@ -225,6 +226,7 @@ EXTRA_DIST += \
test-checksum-good.sh \
test-checksum-print.sh \
test-conversion-of.sh \
+ test-collect.sh \
test-customize.sh \
test-fedora-btrfs-conversion.sh \
test-fedora-conversion.sh \
diff --git a/tests/test-collect.sh b/tests/test-collect.sh
new file mode 100755
index 00000000..ea01a5c8
--- /dev/null
+++ b/tests/test-collect.sh
@@ -0,0 +1,50 @@
+#!/bin/bash -
+# libguestfs virt-v2v test script
+# Copyright (C) 2024-2026 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.
+
+# Test virt-v2v --collect and --collect-output options.
+
+source ./functions.sh
+set -e
+set -x
+
+skip_if_skipped
+windows=../test-data/phony-guests/windows.img
+requires test -s $windows
+
+d=test-collect.d
+rm -rf $d
+cleanup_fn rm -rf $d
+mkdir $d
+
+output=$d/output.tar.xz
+files=$d/output.tar.xz.files
+
+$VG virt-v2v --debug-gc \
+ -i disk $windows \
+ -o null \
+ --collect /windows/system32/config:windows/system32 \
+ --collect-output $output
+
+# Test the tarball was created and contains some expected files/dirs.
+file $output
+
+tar -Jtf $output > $files
+cat $files
+
+grep -i windows/system32/config $files
+grep -i windows/system32/config/SYSTEM $files
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index 480fa81a..3e09553e 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -49,6 +49,11 @@ let rec main () =
let bandwidth = ref None in
let bandwidth_file = ref None in
let block_driver = ref None in
+
+ let collect = ref [] in
+ let add_collect dir = String.split ":" dir |> List.push_back collect in
+ let collect_file = ref None in
+
let input_conn = ref None in
let input_format = ref None in
let input_password = ref None in
@@ -208,6 +213,10 @@ 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"collect" ], Getopt.String ("collect", add_collect),
+ s_"Collect pre-conversion information";
+ [ L"collect-output" ], Getopt.String ("collect-output", set_string_option_once "--collect-output" collect_file),
+ s_"Collect output to .tar.xz file";
[ S 'i' ], Getopt.String (input_modes, set_input_mode),
s_"Set input mode (default: libvirt)";
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
@@ -317,6 +326,8 @@ read the man page virt-v2v(1).
| Some "virtio-scsi" -> Virtio_SCSI
| Some driver ->
error (f_"unknown block driver --block-driver %s") driver in
+ let collect = !collect in
+ let collect_file = !collect_file in
let customize_ops = get_customize_ops () in
let input_conn = !input_conn in
let input_mode = !input_mode in
@@ -365,6 +376,7 @@ read the man page virt-v2v(1).
pr "customize-ops\n";
if Config.enable_block_driver then
pr "block-driver-option\n";
+ pr "collect-option\n";
Select_input.input_modes |>
List.map Select_input.string_of_input_mode |>
List.iter (pr "input:%s\n");
@@ -437,6 +449,8 @@ read the man page virt-v2v(1).
(* Get the conversion options. *)
let conv_options = {
Convert.block_driver = block_driver;
+ collect;
+ collect_file;
keep_serial_console = not remove_serial_console;
ks = opthandle.ks;
memsize;

View File

@ -0,0 +1,89 @@
From a0e1d081e3795b0086f96cac32d9533897be8c15 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Jul 2026 12:40:06 +0100
Subject: [PATCH] inspector, in-place: Add <disk> <boot-order>#</boot-order> to
XML output
When using the virt-v2v-inspector or virt-v2v-in-place -O option to
write informational XML, include the boot order for each disk.
Example output after this change is:
<?xml version='1.0' encoding='utf-8'?>
<v2v-inspection>
...
<disks>
<disk index='0'>
<virtual-size>21474836480</virtual-size>
<allocated estimated='true'>12106633216</allocated>
<boot-order>1</boot-order>
</disk>
</disks>
Reported-by: Elad Hazan
Fixes: https://redhat.atlassian.net/browse/RHEL-184508
(cherry picked from commit 2e8493ecb02b4f1b4645d7598290d60b72fd2a82)
---
inspector/create_inspector_xml.ml | 12 ++++++++++--
tests/test-in-place-xml.sh | 1 +
tests/test-inspector.sh | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/inspector/create_inspector_xml.ml b/inspector/create_inspector_xml.ml
index a531cecc..c6f121fc 100644
--- a/inspector/create_inspector_xml.ml
+++ b/inspector/create_inspector_xml.ml
@@ -31,7 +31,8 @@ open DOM
* - The NBD input disks
* - The inspection data (Types.inspect)
*)
-let rec create_inspector_xml input_disks inspect target_meta =
+let rec create_inspector_xml input_disks inspect
+ { target_firmware; target_boot_device } =
let body = ref [] in
(* Record the version of virt-v2v etc, mainly for debugging. *)
@@ -59,6 +60,13 @@ let rec create_inspector_xml input_disks inspect target_meta =
List.push_back elems (e "allocated" [ "estimated", "true" ]
[PCData (Int64.to_string real_size)])
);
+ let boot_order =
+ match target_boot_device with
+ | None -> index + 1
+ | Some disk_index when disk_index = index -> 1
+ | Some _ -> index + 2 in
+ List.push_back elems (e "boot-order" []
+ [PCData (Int.to_string boot_order)]);
List.push_back disks (e "disk" [ "index", string_of_int index ] !elems)
) input_disks;
@@ -71,7 +79,7 @@ let rec create_inspector_xml input_disks inspect target_meta =
List.push_back body
(e "firmware"
["type",
- string_of_target_firmware target_meta.target_firmware]
+ string_of_target_firmware target_firmware]
[]);
(* The inspection data. *)
diff --git a/tests/test-in-place-xml.sh b/tests/test-in-place-xml.sh
index 1cce8606..25e65a57 100755
--- a/tests/test-in-place-xml.sh
+++ b/tests/test-in-place-xml.sh
@@ -76,5 +76,6 @@ grep '^<v2v-inspection' $out
grep '<program>virt-v2v-inspector</program>' $out
grep '<disks>' $out
grep "<disk index='0'>" $out
+grep '<boot-order>1' $out
grep '<distro>windows</distro>' $out
grep '<osinfo>win2k22</osinfo>' $out
diff --git a/tests/test-inspector.sh b/tests/test-inspector.sh
index ae779e95..51050827 100755
--- a/tests/test-inspector.sh
+++ b/tests/test-inspector.sh
@@ -71,5 +71,6 @@ grep '^<v2v-inspection' $out
grep '<program>virt-v2v-inspector</program>' $out
grep '<disks>' $out
grep "<disk index='0'>" $out
+grep '<boot-order>1' $out
grep '<distro>windows</distro>' $out
grep '<osinfo>win2k22</osinfo>' $out

View File

@ -0,0 +1,351 @@
From 9bd7e17d0b34f939eab0c18cef7fd4bb74269c20 Mon Sep 17 00:00:00 2001
From: Darren Archibald <darren.archibald@oracle.com>
Date: Tue, 9 Sep 2025 04:07:35 -0700
Subject: [PATCH] replaced upstream references
Signed-off-by: Darren Archibald <darren.archibald@oracle.com>
Signed-off-by: Akshata Konala <akshata.konala@oracle.com>
---
po/Makefile.am | 2 +-
po/cs.po | 3 +--
po/de.po | 3 +--
po/es.po | 3 +--
po/fi.po | 3 +--
po/fr.po | 3 +--
po/gu.po | 3 +--
po/hi.po | 3 +--
po/ja.po | 3 +--
po/ka.po | 3 +--
po/kn.po | 3 +--
po/ml.po | 3 +--
po/mr.po | 3 +--
po/nl.po | 3 +--
po/or.po | 3 +--
po/pa.po | 3 +--
po/pl.po | 3 +--
po/si.po | 3 +--
po/uk.po | 3 +--
po/virt-v2v.pot | 3 +--
podwrapper.pl.in | 4 ++--
website/index.html.in | 6 +++---
22 files changed, 25 insertions(+), 44 deletions(-)
diff --git a/po/Makefile.am b/po/Makefile.am
index 08d9dbe..61f472b 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -19,7 +19,7 @@ include $(top_srcdir)/subdir-rules.mk
DOMAIN = $(PACKAGE_NAME)
COPYRIGHT_HOLDER = Red Hat Inc.
-MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
+MSGID_BUGS_ADDRESS = https://github.com/oracle/oracle-linux
# Languages.
# Don't use LINGUAS (uppercase) as Gentoo defines it (RHBZ#804464).
diff --git a/po/cs.po b/po/cs.po
index 55c4fdc..5003e14 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,8 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2023-04-08 18:20+0000\n"
"Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>\n"
diff --git a/po/de.po b/po/de.po
index e8d9053..835535e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,8 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:48+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/es.po b/po/es.po
index 1a63337..8800235 100644
--- a/po/es.po
+++ b/po/es.po
@@ -10,8 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-03-16 07:04+0000\n"
"Last-Translator: Alex Puchades <alex94puchades@gmail.com>\n"
diff --git a/po/fi.po b/po/fi.po
index 56f9917..b077010 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -6,8 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: virt-v2v 1.43.4\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2025-01-09 11:33+0000\n"
"Last-Translator: Ricky Tigg <ricky.tigg@gmail.com>\n"
diff --git a/po/fr.po b/po/fr.po
index 2db1ae1..2ba25d0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -10,8 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2023-03-21 09:20+0000\n"
"Last-Translator: grimst <grimaitres@gmail.com>\n"
diff --git a/po/gu.po b/po/gu.po
index 5b4e798..9c540cd 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -8,8 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:49+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/hi.po b/po/hi.po
index a3983ed..0364d75 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -8,8 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:49+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/ja.po b/po/ja.po
index 23d34f2..c14299e 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -9,8 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2017-02-24 07:33+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/ka.po b/po/ka.po
index 78ebee4..b116e86 100644
--- a/po/ka.po
+++ b/po/ka.po
@@ -6,8 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: virt-v2v 2.1.1\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2025-01-09 09:27+0000\n"
"Last-Translator: Weblate Translation Memory <noreply-mt-weblate-translation-"
diff --git a/po/kn.po b/po/kn.po
index 3de0f89..bd0e5b0 100644
--- a/po/kn.po
+++ b/po/kn.po
@@ -7,8 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:50+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/ml.po b/po/ml.po
index 7a3f071..7de8c16 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -7,8 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:50+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/mr.po b/po/mr.po
index 8222d63..7f55091 100644
--- a/po/mr.po
+++ b/po/mr.po
@@ -8,8 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:51+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/nl.po b/po/nl.po
index 06df912..b25b908 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -9,8 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:51+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/or.po b/po/or.po
index 2422cc3..92a2500 100644
--- a/po/or.po
+++ b/po/or.po
@@ -7,8 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:51+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/pa.po b/po/pa.po
index e2465b6..73a8db6 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8,8 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2015-02-21 10:52+0000\n"
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
diff --git a/po/pl.po b/po/pl.po
index 77f4651..16c7459 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -11,8 +11,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2024-01-15 13:36+0000\n"
"Last-Translator: Weblate Translation Memory <noreply-mt-weblate-translation-"
diff --git a/po/si.po b/po/si.po
index 3fc531a..3c3f7cd 100644
--- a/po/si.po
+++ b/po/si.po
@@ -6,8 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: virt-v2v 1.43.3\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
diff --git a/po/uk.po b/po/uk.po
index ea5ca97..ae7f4e6 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -12,8 +12,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libguestfs 1.39.12\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2025-02-27 18:15+0000\n"
"PO-Revision-Date: 2024-12-22 07:38+0000\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index d7973fc..0a196f3 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -432,10 +432,10 @@ my $reporting_bugs =
"=head1 BUGS
To get a list of bugs against libguestfs, use this link:
-L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>
+L<https://github.com/oracle/oracle-linux>
To report a new bug against libguestfs, use this link:
-L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>
+L<https://github.com/oracle/oracle-linux>
When reporting a bug, please supply:
diff --git a/website/index.html.in b/website/index.html.in
index f578523..e1e1592 100644
--- a/website/index.html.in
+++ b/website/index.html.in
@@ -160,12 +160,12 @@ For testers:
<h2>Bug reports</h2>
<p>
-<a href="https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools">List of bugs in libguestfs</a> and
-<a href="https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Fedora">in Fedora packaging of libguestfs</a>
+<a href="https://github.com/oracle/oracle-linux">List of bugs in libguestfs</a> and
+<a href="https://github.com/oracle/oracle-linux">in Community packaging of libguestfs</a>
</p>
<p>
-<a href="https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools">Enter a new bug report</a>
+<a href="https://github.com/oracle/oracle-linux">Enter a new bug report</a>
</p>
</div>
diff --git a/po/virt-v2v.pot b/po/virt-v2v.pot
index 7b7d7b7..fba74c8 100644
--- a/po/virt-v2v.pot
+++ b/po/virt-v2v.pot
@@ -7,8 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: virt-v2v 2.10.0\n"
-"Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?"
-"component=libguestfs&product=Virtualization+Tools\n"
+"Report-Msgid-Bugs-To: https://github.com/oracle/oracle-linux\n"
"POT-Creation-Date: 2026-01-06 11:03+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
--
2.31.1

View File

@ -45,7 +45,7 @@ ExclusiveArch: x86_64
Name: virt-v2v
Epoch: 1
Version: 2.10.0
Release: 13%{?dist}
Release: 18.0.1%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPL-2.0-or-later AND LGPL-2.0-or-later
@ -84,21 +84,36 @@ Patch0016: 0016-output-introduce-disk_name-helper.patch
Patch0017: 0017-output-Replace-in-VM-names-with-_.patch
Patch0018: 0018-output-sanitize-guest-names-in-metadata-file-paths.patch
Patch0019: 0019-output-sanitize-VM-names-in-libvirt-XML.patch
Patch0020: 0020-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0021: 0021-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0022: 0022-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0023: 0023-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0024: 0024-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0025: 0025-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0026: 0026-RHEL-tests-Remove-btrfs-test.patch
Patch0027: 0027-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0028: 0028-RHEL-output-output.ml-Remove-reduce-memory-pressure-.patch
Patch0029: 0029-Update-common-submodule.patch
Patch0030: 0030-convert-linux-properly-match-etc-crypttab.patch
Patch0031: 0031-Update-common-submodule.patch
Patch0032: 0032-Add-no-fstrim-option-to-disable-fstrim-during-conver.patch
Patch0033: 0033-convert-Stop-using-maxmem-xfs_repair-m-option.patch
Patch0034: 0034-Update-common-submodule.patch
Patch0020: 0020-Update-common-submodule.patch
Patch0021: 0021-convert-linux-properly-match-etc-crypttab.patch
Patch0022: 0022-Update-common-submodule.patch
Patch0023: 0023-Add-no-fstrim-option-to-disable-fstrim-during-conver.patch
Patch0024: 0024-convert-Stop-using-maxmem-xfs_repair-m-option.patch
Patch0025: 0025-Update-common-submodule.patch
Patch0026: 0026-docs-Show-input-parameters-for-i-input-methods.patch
Patch0027: 0027-docs-i-disk-allows-multiple-disk-images.patch
Patch0028: 0028-i-disk-Allow-nbd-URIs-for-input-disks.patch
Patch0029: 0029-tests-Add-test-for-i-disk-nbd-URI.patch
Patch0030: 0030-common-update-submodule.patch
Patch0031: 0031-common-update-submodule.patch
Patch0032: 0032-RHEL-Fixes-for-libguestfs-winsupport.patch
Patch0033: 0033-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch0034: 0034-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
Patch0035: 0035-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch0036: 0036-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch0037: 0037-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch0038: 0038-RHEL-tests-Remove-btrfs-test.patch
Patch0039: 0039-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
Patch0040: 0040-RHEL-output-output.ml-Remove-reduce-memory-pressure-.patch
Patch0041: 0041-smp-use-cgroup-CPU-limits-for-appliance-SMP.patch
Patch0042: 0042-Update-common-submodule.patch
Patch0043: 0043-convert-Skip-fsck-after-conversion-for-RHEL-7.patch
Patch0044: 0044-convert-linux-Fix-encrypted-ubuntu-24.04.patch
Patch0045: 0045-convert-fix-ubuntu-conversion-regression.patch
Patch0046: 0046-common-update-submodule.patch
Patch0047: 0047-Add-new-collect-option-to-collect-pre-conversion-Win.patch
Patch0048: 0048-inspector-in-place-Add-disk-boot-order-boot-order-to.patch
Patch1001: 1001-replaced-upstream-references.patch
BuildRequires: autoconf, automake, libtool
BuildRequires: make
@ -109,7 +124,7 @@ BuildRequires: perl(IPC::Run3)
BuildRequires: gcc
BuildRequires: ocaml >= 4.08
BuildRequires: libguestfs-devel >= 1:1.58.1-2
BuildRequires: libguestfs-devel >= 1:1.58.1-6
BuildRequires: augeas-devel
BuildRequires: bash-completion
%if 0%{?fedora} || 0%{?rhel} >= 11
@ -155,7 +170,7 @@ BuildRequires: glibc-static
BuildRequires: gnupg2
%endif
Requires: libguestfs%{?_isa} >= 1:1.58.1-2
Requires: libguestfs%{?_isa} >= 1:1.58.1-6
Requires: guestfs-tools >= 1.54
# XFS is the default filesystem in Fedora and RHEL.
@ -404,6 +419,37 @@ done
%changelog
* Tue Aug 04 2026 EL Errata <el-errata_ww@oracle.com> - 2.10.0-18.0.1
- Replaced bugzilla.oracle.com references [Orabug: 34202300]
- replaced upstream references [Orabug:34089586]
* Tue Jul 07 2026 Richard W.M. Jones <rjones@redhat.com> - 1:2.10.0-18
- Add <disk> <boot-order>#</boot-order> to XML output
resolves: RHEL-193138
- Add new --collect option to collect pre-conversion information
resolves: RHEL-192947
- Retry qemu-ga installer on failure
resolves: RHEL-193139
- Fix conversions of encrypted Ubuntu guests (second attempt)
resolves: RHEL-192921
- Skip fsck after conversion for RHEL 7
resolves: RHEL-192948
* Fri May 22 2026 Richard W.M. Jones <rjones@redhat.com> - 1:2.10.0-17
- Drop 'Fix conversion of encrypted Ubuntu guests' (failed testing)
related: RHEL-174515
- Fix location of Windows Vista and Windows 2008 Server R1 drivers
resolves: RHEL-174513
* Tue May 12 2026 Richard W.M. Jones <rjones@redhat.com> - 1:2.10.0-16
- Fix binary LUKS keys
resolves: RHEL-174520
- Windows firstboot: Add exit code 250 to skip reboots
Rework documentation for firstboot feature
resolves: RHEL-174516
- Use cgroups in SMP calculation
resolves: RHEL-174512
* Thu Apr 23 2026 Richard W.M. Jones <rjones@redhat.com> - 1:2.10.0-13
- Stop using maxmem (xfs_repair -m option)
resolves: RHEL-169321