diff --git a/0001-input-vddk-Use-single-nbdkit-vddk-plugin-instance-wi.patch b/0001-input-vddk-Use-single-nbdkit-vddk-plugin-instance-wi.patch new file mode 100644 index 0000000..14630b1 --- /dev/null +++ b/0001-input-vddk-Use-single-nbdkit-vddk-plugin-instance-wi.patch @@ -0,0 +1,168 @@ +From b49ee1436870f720cd0a4aee7593f38fa9f4089f Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 12 May 2025 15:33:09 +0100 +Subject: [PATCH] input: vddk: Use single nbdkit-vddk-plugin instance with + exports + +nbdkit >= 1.43.8 VDDK plugin supports a new 'export' parameter which +allows the client (virt-v2v) to select which file on the VMware server +to serve. This allows us to run a single nbdkit instance (if nbdkit +has this feature), which is potentially more efficient for guests with +multiple disks. + +This also requires nbdkit-cow-filter to be export-safe. This change +was made in the same version of nbdkit, so checking for the new +'export' parameter is sufficient. +--- + input/input_vddk.ml | 95 ++++++++++++++++++++++++++++++++------------- + lib/utils.ml | 15 +++++++ + lib/utils.mli | 3 ++ + 3 files changed, 86 insertions(+), 27 deletions(-) + +diff --git a/input/input_vddk.ml b/input/input_vddk.ml +index c6485b25..f5e2aa98 100644 +--- a/input/input_vddk.ml ++++ b/input/input_vddk.ml +@@ -410,34 +410,75 @@ See also the virt-v2v-input-vmware(1) manual.") libNN + cmd + in + +- (* Create an nbdkit instance for each disk. *) +- let uris = ++ (* Collect all the VDDK filename(s) we will be accessing, one ++ * for each input disk. This takes into account the ++ * '-io vddk-file' override. ++ *) ++ let files = + List.combine disks file_overrides |> +- List.mapi ( +- fun i ({ d_type }, file_override) -> +- let socket = sprintf "%s/in%d" dir i in +- On_exit.unlink socket; +- +- (match d_type with +- | BlockDev _ | NBD _ | HTTP _ -> (* These should never happen? *) +- assert false +- +- | LocalFile orig_file -> +- (* If -io vddk-file, override it here. *) +- let file = Option.value file_override ~default:orig_file in +- +- (* The attribute returned by the libvirt +- * VMX driver looks like "[datastore] path". We can use it +- * directly as the nbdkit file= parameter, and it is passed +- * directly in this form to VDDK. +- *) +- let nbdkit = create_nbdkit_vddk () in +- Nbdkit.add_arg nbdkit "file" file; +- let _, pid = Nbdkit.run_unix socket nbdkit in +- On_exit.kill pid +- ); +- +- NBD_URI.Unix (socket, None) ++ List.map ( ++ function ++ (* These should never happen? *) ++ | { d_type = BlockDev _ | NBD _ | HTTP _ }, _ -> ++ assert false ++ ++ | { d_type = LocalFile file }, None -> ++ (* The attribute returned by the libvirt ++ * VMX driver looks like "[datastore] path". We can use it ++ * directly as the nbdkit file= parameter, and it is passed ++ * directly in this form to VDDK. ++ *) ++ file ++ ++ | { d_type = LocalFile _ }, Some file_override -> ++ (* If -io vddk-file, override it here. *) ++ file_override ++ ) in ++ assert (files <> []); ++ ++ let uris = ++ (* If nbdkit-vddk-plugin has the 'export' feature (added in ++ * nbdkit 1.43.8) then we only have to run a single ++ * instance of nbdkit. ++ *) ++ if Nbdkit.probe_plugin_parameter "vddk" "export=" then ( ++ let wildcard = ++ match files with ++ | [] -> assert false (* can't happen, see assert above *) ++ | [f] -> f ++ | files -> ++ (* Calculate the longest common prefix across all the files, ++ * then set the wildcard to this. ++ * XXX May not work if there are subdirectories? ++ * XXX Is every file we want to read called *.vmdk? ++ *) ++ let prefix = String.longest_common_prefix files in ++ fnmatch_escape prefix ^ "*.vmdk" in ++ ++ let socket = sprintf "%s/in0" dir in ++ On_exit.unlink socket; ++ ++ let nbdkit = create_nbdkit_vddk () in ++ Nbdkit.add_arg nbdkit "export" wildcard; ++ let _, pid = Nbdkit.run_unix socket nbdkit in ++ On_exit.kill pid; ++ ++ (* Use NBD export names to select the right disk to read. *) ++ List.map (fun file -> NBD_URI.Unix (socket, Some file)) files ++ ) else ( ++ (* Create an nbdkit instance for each disk. *) ++ List.mapi ( ++ fun i file -> ++ let socket = sprintf "%s/in%d" dir i in ++ On_exit.unlink socket; ++ ++ let nbdkit = create_nbdkit_vddk () in ++ Nbdkit.add_arg nbdkit "file" file; ++ let _, pid = Nbdkit.run_unix socket nbdkit in ++ On_exit.kill pid; ++ ++ NBD_URI.Unix (socket, None) ++ ) files + ) in + + source, uris +diff --git a/lib/utils.ml b/lib/utils.ml +index acf5fb07..f3f7a205 100644 +--- a/lib/utils.ml ++++ b/lib/utils.ml +@@ -54,6 +54,21 @@ let uri_quote str = + done; + String.concat "" (List.rev !xs) + ++(* Escape characters like [?] and [*] which are special for fnmatch(3). *) ++let fnmatch_escape str = ++ let len = String.length str in ++ let xs = ref [] in ++ for i = 0 to len-1 do ++ xs := ++ (match str.[i] with ++ | '[' | ']' | '?' | '*' as c -> ++ sprintf "\\%c" c ++ | c -> ++ String.make 1 c ++ ) :: !xs ++ done; ++ String.concat "" (List.rev !xs) ++ + (* Map guest architecture found by inspection to the architecture + * that KVM must emulate. Note for x86 we assume a 64 bit hypervisor. + *) +diff --git a/lib/utils.mli b/lib/utils.mli +index 565bebca..1eb24ae7 100644 +--- a/lib/utils.mli ++++ b/lib/utils.mli +@@ -33,6 +33,9 @@ val have_selinux : bool + val uri_quote : string -> string + (** Take a string and perform %xx escaping as used in some parts of URLs. *) + ++val fnmatch_escape : string -> string ++(** Escape characters like [?] and [*] which are special for fnmatch(3). *) ++ + val kvm_arch : string -> string + (** Map guest architecture found by inspection to the architecture + that KVM must emulate. Note for x86 we assume a 64 bit hypervisor. *) diff --git a/0002-docs-Further-updates-to-virt-v2v-release-notes-for-2.patch b/0002-docs-Further-updates-to-virt-v2v-release-notes-for-2.patch new file mode 100644 index 0000000..063bc36 --- /dev/null +++ b/0002-docs-Further-updates-to-virt-v2v-release-notes-for-2.patch @@ -0,0 +1,74 @@ +From ab311a7399dd372a190e88b731b69e92767eb5e6 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 13 May 2025 11:45:42 +0100 +Subject: [PATCH] docs: Further updates to virt-v2v release notes for 2.8 + +--- + docs/virt-v2v-release-notes-2.8.pod | 26 +++++++++++++++++++++++++- + 1 file changed, 25 insertions(+), 1 deletion(-) + +diff --git a/docs/virt-v2v-release-notes-2.8.pod b/docs/virt-v2v-release-notes-2.8.pod +index 0ca0abe2..07bbafcf 100644 +--- a/docs/virt-v2v-release-notes-2.8.pod ++++ b/docs/virt-v2v-release-notes-2.8.pod +@@ -138,6 +138,9 @@ OCaml E 4.08 is now required. + + libnbd E 1.14 is now required. + ++nbdkit E 1.28 is now required, although it is better to use more ++recent versions where possible. ++ + OCaml oUnit is no longer used. + + We now assume that C<__attribute__((cleanup))> always works. This +@@ -169,16 +172,29 @@ L is no longer used, as it did not help + performance now that we have switched to using L (thanks + Martin Kletzander). + ++With multi-disk guests, in some common cases we are now able to use a ++single L instance to read or write all disks, instead of ++needing to run an nbdkit instance per disk, which can greatly reduce ++the number of external processes that virt-v2v will run. The ++performance and results should not be different. To take full ++advantage of this you have to use nbdkit E 1.44. ++ + Several typos and spelling mistakes in the documentation were fixed + (thanks Eric Blake). + ++Duplicated code used to parse input (I<-i>) and output (I<-o>)) ++options across the tools has been refactored in one place. ++ ++Some internal OCaml List and String functions that we used have been ++replaced by ones from the OCaml stdlib, reducing code maintenance. ++ + =head2 Bugs fixed + + =begin comment + + ./bugs-in-changelog.sh v2.6.0.. + +-# List below updated to d6990738b05d91a9491e9dbfe6480033e1f4ea86 ++# List below updated to b49ee1436870f720cd0a4aee7593f38fa9f4089f + + =end comment + +@@ -261,11 +277,19 @@ There is no nbdcopy info in v2v debug log since virt-v2v version + + virt-v2v-inspector is failing on snapshots of running VMs [rhel-9.7] + ++=item L ++ ++Add possible roots to the virt-v2v-inspector output [rhel-9.7] ++ + =item L + + virt-v2v 2.7.4 error: libguestfs error: you must call + guestfs_add_drive before guestfs_launch + ++=item L ++ ++Rename RHV to oVirt ++ + =back + + =head1 SEE ALSO diff --git a/0003-input-vddk-Break-long-line-of-code.patch b/0003-input-vddk-Break-long-line-of-code.patch new file mode 100644 index 0000000..8fc361f --- /dev/null +++ b/0003-input-vddk-Break-long-line-of-code.patch @@ -0,0 +1,23 @@ +From ac371ca18a152a2fb5351eb2a6c6326cf7c91fef Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 13 May 2025 12:00:26 +0100 +Subject: [PATCH] input: vddk: Break long line of code + +--- + input/input_vddk.ml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/input/input_vddk.ml b/input/input_vddk.ml +index f5e2aa98..cf6e9be6 100644 +--- a/input/input_vddk.ml ++++ b/input/input_vddk.ml +@@ -166,7 +166,8 @@ information on these settings. + match uri.Xml.uri_server with + | Some server -> server + | None -> +- error (f_"‘-ic %s’ URL does not contain a host name field") input_conn in ++ error (f_"‘-ic %s’ URL does not contain a host name field") ++ input_conn in + + (* For VDDK we require some user. If it's not supplied, assume root. *) + let user = uri.Xml.uri_user |> Option.value ~default:"root" in diff --git a/0004-TODO-Rewrite-this-document.patch b/0004-TODO-Rewrite-this-document.patch new file mode 100644 index 0000000..950bd8d --- /dev/null +++ b/0004-TODO-Rewrite-this-document.patch @@ -0,0 +1,76 @@ +From fe46c3df89dd597777e017b7a2cbc43f401d8364 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Tue, 13 May 2025 12:08:09 +0100 +Subject: [PATCH] TODO: Rewrite this document + +Remove to-do items about ovirt-upload, since that is unmaintained at +the moment. + +Add an item about how we open too many connections to the NBD +endpoint. +--- + TODO | 49 ++++++++++++++++++++++--------------------------- + 1 file changed, 22 insertions(+), 27 deletions(-) + +diff --git a/TODO b/TODO +index e30e18e8..34d8f957 100644 +--- a/TODO ++++ b/TODO +@@ -1,35 +1,30 @@ +-virt-v2v -o ovirt-upload +----------------------- ++To-do list for virt-v2v ++====================================================================== + +-* Set or disable the ticket timeout. The default is going to be +- increased (from current 60 seconds), so maybe we won't have to +- set it. See also: +- https://bugzilla.redhat.com/show_bug.cgi?id=1563278 ++We open the input NBD endpoint up to 5 times per disk during a ++conversion (especially if --verbose mode is used): + +-* qcow2 cannot be supported yet because there is not yet any +- concept in imageio of read+write handles. +- https://bugzilla.redhat.com/show_bug.cgi?id=1563299 ++ * Once for conversion + +-* preallocated cannot be supported yet because imageio doesn't +- know how to zero the image efficiently, instead it runs an +- fallocate process which writes to every block and that takes +- many minutes. ++ * nbdinfo opens the connection twice (because we're using --content) + +-* Really check what insecure/rhv_cafile do and implement it correctly. ++ * The output side opens the input connection just to get the virtual ++ size of the disk, so it knows how large to create the output disk. ++ (Could be avoided if conversion kept this information, but that's a ++ layering violation.) + +-* Measure and resolve performance problems. ++ * once for nbdcopy + +-* Allocated image size is unknown for v2v uploads, but imageio needs +- to know it. We pass initial_size == provisioned_size == virtual size. +- That can't be fixed from the v2v side. ++This has quite a lot of overhead for some inputs. For VDDK, opening a ++connection is very slow. In one conversion of a guest with 5 disks I ++measured 10% of the total run time of virt-v2v being spent simply ++opening VDDK connections (5 x 5 = 25 times in all). + +-* There are unresolved issues about how to clean up disks on failure. ++-- + +-virt-v2v -o openstack +---------------------- +- +-Use the metadata service to find the -oo server-id setting. It would +-no longer need to be specified on the command line. Note there are +-two variations of metadata service in OpenStack, either the config +-disk or link-local network address. We would need to support both, or +-the possibility that there is no metadata service. ++In virt-v2v -o openstack Use the metadata service to find the -oo ++server-id setting. It would no longer need to be specified on the ++command line. Note there are two variations of metadata service in ++OpenStack, either the config disk or link-local network address. We ++would need to support both, or the possibility that there is no ++metadata service. diff --git a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch b/0005-RHEL-Fixes-for-libguestfs-winsupport.patch similarity index 72% rename from 0004-RHEL-Fixes-for-libguestfs-winsupport.patch rename to 0005-RHEL-Fixes-for-libguestfs-winsupport.patch index 7733077..38c24b3 100644 --- a/0004-RHEL-Fixes-for-libguestfs-winsupport.patch +++ b/0005-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -1,7 +1,7 @@ -From 6922ab78c58d6c6da604d88f0be482bb0d2e8273 Mon Sep 17 00:00:00 2001 +From d974b64916edb1b8f49237572c2cf6daae026ecf Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 30 Aug 2015 03:21:57 -0400 -Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport +Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport. In tests we cannot use guestfish for arbitrary Windows edits. In virt-v2v helpers we must set the program name to virt-v2v. @@ -9,20 +9,19 @@ In virt-v2v helpers we must set the program name to virt-v2v. For RHEL 9.3 and above, see this comment: https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1 --- - convert/convert.ml | 1 + - test-data/phony-guests/make-windows-img.sh | 1 + - tests/test-block-driver.sh | 6 +++++- - tests/test-in-place.sh | 8 +++++++- - tests/test-virtio-win-iso.sh | 8 +++++++- - tests/test-windows-conversion.sh | 8 +++++++- - tests/test-windows-phony.sh | 13 ++++++++++++- - 7 files changed, 40 insertions(+), 5 deletions(-) + convert/convert.ml | 1 + + test-data/phony-guests/make-windows-img.sh | 1 + + tests/test-block-driver.sh | 6 +++++- + tests/test-in-place.sh | 8 +++++++- + tests/test-virtio-win-iso.sh | 8 +++++++- + tests/test-windows-conversion.sh | 8 +++++++- + 6 files changed, 28 insertions(+), 4 deletions(-) diff --git a/convert/convert.ml b/convert/convert.ml -index c05ed61f..676a4f2a 100644 +index 66d1361f..15845a20 100644 --- a/convert/convert.ml +++ b/convert/convert.ml -@@ -53,6 +53,7 @@ let rec convert dir options source = +@@ -53,6 +53,7 @@ let rec convert input_disks options source = message (f_"Opening the source"); let g = open_guestfs ~identifier:"v2v" () in @@ -135,32 +134,3 @@ index bfe04904..eeddcb86 100755 diff -u "$expected" "$response" # We also update the Registry several times, for firstboot, and (ONLY -diff --git a/tests/test-windows-phony.sh b/tests/test-windows-phony.sh -index 4e931731..007e6dc9 100755 ---- a/tests/test-windows-phony.sh -+++ b/tests/test-windows-phony.sh -@@ -71,6 +71,17 @@ mktest () - :> "$script" - :> "$expected" - -+cat >> "$script" <> "$expected" < "$response" -+guestfish --ro -a "$d/$guestname-sda" < "$script" > "$response" - diff -u "$expected" "$response" diff --git a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch b/0006-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch similarity index 87% rename from 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch rename to 0006-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch index 35306ce..02bf93c 100644 --- a/0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +++ b/0006-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch @@ -1,4 +1,4 @@ -From 6db9961b52eee526f5a685c78d48e64e5ef429db Mon Sep 17 00:00:00 2001 +From 3f4ccc36b8f87b5dad4b63572c3da77b6156bcc5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 28 Sep 2014 19:14:43 +0100 Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode @@ -16,10 +16,10 @@ support cases. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index 2a21b5cf..39778724 100644 +index 47a6f4ff..909b6e10 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml -@@ -159,7 +159,7 @@ module QEMU = struct +@@ -164,7 +164,7 @@ module QEMU = struct * module deals with shell and qemu comma quoting. *) let cmd = Qemuopts.create () in diff --git a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch b/0007-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch similarity index 67% rename from 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch rename to 0007-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch index 742423d..57709b6 100644 --- a/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +++ b/0007-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch @@ -1,4 +1,4 @@ -From f6ee4c28511072d5091048b482c7a1fb6751bc48 Mon Sep 17 00:00:00 2001 +From 356fce60d60427361053bf4e2e4f2db9de891ebd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 30 Sep 2014 10:50:27 +0100 Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option @@ -11,10 +11,9 @@ In addition you will have to edit the -display option in the qemu script. --- docs/virt-v2v-output-local.pod | 6 ++---- - docs/virt-v2v.pod | 17 ----------------- + docs/virt-v2v.pod | 13 ------------- output/output_qemu.ml | 3 +++ - v2v/v2v.ml | 2 -- - 4 files changed, 5 insertions(+), 23 deletions(-) + 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod index 5a342434..bdf12c5d 100644 @@ -44,7 +43,7 @@ index 5a342434..bdf12c5d 100644 =item B<-o null> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index dfeefed5..d4b87e7f 100644 +index e4ceafc2..100befd7 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -159,11 +159,6 @@ Since F contains the path(s) to the guest disk @@ -59,17 +58,17 @@ index dfeefed5..d4b87e7f 100644 =head1 OPTIONS =over 4 -@@ -535,9 +530,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -543,9 +538,6 @@ This is similar to I<-o local>, except that a shell script is written which you can use to boot the guest in qemu. The converted disks and shell script are written to the directory specified by I<-os>. -When using this output mode, you can also specify the I<-oo qemu-boot> -option which boots the guest under qemu immediately. - - =item B<-o> B + =item B<-o> B - This is the same as I<-o rhv>. -@@ -620,11 +612,6 @@ For I<-o openstack> (L) only, set a guest ID + Set the output method to I. +@@ -603,11 +595,6 @@ For I<-o openstack> (L) only, set a guest ID which is saved on each Cinder volume in the C volume property. @@ -81,19 +80,8 @@ index dfeefed5..d4b87e7f 100644 =item B<-oo verify-server-certificate> =item B<-oo verify-server-certificate=>C -@@ -808,10 +795,6 @@ Print information about the source guest and stop. This option is - useful when you are setting up network and bridge maps. - See L. - --=item B<--qemu-boot> -- --This is the same as I<-oo qemu-boot>. -- - =item B<-q> - - =item B<--quiet> diff --git a/output/output_qemu.ml b/output/output_qemu.ml -index 39778724..416000cd 100644 +index 909b6e10..37371aad 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml @@ -65,6 +65,9 @@ module QEMU = struct @@ -106,16 +94,3 @@ index 39778724..416000cd 100644 (* -os must be set to a directory. *) let output_storage = match options.output_storage with -diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index d0a5432f..70f506cd 100644 ---- a/v2v/v2v.ml -+++ b/v2v/v2v.ml -@@ -273,8 +273,6 @@ let rec main () = - s_"Run up to N instances of nbdcopy in parallel"; - [ L"print-source" ], Getopt.Set print_source, - s_"Print source and stop"; -- [ L"qemu-boot" ], Getopt.Unit (fun () -> set_output_option_compat "qemu-boot" ""), -- s_"Boot in qemu (-o qemu only)"; - [ L"root" ], Getopt.String ("ask|... ", set_root_choice), - s_"How to choose root filesystem"; - [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"), diff --git a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch b/0008-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch similarity index 83% rename from 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch rename to 0008-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch index be376c7..5ca02e0 100644 --- a/0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +++ b/0008-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch @@ -1,4 +1,4 @@ -From 32759b5c09eded1f9203deab4bbdd2e18aff15ec Mon Sep 17 00:00:00 2001 +From 92faf39ff792662037068ae01231bc102e222962 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 24 Apr 2015 09:45:41 -0400 Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu @@ -9,10 +9,10 @@ Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils.ml b/lib/utils.ml -index 9568a9d9..b30ac256 100644 +index f3f7a205..7b0d2327 100644 --- a/lib/utils.ml +++ b/lib/utils.ml -@@ -66,13 +66,14 @@ let kvm_arch = function +@@ -81,13 +81,14 @@ let kvm_arch = function (* Does qemu support the given sound card? *) let qemu_supports_sound_card = function | Types.AC97 diff --git a/0009-RHEL-Fixes-for-libguestfs-winsupport.patch b/0009-RHEL-Fixes-for-libguestfs-winsupport.patch new file mode 100644 index 0000000..050aefa --- /dev/null +++ b/0009-RHEL-Fixes-for-libguestfs-winsupport.patch @@ -0,0 +1,43 @@ +From f86881542194d3abb9337cde07b66ae87d14ac6d Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 30 Aug 2015 03:21:57 -0400 +Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport + +In tests we cannot use guestfish for arbitrary Windows edits. +In virt-v2v helpers we must set the program name to virt-v2v. + +For RHEL 9.3 and above, see this comment: +https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1 +--- + tests/test-windows-phony.sh | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/tests/test-windows-phony.sh b/tests/test-windows-phony.sh +index 4e931731..007e6dc9 100755 +--- a/tests/test-windows-phony.sh ++++ b/tests/test-windows-phony.sh +@@ -71,6 +71,17 @@ mktest () + :> "$script" + :> "$expected" + ++cat >> "$script" <> "$expected" < "$response" ++guestfish --ro -a "$d/$guestname-sda" < "$script" > "$response" + diff -u "$expected" "$response" diff --git a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch b/0010-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch similarity index 89% rename from 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch rename to 0010-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch index 6951ad7..9f3b206 100644 --- a/0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +++ b/0010-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch @@ -1,4 +1,4 @@ -From 10b274ecf973868431abe20073684d74934bff4d Mon Sep 17 00:00:00 2001 +From 03c59620c41498c9d5e00b30850c33f0d1b635b2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Mar 2017 14:21:37 +0100 Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671) @@ -9,7 +9,7 @@ The SDL output mode is not supported in RHEL's qemu-kvm. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/input_disk.ml b/input/input_disk.ml -index 61ac9a8b..a54f06f9 100644 +index 8b027fed..6dd1b0cf 100644 --- a/input/input_disk.ml +++ b/input/input_disk.ml @@ -78,7 +78,7 @@ module Disk = struct diff --git a/0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch b/0011-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch similarity index 94% rename from 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch rename to 0011-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch index 8610df4..f73d4c8 100644 --- a/0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +++ b/0011-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch @@ -1,4 +1,4 @@ -From 868473dc34a7c9764bd3369cb0c98d6a46c851c4 Mon Sep 17 00:00:00 2001 +From 5b648f5fb38d84a2308e128a197c553c9a4e97fb Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 26 Mar 2019 09:42:25 +0100 Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests @@ -8,7 +8,7 @@ Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests 1 file changed, 4 insertions(+), 92 deletions(-) diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod -index 60cd1b69..f563389e 100644 +index f8ba7e13..e1c5c1eb 100644 --- a/docs/virt-v2v-support.pod +++ b/docs/virt-v2v-support.pod @@ -8,98 +8,10 @@ systems and guests in virt-v2v @@ -70,7 +70,7 @@ index 60cd1b69..f563389e 100644 - -=item OpenStack - --=item Red Hat Virtualization (RHV) 4.1 and up +-=item oVirt 4.1 and up - -=item Local libvirt - diff --git a/0007-RHEL-Remove-input-from-Xen.patch b/0012-RHEL-Remove-input-from-Xen.patch similarity index 81% rename from 0007-RHEL-Remove-input-from-Xen.patch rename to 0012-RHEL-Remove-input-from-Xen.patch index 39ff2aa..6340e3a 100644 --- a/0007-RHEL-Remove-input-from-Xen.patch +++ b/0012-RHEL-Remove-input-from-Xen.patch @@ -1,4 +1,4 @@ -From 3bac67c131798ee43018302260e4e3f28a283d1b Mon Sep 17 00:00:00 2001 +From c20502fd651748ca1183fcbf696b8b846c390589 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 09:35:54 +0100 Subject: [PATCH] RHEL: Remove input from Xen @@ -12,18 +12,18 @@ Fixes: https://issues.redhat.com/browse/RHEL-37687 docs/Makefile.am | 14 ---- docs/virt-v2v-input-xen.pod | 154 ------------------------------------ docs/virt-v2v.pod | 50 ++---------- - input/Makefile.am | 4 +- - input/input_xen_ssh.ml | 132 ------------------------------- + input/Makefile.am | 2 - + input/input_xen_ssh.ml | 136 ------------------------------- input/input_xen_ssh.mli | 21 ----- - inspector/inspector.ml | 4 - - v2v/v2v.ml | 5 -- - 8 files changed, 6 insertions(+), 378 deletions(-) + input/select_input.ml | 4 - + v2v/v2v.ml | 1 - + 8 files changed, 5 insertions(+), 377 deletions(-) delete mode 100644 docs/virt-v2v-input-xen.pod delete mode 100644 input/input_xen_ssh.ml delete mode 100644 input/input_xen_ssh.mli diff --git a/docs/Makefile.am b/docs/Makefile.am -index e86ee777..3faa8c7d 100644 +index 14b0b074..aa899304 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -23,7 +23,6 @@ EXTRA_DIST = \ @@ -32,25 +32,25 @@ index e86ee777..3faa8c7d 100644 virt-v2v-input-vmware.pod \ - virt-v2v-input-xen.pod \ virt-v2v-inspector.pod \ + virt-v2v-open.pod \ virt-v2v-output-local.pod \ - virt-v2v-output-openstack.pod \ -@@ -44,7 +43,6 @@ man_MANS = \ +@@ -45,7 +44,6 @@ man_MANS = \ virt-v2v-hacking.1 \ virt-v2v-in-place.1 \ virt-v2v-input-vmware.1 \ - virt-v2v-input-xen.1 \ virt-v2v-inspector.1 \ + virt-v2v-open.1 \ virt-v2v-output-local.1 \ - virt-v2v-output-openstack.1 \ -@@ -62,7 +60,6 @@ noinst_DATA = \ +@@ -64,7 +62,6 @@ noinst_DATA = \ $(top_builddir)/website/virt-v2v-hacking.1.html \ $(top_builddir)/website/virt-v2v-in-place.1.html \ $(top_builddir)/website/virt-v2v-input-vmware.1.html \ - $(top_builddir)/website/virt-v2v-input-xen.1.html \ $(top_builddir)/website/virt-v2v-inspector.1.html \ + $(top_builddir)/website/virt-v2v-open.1.html \ $(top_builddir)/website/virt-v2v-output-local.1.html \ - $(top_builddir)/website/virt-v2v-output-openstack.1.html \ -@@ -122,17 +119,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod +@@ -125,17 +122,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod $< touch $@ @@ -229,7 +229,7 @@ index 0417e89f..00000000 - -Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index d4b87e7f..db28b91f 100644 +index 100befd7..e0baa16f 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -12,7 +12,7 @@ virt-v2v - Convert a guest to use KVM @@ -239,8 +239,8 @@ index d4b87e7f..db28b91f 100644 -KVM. It can read Linux and Windows guests running on VMware, Xen, +KVM. It can read Linux and Windows guests running on VMware, Hyper-V and some other hypervisors, and convert them to KVM managed by - libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several - other targets. It can modify the guest to make it bootable on KVM and + libvirt, OpenStack, oVirt, or several other targets. It can modify + the guest to make it bootable on KVM and install virtio drivers so it @@ -59,8 +59,6 @@ management systems, guests. L — Input from VMware. @@ -249,7 +249,7 @@ index d4b87e7f..db28b91f 100644 - L — Output to local files or local libvirt. - L — Output to oVirt or RHV. + L — Output to oVirt @@ -188,10 +186,6 @@ This is only supported for: =item * @@ -261,7 +261,7 @@ index d4b87e7f..db28b91f 100644 L when using the SSH transport method -@@ -307,12 +301,10 @@ hypervisor. See L. +@@ -303,12 +297,10 @@ hypervisor. See L. Specify a libvirt connection URI to use when reading the guest. This is only used when S>. @@ -277,7 +277,7 @@ index d4b87e7f..db28b91f 100644 =item B<-if> format -@@ -871,38 +863,6 @@ __CUSTOMIZE_OPTIONS__ +@@ -857,38 +849,6 @@ __CUSTOMIZE_OPTIONS__ =head1 NOTES @@ -326,7 +326,7 @@ index d4b87e7f..db28b91f 100644 =head3 Disk space diff --git a/input/Makefile.am b/input/Makefile.am -index 19f30b47..a33b826a 100644 +index d5e77f76..98ea5223 100644 --- a/input/Makefile.am +++ b/input/Makefile.am @@ -29,7 +29,6 @@ SOURCES_MLI = \ @@ -337,22 +337,20 @@ index 19f30b47..a33b826a 100644 name_from_disk.mli \ nbdkit_curl.mli \ nbdkit_ssh.mli \ -@@ -60,8 +59,7 @@ SOURCES_ML = \ - input_ova.ml \ +@@ -60,7 +59,6 @@ SOURCES_ML = \ input_vcenter_https.ml \ input_vddk.ml \ -- input_vmx.ml \ -- input_xen_ssh.ml -+ input_vmx.ml + input_vmx.ml \ +- input_xen_ssh.ml \ + select_input.ml # We pretend that we're building a C library. automake handles the - # compilation of the C sources for us. At the end we take the C diff --git a/input/input_xen_ssh.ml b/input/input_xen_ssh.ml deleted file mode 100644 -index 77ee0ea1..00000000 +index 45864cfe..00000000 --- a/input/input_xen_ssh.ml +++ /dev/null -@@ -1,132 +0,0 @@ +@@ -1,136 +0,0 @@ -(* helper-v2v-input - * Copyright (C) 2009-2025 Red Hat Inc. - * @@ -455,35 +453,39 @@ index 77ee0ea1..00000000 - | Some ip -> Some (Nbdkit_ssh.PasswordFile ip) in - - (* Create an nbdkit instance for each disk. *) -- List.iteri ( -- fun i { d_format = format; d_type } -> -- let socket = sprintf "%s/in%d" dir i in -- On_exit.unlink socket; +- let uris = +- List.mapi ( +- fun i { d_format = format; d_type } -> +- let socket = sprintf "%s/in%d" dir i in +- On_exit.unlink socket; - -- match d_type with -- | NBD _ | HTTP _ -> (* These should never happen? *) -- assert false +- (match d_type with +- | NBD _ | HTTP _ -> (* These should never happen? *) +- assert false - -- | BlockDev _ -> -- (* Conversion from a remote block device over SSH isn't -- * supported because OpenSSH sftp server doesn't know how -- * to get the size of a block device. Therefore we disallow -- * this and refer users to the manual. -- *) -- error (f_"input from xen over ssh does not support disks stored on \ -- remote block devices. See virt-v2v-input-xen(1) \ -- section \"Xen or ssh conversions from block devices\".") +- | BlockDev _ -> +- (* Conversion from a remote block device over SSH isn't +- * supported because OpenSSH sftp server doesn't know how +- * to get the size of a block device. Therefore we disallow +- * this and refer users to the manual. +- *) +- error (f_"input from xen over ssh does not support disks stored \ +- on remote block devices. See virt-v2v-input-xen(1) \ +- section \"Xen or ssh conversions from block devices\".") - -- | LocalFile path -> -- let cor = dir // "convert" in -- let bandwidth = options.bandwidth in -- let nbdkit = Nbdkit_ssh.create_ssh ?bandwidth ~cor ?password -- ?port ~server ?user path in -- let _, pid = Nbdkit.run_unix socket nbdkit in -- On_exit.kill pid -- ) disks; +- | LocalFile path -> +- let cor = dir // "convert" in +- let bandwidth = options.bandwidth in +- let nbdkit = Nbdkit_ssh.create_ssh ?bandwidth ~cor ?password +- ?port ~server ?user path in +- let _, pid = Nbdkit.run_unix socket nbdkit in +- On_exit.kill pid +- ); - -- source +- NBD_URI.Unix (socket, None) +- ) disks in +- +- source, uris -end diff --git a/input/input_xen_ssh.mli b/input/input_xen_ssh.mli deleted file mode 100644 @@ -512,26 +514,26 @@ index 339309b8..00000000 -(** Input from Xen over SSH *) - -module XenSSH : Input.INPUT -diff --git a/inspector/inspector.ml b/inspector/inspector.ml -index d4e07e60..63a6f24f 100644 ---- a/inspector/inspector.ml -+++ b/inspector/inspector.ml -@@ -289,10 +289,6 @@ read the man page virt-v2v-inspector(1). - | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK -> - (module Input_vddk.VDDK) +diff --git a/input/select_input.ml b/input/select_input.ml +index 785fcae6..e1c2002f 100644 +--- a/input/select_input.ml ++++ b/input/select_input.ml +@@ -70,10 +70,6 @@ let select_input ?(allow_remote = true) input_mode input_conn input_transport = + | Some server, Some ("esx"|"gsx"|"vpx"), Some Input.VDDK, true -> + (module Input_vddk.VDDK) -- (* Xen over SSH *) -- | Some server, Some "xen+ssh", _ -> -- (module Input_xen_ssh.XenSSH) +- (* Xen over SSH *) +- | Some server, Some "xen+ssh", _, true -> +- (module Input_xen_ssh.XenSSH) - - (* Old virt-v2v also supported qemu+ssh://. However I am - * deliberately not supporting this in new virt-v2v. Don't - * use virt-v2v if a guest already runs on KVM. + (* Old virt-v2v also supported qemu+ssh://. However I am + * deliberately not supporting this in new virt-v2v. Don't + * use virt-v2v if a guest already runs on KVM. diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 70f506cd..edd2ba0f 100644 +index cb62d847..b5e479bd 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -397,7 +397,6 @@ read the man page virt-v2v(1). +@@ -327,7 +327,6 @@ read the man page virt-v2v(1). pr "virt-v2v-2.0\n"; pr "libguestfs-rewrite\n"; pr "vcenter-https\n"; @@ -539,14 +541,3 @@ index 70f506cd..edd2ba0f 100644 pr "vddk\n"; pr "colours-option\n"; pr "vdsm-compat-option\n"; -@@ -463,10 +462,6 @@ read the man page virt-v2v(1). - | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK -> - (module Input_vddk.VDDK) - -- (* Xen over SSH *) -- | Some server, Some "xen+ssh", _ -> -- (module Input_xen_ssh.XenSSH) -- - (* Old virt-v2v also supported qemu+ssh://. However I am - * deliberately not supporting this in new virt-v2v. Don't - * use virt-v2v if a guest already runs on KVM. diff --git a/0008-RHEL-Remove-o-glance.patch b/0013-RHEL-Remove-o-glance.patch similarity index 74% rename from 0008-RHEL-Remove-o-glance.patch rename to 0013-RHEL-Remove-o-glance.patch index e35a6c0..373ef60 100644 --- a/0008-RHEL-Remove-o-glance.patch +++ b/0013-RHEL-Remove-o-glance.patch @@ -1,4 +1,4 @@ -From 02e759299c0da04d589f3909b45835d27829d322 Mon Sep 17 00:00:00 2001 +From 2bd28ced53017ac11ac8350c0dba78edc8ee4577 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 30 Jun 2021 11:15:52 +0100 Subject: [PATCH] RHEL: Remove -o glance @@ -8,9 +8,11 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539 docs/virt-v2v-output-openstack.pod | 54 ++---------------------------- docs/virt-v2v.pod | 20 ----------- output/output_glance.mli | 2 +- + output/select_output.ml | 4 +-- + output/select_output.mli | 2 +- tests/test-o-glance.sh | 3 ++ - v2v/v2v.ml | 7 +--- - 5 files changed, 7 insertions(+), 79 deletions(-) + v2v/v2v.ml | 5 +-- + 7 files changed, 9 insertions(+), 81 deletions(-) diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod index 9bef76ea..04595816 100644 @@ -98,10 +100,10 @@ index 9bef76ea..04595816 100644 =head1 AUTHOR diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index db28b91f..040baae2 100644 +index e0baa16f..c32e6db6 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -440,14 +440,6 @@ See L below. +@@ -436,14 +436,6 @@ See L below. This is the same as I<-o local>. @@ -152,6 +154,44 @@ index 83d67576..7ab1503c 100644 -module Glance : Output.OUTPUT +(*module Glance : Output.OUTPUT*) +diff --git a/output/select_output.ml b/output/select_output.ml +index 299d8463..eaee5bb5 100644 +--- a/output/select_output.ml ++++ b/output/select_output.ml +@@ -19,11 +19,10 @@ + open Tools_utils + open Common_gettext.Gettext + +-type output_mode = Disk | Glance | Kubevirt | Libvirt | Null ++type output_mode = Disk | Kubevirt | Libvirt | Null + | Openstack | OVirt | OVirt_Upload | QEmu | VDSM + + let output_mode_of_string = function +- | "glance" -> Glance + | "kubevirt" -> Kubevirt + | "libvirt" -> Libvirt + | "disk" | "local" -> Disk +@@ -41,7 +40,6 @@ let select_output = function + | Some Disk -> (module Output_disk.Disk) + | Some Null -> (module Output_null.Null) + | Some QEmu -> (module Output_qemu.QEMU) +- | Some Glance -> (module Output_glance.Glance) + | Some Kubevirt -> (module Output_kubevirt.Kubevirt) + | Some Openstack -> (module Output_openstack.Openstack) + | Some OVirt_Upload -> (module Output_ovirt_upload.OVirtUpload) +diff --git a/output/select_output.mli b/output/select_output.mli +index ff9d3d32..5c13572e 100644 +--- a/output/select_output.mli ++++ b/output/select_output.mli +@@ -16,7 +16,7 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +-type output_mode = Disk | Glance | Kubevirt | Libvirt | Null ++type output_mode = Disk | Kubevirt | Libvirt | Null + | Openstack | OVirt | OVirt_Upload | QEmu | VDSM + (** [-o] option on the command line *) + diff --git a/tests/test-o-glance.sh b/tests/test-o-glance.sh index 9e32d2bf..632579ee 100755 --- a/tests/test-o-glance.sh @@ -167,27 +207,19 @@ index 9e32d2bf..632579ee 100755 set -e set -x diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index edd2ba0f..08177280 100644 +index b5e479bd..284af43c 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml -@@ -191,7 +191,6 @@ let rec main () = - if !output_mode <> `Not_set then - error (f_"%s option used more than once on the command line") "-o"; - match mode with -- | "glance" -> output_mode := `Glance - | "kubevirt" -> output_mode := `Kubevirt - | "libvirt" -> output_mode := `Libvirt - | "disk" | "local" -> output_mode := `Disk -@@ -251,7 +250,7 @@ let rec main () = +@@ -213,7 +213,7 @@ let rec main () = + s_"Map NIC to network or bridge or assign static IP"; + [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), s_"Map network ‘in’ to ‘out’"; - [ L"no-trim" ], Getopt.String ("-", no_trim_warning), - s_"Ignored for backwards compatibility"; -- [ S 'o' ], Getopt.String ("glance|kubevirt|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode), -+ [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode), +- [ S 'o' ], Getopt.String ("glance|kubevirt|libvirt|local|null|openstack|ovirt|ovirt-upload|qemu|vdsm", set_output_mode), ++ [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|ovirt|ovirt-upload|qemu|vdsm", set_output_mode), s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -329,8 +328,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp +@@ -259,8 +259,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp @@ -196,7 +228,7 @@ index edd2ba0f..08177280 100644 There is a companion front-end called \"virt-p2v\" which comes as an ISO or CD image that can be booted on physical machines. -@@ -411,7 +408,6 @@ read the man page virt-v2v(1). +@@ -341,7 +339,6 @@ read the man page virt-v2v(1). pr "input:libvirtxml\n"; pr "input:ova\n"; pr "input:vmx\n"; @@ -204,11 +236,3 @@ index edd2ba0f..08177280 100644 pr "output:kubevirt\n"; pr "output:libvirt\n"; pr "output:local\n"; -@@ -504,7 +500,6 @@ read the man page virt-v2v(1). - | `Disk -> (module Output_disk.Disk) - | `Null -> (module Output_null.Null) - | `QEmu -> (module Output_qemu.QEMU) -- | `Glance -> (module Output_glance.Glance) - | `Kubevirt -> (module Output_kubevirt.Kubevirt) - | `Openstack -> (module Output_openstack.Openstack) - | `RHV_Upload -> (module Output_rhv_upload.RHVUpload) diff --git a/0009-RHEL-tests-Remove-btrfs-test.patch b/0014-RHEL-tests-Remove-btrfs-test.patch similarity index 86% rename from 0009-RHEL-tests-Remove-btrfs-test.patch rename to 0014-RHEL-tests-Remove-btrfs-test.patch index 67fade3..4cac76f 100644 --- a/0009-RHEL-tests-Remove-btrfs-test.patch +++ b/0014-RHEL-tests-Remove-btrfs-test.patch @@ -1,4 +1,4 @@ -From 5b58bee765577287069b3e51fc41079ed980b61c Mon Sep 17 00:00:00 2001 +From 1ffbc2996a92e7baa01f0bc9960f0dfff311d5d6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 07819679..cedd99bc 100644 +index 62237092..51d84bc9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -64,7 +64,6 @@ TESTS = \ diff --git a/0010-RHEL-Remove-block-driver-option.patch b/0015-RHEL-Remove-block-driver-option.patch similarity index 88% rename from 0010-RHEL-Remove-block-driver-option.patch rename to 0015-RHEL-Remove-block-driver-option.patch index 398cf0a..6082744 100644 --- a/0010-RHEL-Remove-block-driver-option.patch +++ b/0015-RHEL-Remove-block-driver-option.patch @@ -1,4 +1,4 @@ -From 26f191d0762238d0f5b76b5c055cd01d128d0db5 Mon Sep 17 00:00:00 2001 +From 8258ebaa6ee4106f4fcb447aabc84838101c44a1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 28 Apr 2023 12:28:19 +0100 Subject: [PATCH] RHEL: Remove --block-driver option @@ -37,7 +37,7 @@ index 6c02a99c..3d0d1b28 100644 =item B<--colours> diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index 040baae2..af19bfb0 100644 +index c32e6db6..2afd6182 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod @@ -211,16 +211,6 @@ The options are silently ignored for other input methods. @@ -58,7 +58,7 @@ index 040baae2..af19bfb0 100644 =item B<--colours> diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 5b00884d..84e783dc 100644 +index 01fa9d24..dc19dca7 100644 --- a/in-place/in_place.ml +++ b/in-place/in_place.ml @@ -49,7 +49,6 @@ let rec main () = @@ -69,7 +69,7 @@ index 5b00884d..84e783dc 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -165,8 +164,6 @@ let rec main () = +@@ -158,8 +157,6 @@ let rec main () = let argspec = [ [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge ‘in’ to ‘out’"; @@ -78,7 +78,7 @@ index 5b00884d..84e783dc 100644 [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode), s_"Set input mode (default: libvirt)"; [ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn), -@@ -233,12 +230,6 @@ read the man page virt-v2v-in-place(1). +@@ -226,12 +223,6 @@ read the man page virt-v2v-in-place(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -91,7 +91,7 @@ index 5b00884d..84e783dc 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -326,7 +317,7 @@ read the man page virt-v2v-in-place(1). +@@ -296,7 +287,7 @@ read the man page virt-v2v-in-place(1). (* Get the conversion options. *) let conv_options = { @@ -101,7 +101,7 @@ index 5b00884d..84e783dc 100644 ks = opthandle.ks; network_map; diff --git a/tests/Makefile.am b/tests/Makefile.am -index cedd99bc..befa9337 100644 +index 51d84bc9..f64316fd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,7 +57,6 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test @@ -113,7 +113,7 @@ index cedd99bc..befa9337 100644 test-checksum-bad.sh \ test-checksum-good-qcow2.sh \ diff --git a/v2v/v2v.ml b/v2v/v2v.ml -index 08177280..e656afa3 100644 +index 284af43c..673ce688 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -48,7 +48,6 @@ let rec main () = @@ -124,16 +124,16 @@ index 08177280..e656afa3 100644 let input_conn = ref None in let input_format = ref None in let input_password = ref None in -@@ -226,8 +225,6 @@ let rec main () = +@@ -193,8 +192,6 @@ let rec main () = s_"Set bandwidth dynamically from file"; [ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge), s_"Map bridge ‘in’ to ‘out’"; - [ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver), - s_"Prefer 'virtio-blk' or 'virtio-scsi'"; - [ L"compressed" ], Getopt.Unit (fun () -> set_output_option_compat "compressed" ""), - s_"Compress output file (-of qcow2 only)"; [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode), -@@ -356,12 +353,6 @@ read the man page virt-v2v(1). + s_"Set input mode (default: libvirt)"; + [ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn), +@@ -287,12 +284,6 @@ read the man page virt-v2v(1). (* Dereference the arguments. *) let args = List.rev !args in @@ -146,7 +146,7 @@ index 08177280..e656afa3 100644 let customize_ops = get_customize_ops () in let input_conn = !input_conn in let input_mode = !input_mode in -@@ -534,7 +525,7 @@ read the man page virt-v2v(1). +@@ -415,7 +406,7 @@ read the man page virt-v2v(1). (* Get the conversion options. *) let conv_options = { diff --git a/0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch b/0016-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch similarity index 80% rename from 0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch rename to 0016-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch index aa1f30e..3a937a0 100644 --- a/0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch +++ b/0016-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch @@ -1,117 +1,119 @@ -From 821a2ad91d5ddcefa9b74c87a86ca64b35c65c85 Mon Sep 17 00:00:00 2001 +From b458c7097acb171bef9a947daeb26423c868fe01 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 8 Jul 2024 09:56:54 +0100 -Subject: [PATCH] RHEL: Remove -o rhv, -o rhv-upload and -o vdsm modes +Subject: [PATCH] RHEL: Remove -o ovirt, -o ovirt-upload and -o vdsm modes Fixes: https://issues.redhat.com/browse/RHEL-36712 --- docs/Makefile.am | 14 - - docs/virt-v2v-output-rhv.pod | 232 -------- - docs/virt-v2v.pod | 208 +------ - output/Makefile.am | 54 +- - output/output_rhv.ml | 317 ----------- - output/output_rhv.mli | 21 - - output/output_rhv_upload.ml | 520 ----------------- - output/output_rhv_upload.mli | 21 - - output/output_rhv_upload_cancel_source.mli | 19 - - output/output_rhv_upload_createvm_source.mli | 19 - - output/output_rhv_upload_finalize_source.mli | 19 - - output/output_rhv_upload_plugin_source.mli | 19 - - output/output_rhv_upload_precheck_source.mli | 19 - - output/output_rhv_upload_transfer_source.mli | 19 - - output/output_rhv_upload_vmcheck_source.mli | 19 - - output/output_vdsm.ml | 237 -------- + docs/virt-v2v-output-ovirt.pod | 231 -------- + docs/virt-v2v.pod | 201 +------ + output/Makefile.am | 43 +- + output/output_ovirt.ml | 319 ----------- + output/output_ovirt.mli | 21 - + output/output_ovirt_upload.ml | 514 ----------------- + output/output_ovirt_upload.mli | 21 - + output/output_ovirt_upload_cancel_source.mli | 19 - + .../output_ovirt_upload_createvm_source.mli | 19 - + .../output_ovirt_upload_finalize_source.mli | 19 - + output/output_ovirt_upload_plugin_source.mli | 19 - + .../output_ovirt_upload_precheck_source.mli | 19 - + .../output_ovirt_upload_transfer_source.mli | 19 - + output/output_ovirt_upload_vmcheck_source.mli | 19 - + output/output_vdsm.ml | 239 -------- output/output_vdsm.mli | 21 - - output/rhv-upload-cancel.py | 96 ---- - output/rhv-upload-createvm.py | 137 ----- - output/rhv-upload-finalize.py | 174 ------ - output/rhv-upload-plugin.py | 525 ------------------ - output/rhv-upload-precheck.py | 135 ----- - output/rhv-upload-transfer.py | 298 ---------- - output/rhv-upload-vmcheck.py | 72 --- - tests/Makefile.am | 15 - - tests/test-o-rhv-upload-module/imageio.py | 71 --- + output/ovirt-upload-cancel.py | 96 ---- + output/ovirt-upload-createvm.py | 137 ----- + output/ovirt-upload-finalize.py | 174 ------ + output/ovirt-upload-plugin.py | 525 ------------------ + output/ovirt-upload-precheck.py | 135 ----- + output/ovirt-upload-transfer.py | 298 ---------- + output/ovirt-upload-vmcheck.py | 72 --- + output/select_output.ml | 9 +- + output/select_output.mli | 2 +- + tests/Makefile.am | 5 - + tests/test-o-ovirt-upload-module/imageio.py | 71 --- .../ovirtsdk4/__init__.py | 150 ----- .../ovirtsdk4/types.py | 184 ------ - tests/test-o-rhv-upload-oo-query.sh | 41 -- - tests/test-o-rhv-upload.sh | 74 --- - tests/test-o-rhv.ovf.expected | 113 ---- - tests/test-o-rhv.sh | 87 --- + tests/test-o-ovirt-upload-oo-query.sh | 41 -- + tests/test-o-ovirt-upload.sh | 74 --- + tests/test-o-ovirt.ovf.expected | 113 ---- + tests/test-o-ovirt.sh | 87 --- tests/test-o-vdsm-oo-query.sh | 41 -- tests/test-o-vdsm-options.ovf.expected | 113 ---- tests/test-o-vdsm-options.sh | 96 ---- - v2v/v2v.ml | 31 +- - 36 files changed, 5 insertions(+), 4226 deletions(-) - delete mode 100644 docs/virt-v2v-output-rhv.pod - delete mode 100644 output/output_rhv.ml - delete mode 100644 output/output_rhv.mli - delete mode 100644 output/output_rhv_upload.ml - delete mode 100644 output/output_rhv_upload.mli - delete mode 100644 output/output_rhv_upload_cancel_source.mli - delete mode 100644 output/output_rhv_upload_createvm_source.mli - delete mode 100644 output/output_rhv_upload_finalize_source.mli - delete mode 100644 output/output_rhv_upload_plugin_source.mli - delete mode 100644 output/output_rhv_upload_precheck_source.mli - delete mode 100644 output/output_rhv_upload_transfer_source.mli - delete mode 100644 output/output_rhv_upload_vmcheck_source.mli + v2v/v2v.ml | 10 +- + 38 files changed, 7 insertions(+), 4183 deletions(-) + delete mode 100644 docs/virt-v2v-output-ovirt.pod + delete mode 100644 output/output_ovirt.ml + delete mode 100644 output/output_ovirt.mli + delete mode 100644 output/output_ovirt_upload.ml + delete mode 100644 output/output_ovirt_upload.mli + delete mode 100644 output/output_ovirt_upload_cancel_source.mli + delete mode 100644 output/output_ovirt_upload_createvm_source.mli + delete mode 100644 output/output_ovirt_upload_finalize_source.mli + delete mode 100644 output/output_ovirt_upload_plugin_source.mli + delete mode 100644 output/output_ovirt_upload_precheck_source.mli + delete mode 100644 output/output_ovirt_upload_transfer_source.mli + delete mode 100644 output/output_ovirt_upload_vmcheck_source.mli delete mode 100644 output/output_vdsm.ml delete mode 100644 output/output_vdsm.mli - delete mode 100644 output/rhv-upload-cancel.py - delete mode 100644 output/rhv-upload-createvm.py - delete mode 100644 output/rhv-upload-finalize.py - delete mode 100644 output/rhv-upload-plugin.py - delete mode 100644 output/rhv-upload-precheck.py - delete mode 100644 output/rhv-upload-transfer.py - delete mode 100644 output/rhv-upload-vmcheck.py - delete mode 100755 tests/test-o-rhv-upload-module/imageio.py - delete mode 100644 tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py - delete mode 100644 tests/test-o-rhv-upload-module/ovirtsdk4/types.py - delete mode 100755 tests/test-o-rhv-upload-oo-query.sh - delete mode 100755 tests/test-o-rhv-upload.sh - delete mode 100644 tests/test-o-rhv.ovf.expected - delete mode 100755 tests/test-o-rhv.sh + delete mode 100644 output/ovirt-upload-cancel.py + delete mode 100644 output/ovirt-upload-createvm.py + delete mode 100644 output/ovirt-upload-finalize.py + delete mode 100644 output/ovirt-upload-plugin.py + delete mode 100644 output/ovirt-upload-precheck.py + delete mode 100644 output/ovirt-upload-transfer.py + delete mode 100644 output/ovirt-upload-vmcheck.py + delete mode 100755 tests/test-o-ovirt-upload-module/imageio.py + delete mode 100644 tests/test-o-ovirt-upload-module/ovirtsdk4/__init__.py + delete mode 100644 tests/test-o-ovirt-upload-module/ovirtsdk4/types.py + delete mode 100755 tests/test-o-ovirt-upload-oo-query.sh + delete mode 100755 tests/test-o-ovirt-upload.sh + delete mode 100644 tests/test-o-ovirt.ovf.expected + delete mode 100755 tests/test-o-ovirt.sh delete mode 100755 tests/test-o-vdsm-oo-query.sh delete mode 100644 tests/test-o-vdsm-options.ovf.expected delete mode 100755 tests/test-o-vdsm-options.sh diff --git a/docs/Makefile.am b/docs/Makefile.am -index 3faa8c7d..200aa70c 100644 +index aa899304..9639b352 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am -@@ -26,7 +26,6 @@ EXTRA_DIST = \ - virt-v2v-inspector.pod \ +@@ -27,7 +27,6 @@ EXTRA_DIST = \ + virt-v2v-open.pod \ virt-v2v-output-local.pod \ virt-v2v-output-openstack.pod \ -- virt-v2v-output-rhv.pod \ +- virt-v2v-output-ovirt.pod \ virt-v2v-release-notes-1.42.pod \ virt-v2v-release-notes-2.0.pod \ virt-v2v-release-notes-2.2.pod \ -@@ -46,7 +45,6 @@ man_MANS = \ - virt-v2v-inspector.1 \ +@@ -48,7 +47,6 @@ man_MANS = \ + virt-v2v-open.1 \ virt-v2v-output-local.1 \ virt-v2v-output-openstack.1 \ -- virt-v2v-output-rhv.1 \ +- virt-v2v-output-ovirt.1 \ virt-v2v-release-notes-1.42.1 \ virt-v2v-release-notes-2.0.1 \ virt-v2v-release-notes-2.2.1 \ -@@ -63,7 +61,6 @@ noinst_DATA = \ - $(top_builddir)/website/virt-v2v-inspector.1.html \ +@@ -66,7 +64,6 @@ noinst_DATA = \ + $(top_builddir)/website/virt-v2v-open.1.html \ $(top_builddir)/website/virt-v2v-output-local.1.html \ $(top_builddir)/website/virt-v2v-output-openstack.1.html \ -- $(top_builddir)/website/virt-v2v-output-rhv.1.html \ +- $(top_builddir)/website/virt-v2v-output-ovirt.1.html \ $(top_builddir)/website/virt-v2v-release-notes-1.42.1.html \ $(top_builddir)/website/virt-v2v-release-notes-2.0.1.html \ $(top_builddir)/website/virt-v2v-release-notes-2.2.1.html \ -@@ -153,17 +150,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod +@@ -168,17 +165,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod $< touch $@ --virt-v2v-output-rhv.1 $(top_builddir)/website/virt-v2v-output-rhv.1.html: stamp-virt-v2v-output-rhv.pod +-virt-v2v-output-ovirt.1 $(top_builddir)/website/virt-v2v-output-ovirt.1.html: stamp-virt-v2v-output-ovirt.pod - --stamp-virt-v2v-output-rhv.pod: virt-v2v-output-rhv.pod +-stamp-virt-v2v-output-ovirt.pod: virt-v2v-output-ovirt.pod - $(PODWRAPPER) \ -- --man virt-v2v-output-rhv.1 \ -- --html $(top_builddir)/website/virt-v2v-output-rhv.1.html \ +- --man virt-v2v-output-ovirt.1 \ +- --html $(top_builddir)/website/virt-v2v-output-ovirt.1.html \ - --license GPLv2+ \ - --warning safe \ - $< @@ -120,27 +122,27 @@ index 3faa8c7d..200aa70c 100644 virt-v2v-release-notes-1.42.1 $(top_builddir)/website/virt-v2v-release-notes-1.42.1.html: stamp-virt-v2v-release-notes-1.42.pod stamp-virt-v2v-release-notes-1.42.pod: virt-v2v-release-notes-1.42.pod -diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod +diff --git a/docs/virt-v2v-output-ovirt.pod b/docs/virt-v2v-output-ovirt.pod deleted file mode 100644 -index e12702fa..00000000 ---- a/docs/virt-v2v-output-rhv.pod +index 6ba04ad0..00000000 +--- a/docs/virt-v2v-output-ovirt.pod +++ /dev/null -@@ -1,232 +0,0 @@ +@@ -1,231 +0,0 @@ -=head1 NAME - --virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV +-virt-v2v-output-ovirt - Using virt-v2v to convert guests to oVirt - -=head1 SYNOPSIS - -- virt-v2v [-i* options] -o rhv-upload [-oc ENGINE_URL] -os STORAGE +- virt-v2v [-i* options] -o ovirt-upload [-oc ENGINE_URL] -os STORAGE - [-op PASSWORD] [-of raw] -- [-oo rhv-cafile=FILE] -- [-oo rhv-cluster=CLUSTER] -- [-oo rhv-proxy] -- [-oo rhv-disk-uuid=UUID ...] -- [-oo rhv-verifypeer] +- [-oo ovirt-cafile=FILE] +- [-oo ovirt-cluster=CLUSTER] +- [-oo ovirt-proxy] +- [-oo ovirt-disk-uuid=UUID ...] +- [-oo ovirt-verifypeer] - -- virt-v2v [-i* options] -o rhv -os [esd:/path|/path] +- virt-v2v [-i* options] -o ovirt -os [esd:/path|/path] - - virt-v2v [-i* options] -o vdsm - [-oo vdsm-image-uuid=UUID] @@ -151,47 +153,46 @@ index e12702fa..00000000 -=head1 DESCRIPTION - -This page documents how to use L to convert guests to an --oVirt or RHV management instance. There are three output modes that --you can select, but only I<-o rhv-upload> should be used normally, the --other two are deprecated: +-oVirt management instance. There are three output modes that you can +-select, but only I<-o ovirt-upload> should be used normally, the other +-two are deprecated: - -=over 4 - --=item B<-o rhv-upload> B<-os> STORAGE +-=item B<-o ovirt-upload> B<-os> STORAGE - --Full description: L +-Full description: L - --This is the modern method for uploading to oVirt/RHV via the REST API. --It requires oVirt/RHV E 4.2. +-This is the modern method for uploading to oVirt via the REST API. It +-requires oVirt E 4.2. - --=item B<-o rhv> B<-os> esd:/path +-=item B<-o ovirt> B<-os> esd:/path - --=item B<-o rhv> B<-os> /path +-=item B<-o ovirt> B<-os> /path - -Full description: L - --This is the old method for uploading to oVirt/RHV via the --Export Storage Domain (ESD). The ESD can either be accessed --over NFS (using the I<-os esd:/path> form) or if you have --already NFS-mounted it somewhere specify the path to the mountpoint --as I<-os /path>. +-This is the old method for uploading to oVirt via the Export Storage +-Domain (ESD). The ESD can either be accessed over NFS (using the +-I<-os esd:/path> form) or if you have already NFS-mounted it somewhere +-specify the path to the mountpoint as I<-os /path>. - -The Export Storage Domain was deprecated in oVirt 4, and so we expect -that this method will stop working at some point in the future. - -=item B<-o vdsm> - --This is the old method used internally by the RHV-M user interface. +-This is the old method used internally by the oVirt user interface. -It is never intended to be used directly by end users. - -=back - --=head1 OUTPUT TO RHV +-=head1 OUTPUT TO OVIRT - --This new method to upload guests to oVirt or RHV directly via the REST --API requires oVirt/RHV E 4.2. +-This new method to upload guests to oVirt directly via the REST API +-requires oVirt E 4.2. - --You need to specify I<-o rhv-upload> as well as the following extra +-You need to specify I<-o ovirt-upload> as well as the following extra -parameters: - -=over 4 @@ -224,21 +225,21 @@ index e12702fa..00000000 - -The storage domain. - --=item I<-oo rhv-cafile=>F +-=item I<-oo ovirt-cafile=>F - -The F file (Certificate Authority), copied from -F on the oVirt engine. - --If I<-oo rhv-verifypeer> is enabled then this option can +-If I<-oo ovirt-verifypeer> is enabled then this option can -be used to control which CA is used to verify the client’s -identity. If this option is not used then the system’s -global trust store is used. - --=item I<-oo rhv-cluster=>C +-=item I<-oo ovirt-cluster=>C - --Set the RHV Cluster Name. If not given it uses C. +-Set the oVirt Cluster Name. If not given it uses C. - --=item I<-oo rhv-disk-uuid=>C +-=item I<-oo ovirt-disk-uuid=>C - -This option can used to manually specify UUIDs for the disks when -creating the virtual machine. If not specified, the oVirt engine will @@ -248,7 +249,7 @@ index e12702fa..00000000 - -=item * - --you B pass as many I<-oo rhv-disk-uuid=UUID> options as the +-you B pass as many I<-oo ovirt-disk-uuid=UUID> options as the -amount of disks in the guest - -=item * @@ -257,66 +258,66 @@ index e12702fa..00000000 - -=back - --=item I<-oo rhv-proxy> +-=item I<-oo ovirt-proxy> - -Proxy the upload through oVirt Engine. This is slower than uploading -directly to the oVirt node but may be necessary if you do not have -direct network access to the nodes. - --=item I<-oo rhv-verifypeer> +-=item I<-oo ovirt-verifypeer> - --Verify the oVirt/RHV server’s identity by checking the server‘s +-Verify the oVirt server’s identity by checking the server‘s -certificate against the Certificate Authority. - -=back - -=head1 OUTPUT TO EXPORT STORAGE DOMAIN - --This section only applies to the I<-o rhv> output mode. If you use --virt-v2v from the RHV-M user interface, then behind the scenes the +-This section only applies to the I<-o ovirt> output mode. If you use +-virt-v2v from the oVirt user interface, then behind the scenes the -import is managed by VDSM using the I<-o vdsm> output mode (which end -users should not try to use directly). - --You have to specify I<-o rhv> and an I<-os> option that points to the --RHV-M Export Storage Domain. You can either specify the NFS server --and mountpoint, eg. S>, or you can +-You have to specify I<-o ovirt> and an I<-os> option that points to the +-oVirt Export Storage Domain. You can either specify the NFS server +-and mountpoint, eg. S>, or you can -mount that first and point to the directory where it is mounted, -eg. S>. Be careful not to point to the Data Storage -Domain by accident as that will not work. - -On successful completion virt-v2v will have written the new guest to -the Export Storage Domain, but it will not yet be ready to run. It --must be imported into RHV using the UI before it can be used. +-must be imported into oVirt using the UI before it can be used. - --In RHV E 2.2 this is done from the Storage tab. Select the +-In oVirt E 2.2 this is done from the Storage tab. Select the -export domain the guest was written to. A pane will appear underneath -the storage domain list displaying several tabs, one of which is "VM -Import". The converted guest will be listed here. Select the --appropriate guest an click "Import". See the RHV documentation for +-appropriate guest an click "Import". See the oVirt documentation for -additional details. - -If you export several guests, then you can import them all at the same -time through the UI. - --=head2 Testing RHV conversions +-=head2 Testing oVirt conversions - --If you do not have an oVirt or RHV instance to test against, then you --can test conversions by creating a directory structure which looks --enough like a RHV-M Export Storage Domain to trick virt-v2v: +-If you do not have an oVirt instance to test against, then you can +-test conversions by creating a directory structure which looks enough +-like a oVirt Export Storage Domain to trick virt-v2v: - - uuid=`uuidgen` -- mkdir /tmp/rhv -- mkdir /tmp/rhv/$uuid -- mkdir /tmp/rhv/$uuid/images -- mkdir /tmp/rhv/$uuid/master -- mkdir /tmp/rhv/$uuid/master/vms -- touch /tmp/rhv/$uuid/dom_md -- virt-v2v [...] -o rhv -os /tmp/rhv +- mkdir /tmp/ovirt +- mkdir /tmp/ovirt/$uuid +- mkdir /tmp/ovirt/$uuid/images +- mkdir /tmp/ovirt/$uuid/master +- mkdir /tmp/ovirt/$uuid/master/vms +- touch /tmp/ovirt/$uuid/dom_md +- virt-v2v [...] -o ovirt -os /tmp/ovirt - --=head2 Debugging RHV-M import failures +-=head2 Debugging oVirt import failures - --When you export to the RHV-M Export Storage Domain, and then import --that guest through the RHV-M UI, you may encounter an import failure. +-When you export to the oVirt Export Storage Domain, and then import +-that guest through the oVirt UI, you may encounter an import failure. -Diagnosing these failures is infuriatingly difficult as the UI -generally hides the true reason for the failure. - @@ -342,7 +343,7 @@ index e12702fa..00000000 - -=item F - --This log file is stored on the RHV-M server. It contains more detail +-This log file is stored on the oVirt server. It contains more detail -for any errors caused by the oVirt GUI. - -=back @@ -359,23 +360,27 @@ index e12702fa..00000000 - -Copyright (C) 2009-2025 Red Hat Inc. diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod -index af19bfb0..5f3dba5c 100644 +index 2afd6182..c6c222c4 100644 --- a/docs/virt-v2v.pod +++ b/docs/virt-v2v.pod -@@ -14,7 +14,7 @@ virt-v2v - Convert a guest to use KVM +@@ -14,9 +14,9 @@ virt-v2v - Convert a guest to use KVM Virt-v2v converts a single guest from a foreign hypervisor to run on KVM. It can read Linux and Windows guests running on VMware, Hyper-V and some other hypervisors, and convert them to KVM managed by --libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several +-libvirt, OpenStack, oVirt, or several other targets. It can modify +-the guest to make it bootable on KVM and install virtio drivers so it +-will run quickly. +libvirt, OpenStack or several - other targets. It can modify the guest to make it bootable on KVM and - install virtio drivers so it will run quickly. ++other targets. It can modify the guest to make it bootable on KVM and ++install virtio drivers so it will run quickly. + There is also a companion front-end called L which comes + as an ISO, CD or PXE image that can be booted on physical machines to @@ -61,8 +61,6 @@ L — Input from VMware. L — Output to local files or local libvirt. --L — Output to oVirt or RHV. +-L — Output to oVirt - L — Output to OpenStack. @@ -384,107 +389,94 @@ index af19bfb0..5f3dba5c 100644 For more information see L. --=head2 Convert from VMware to RHV/oVirt +-=head2 Convert from VMware to oVirt - -This is the same as the previous example, except you want to send the --guest to a RHV Data Domain using the RHV REST API. Guest network +-guest to an oVirt Data Domain using the oVirt REST API. Guest network -interface(s) are connected to the target network called C. - - virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi vmware_guest \ -- -o rhv-upload -oc https://ovirt-engine.example.com/ovirt-engine/api \ +- -o ovirt-upload -oc https://ovirt-engine.example.com/ovirt-engine/api \ - -os ovirt-data -op /tmp/ovirt-admin-password -of raw \ -- -oo rhv-cafile=/tmp/ca.pem --bridge ovirtmgmt +- -oo ovirt-cafile=/tmp/ca.pem --bridge ovirtmgmt - -In this case the host running virt-v2v acts as a B. - --For more information see L. +-For more information see L. - =head2 Convert from ESXi hypervisor over SSH to local libvirt You have an ESXi hypervisor called C with SSH access -@@ -488,14 +471,6 @@ no metadata is written. +@@ -484,26 +467,6 @@ no metadata is written. Set the output method to OpenStack. See L. -=item B<-o> B - --This is the same as I<-o rhv>. +-Set the output method to I. +- +-The converted guest is written to an oVirt Export Storage Domain. The +-I<-os> parameter must also be used to specify the location of the +-Export Storage Domain. Note this does not actually import the guest +-into oVirt. You have to do that manually later using the UI. +- +-See L. - -=item B<-o> B - --This is the same as I<-o rhv-upload>. +-Set the output method to I. +- +-The converted guest is written directly to an oVirt Data Domain. This +-is a faster method than I<-o ovirt>, but requires oVirt E 4.2. +- +-See L. - =item B<-o> B Set the output method to I. -@@ -504,40 +479,6 @@ This is similar to I<-o local>, except that a shell script is written +@@ -512,15 +475,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>. --=item B<-o> B -- --This is the same as I<-o rhv>. -- --=item B<-o> B -- --Set the output method to I. -- --The converted guest is written to a RHV Export Storage Domain. The --I<-os> parameter must also be used to specify the location of the --Export Storage Domain. Note this does not actually import the guest --into RHV. You have to do that manually later using the UI. -- --See L. -- --=item B<-o> B -- --Set the output method to I. -- --The converted guest is written directly to a RHV Data Domain. --This is a faster method than I<-o rhv>, but requires oVirt --or RHV E 4.2. -- --See L. -- -=item B<-o> B - -Set the output method to I. - --This mode is similar to I<-o rhv>, but the full path to the +-This mode is similar to I<-o ovirt>, but the full path to the -data domain must be given: --Fdata-center-uuidE/Edata-domain-uuidE>. +-Fdata-center-uuidE/Edata-domain-uuidE>. -This mode is only used when virt-v2v runs under VDSM control. - =item B<-oa> B =item B<-oa> B -@@ -600,117 +541,11 @@ For I<-o openstack> (L) only, set optional +@@ -583,117 +537,11 @@ For I<-o openstack> (L) only, set optional OpenStack authentication. For example I<-oo os-username=>NAME is equivalent to C. --=item B<-oo rhv-cafile=>F +-=item B<-oo ovirt-cafile=>F - --For I<-o rhv-upload> (L) only, the F file --(Certificate Authority), copied from F --on the oVirt engine. +-For I<-o ovirt-upload> (L) only, the +-F file (Certificate Authority), copied from +-F on the oVirt engine. - --=item B<-oo rhv-cluster=>C +-=item B<-oo ovirt-cluster=>C - --For I<-o rhv-upload> (L) only, set the RHV Cluster --Name. If not given it uses C. +-For I<-o ovirt-upload> (L) only, set the +-oVirt Cluster Name. If not given it uses C. - --=item B<-oo rhv-proxy> +-=item B<-oo ovirt-proxy> - --For I<-o rhv-upload> (L) only, proxy the +-For I<-o ovirt-upload> (L) only, proxy the -upload through oVirt Engine. This is slower than uploading directly -to the oVirt node but may be necessary if you do not have direct -network access to the nodes. - --=item B<-oo rhv-verifypeer> +-=item B<-oo ovirt-verifypeer> - --For I<-o rhv-upload> (L) only, verify the oVirt/RHV --server’s identity by checking the server‘s certificate against the --Certificate Authority. +-For I<-o ovirt-upload> (L) only, verify the +-oVirt server’s identity by checking the server‘s certificate against +-the Certificate Authority. - =item B<-oo server-id=>C @@ -507,7 +499,7 @@ index af19bfb0..5f3dba5c 100644 -assume that everyone is using a modern version of qemu). - -B output>. All other output --modes (including I<-o rhv>) generate modern qcow2 I +-modes (including I<-o ovirt>) generate modern qcow2 I -files, always. - -If this option is available, then C will appear in @@ -521,7 +513,7 @@ index af19bfb0..5f3dba5c 100644 - -=item B<-oo vdsm-ovf-output=>DIR - --Normally the RHV output mode chooses random UUIDs for the target +-Normally the oVirt output mode chooses random UUIDs for the target -guest. However VDSM needs to control the UUIDs and passes these -parameters when virt-v2v runs under VDSM control. The parameters -control: @@ -560,9 +552,9 @@ index af19bfb0..5f3dba5c 100644 - -=over 4 - --=item rhvexp +-=item ovirtexp - --The OVF format used in RHV export storage domain. +-The OVF format used in oVirt export storage domain. - -=item ovirt - @@ -570,25 +562,25 @@ index af19bfb0..5f3dba5c 100644 - -=back - --For backward compatibility the default is I, but this may change in +-For backward compatibility the default is I, but this may change in -the future. - =item B<-op> file Supply a file containing a password to be used when connecting to the -@@ -728,28 +563,8 @@ For I<-o libvirt>, this is a libvirt directory pool +@@ -711,28 +559,6 @@ For I<-o libvirt>, this is a libvirt directory pool For I<-o local> and I<-o qemu>, this is a directory name. The directory must exist. --For I<-o rhv-upload>, this is the name of the destination Storage +-For I<-o ovirt-upload>, this is the name of the destination Storage -Domain. - - For I<-o openstack>, this is the optional Cinder volume type. - --For I<-o rhv>, this can be an NFS path of the Export Storage Domain +-For I<-o openstack>, this is the optional Cinder volume type. +- +-For I<-o ovirt>, this can be an NFS path of the Export Storage Domain -of the form ChostE:EpathE>, eg: - -- rhv-storage.example.com:/rhv/export +- ovirt-storage.example.com:/ovirt/export - -The NFS export must be mountable and writable by the user and host -running virt-v2v, since the virt-v2v program has to actually mount it @@ -605,13 +597,13 @@ index af19bfb0..5f3dba5c 100644 =item B<--parallel> N Enable parallel copying if the guest has multiple disks. I is the -@@ -1369,26 +1184,6 @@ require either root or a special user: +@@ -1369,26 +1195,6 @@ require either root or a special user: =over 4 -=item Mounting the Export Storage Domain - --When using I<-o rhv -os server:/esd> virt-v2v has to have sufficient +-When using I<-o ovirt -os server:/esd> virt-v2v has to have sufficient -privileges to NFS mount the Export Storage Domain from C. - -You can avoid needing root here by mounting it yourself before running @@ -620,11 +612,11 @@ index af19bfb0..5f3dba5c 100644 - -=item Writing to the Export Storage Domain as 36:36 - --RHV-M cannot read files and directories from the Export Storage +-oVirt cannot read files and directories from the Export Storage -Domain unless they have UID:GID 36:36. You will see VM import -problems if the UID:GID is not correct. - --When you run virt-v2v I<-o rhv> as root, virt-v2v attempts to create +-When you run virt-v2v I<-o ovirt> as root, virt-v2v attempts to create -files and directories with the correct ownership. If you run virt-v2v -as non-root, it will probably still work, but you will need to -manually change ownership after virt-v2v has finished. @@ -632,7 +624,7 @@ index af19bfb0..5f3dba5c 100644 =item Writing to libvirt When using I<-o libvirt>, you may need to run virt-v2v as root so that -@@ -1496,7 +1291,6 @@ virt-v2v binary. Typical output looks like this: +@@ -1496,7 +1302,6 @@ virt-v2v binary. Typical output looks like this: virt-v2v libguestfs-rewrite colours-option @@ -641,7 +633,7 @@ index af19bfb0..5f3dba5c 100644 [...] output:local diff --git a/output/Makefile.am b/output/Makefile.am -index 69f5393e..981cf589 100644 +index 9e1ceabf..c2ee1b3b 100644 --- a/output/Makefile.am +++ b/output/Makefile.am @@ -17,14 +17,7 @@ @@ -649,13 +641,13 @@ index 69f5393e..981cf589 100644 include $(top_srcdir)/subdir-rules.mk -BUILT_SOURCES = \ -- output_rhv_upload_cancel_source.ml \ -- output_rhv_upload_createvm_source.ml \ -- output_rhv_upload_finalize_source.ml \ -- output_rhv_upload_plugin_source.ml \ -- output_rhv_upload_precheck_source.ml \ -- output_rhv_upload_transfer_source.ml \ -- output_rhv_upload_vmcheck_source.ml +- output_ovirt_upload_cancel_source.ml \ +- output_ovirt_upload_createvm_source.ml \ +- output_ovirt_upload_finalize_source.ml \ +- output_ovirt_upload_plugin_source.ml \ +- output_ovirt_upload_precheck_source.ml \ +- output_ovirt_upload_transfer_source.ml \ +- output_ovirt_upload_vmcheck_source.ml +BUILT_SOURCES = EXTRA_DIST = \ @@ -664,85 +656,75 @@ index 69f5393e..981cf589 100644 $(SOURCES_C) \ $(BUILT_SOURCES) \ embed.sh \ -- rhv-upload-cancel.py \ -- rhv-upload-createvm.py \ -- rhv-upload-finalize.py \ -- rhv-upload-plugin.py \ -- rhv-upload-precheck.py \ -- rhv-upload-transfer.py \ -- rhv-upload-vmcheck.py \ +- ovirt-upload-cancel.py \ +- ovirt-upload-createvm.py \ +- ovirt-upload-finalize.py \ +- ovirt-upload-plugin.py \ +- ovirt-upload-precheck.py \ +- ovirt-upload-transfer.py \ +- ovirt-upload-vmcheck.py \ test-python-syntax.sh SOURCES_MLI = \ -@@ -54,16 +40,6 @@ SOURCES_MLI = \ - output_null.mli \ - output_openstack.mli \ +@@ -63,7 +49,6 @@ SOURCES_MLI = \ + output_ovirt_upload_transfer_source.mli \ + output_ovirt_upload_vmcheck_source.mli \ output_qemu.mli \ -- output_rhv.mli \ -- output_rhv_upload.mli \ - output_vdsm.mli \ -- output_rhv_upload_cancel_source.mli \ -- output_rhv_upload_createvm_source.mli \ -- output_rhv_upload_finalize_source.mli \ -- output_rhv_upload_plugin_source.mli \ -- output_rhv_upload_precheck_source.mli \ -- output_rhv_upload_transfer_source.mli \ -- output_rhv_upload_vmcheck_source.mli \ python_script.mli \ - qemuopts.mli - -@@ -74,13 +50,6 @@ SOURCES_ML = \ + qemuopts.mli \ + select_output.mli +@@ -75,13 +60,6 @@ SOURCES_ML = \ create_kubevirt_yaml.ml \ qemuopts.ml \ openstack_image_properties.ml \ -- output_rhv_upload_cancel_source.ml \ -- output_rhv_upload_createvm_source.ml \ -- output_rhv_upload_finalize_source.ml \ -- output_rhv_upload_plugin_source.ml \ -- output_rhv_upload_precheck_source.ml \ -- output_rhv_upload_transfer_source.ml \ -- output_rhv_upload_vmcheck_source.ml \ +- output_ovirt_upload_cancel_source.ml \ +- output_ovirt_upload_createvm_source.ml \ +- output_ovirt_upload_finalize_source.ml \ +- output_ovirt_upload_plugin_source.ml \ +- output_ovirt_upload_precheck_source.ml \ +- output_ovirt_upload_transfer_source.ml \ +- output_ovirt_upload_vmcheck_source.ml \ output.ml \ output_disk.ml \ output_glance.ml \ -@@ -88,30 +57,11 @@ SOURCES_ML = \ - output_libvirt.ml \ +@@ -90,30 +68,11 @@ SOURCES_ML = \ output_null.ml \ output_openstack.ml \ -- output_qemu.ml \ -- output_rhv.ml \ -- output_rhv_upload.ml \ -- output_vdsm.ml -+ output_qemu.ml + output_qemu.ml \ +- output_ovirt.ml \ +- output_ovirt_upload.ml \ +- output_vdsm.ml \ + select_output.ml SOURCES_C = \ qemuopts-c.c -# These files are generated and contain *.py embedded as an OCaml string. --output_rhv_upload_cancel_source.ml: $(srcdir)/rhv-upload-cancel.py +-output_ovirt_upload_cancel_source.ml: $(srcdir)/ovirt-upload-cancel.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_createvm_source.ml: $(srcdir)/rhv-upload-createvm.py +-output_ovirt_upload_createvm_source.ml: $(srcdir)/ovirt-upload-createvm.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_finalize_source.ml: $(srcdir)/rhv-upload-finalize.py +-output_ovirt_upload_finalize_source.ml: $(srcdir)/ovirt-upload-finalize.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_plugin_source.ml: $(srcdir)/rhv-upload-plugin.py +-output_ovirt_upload_plugin_source.ml: $(srcdir)/ovirt-upload-plugin.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_precheck_source.ml: $(srcdir)/rhv-upload-precheck.py +-output_ovirt_upload_precheck_source.ml: $(srcdir)/ovirt-upload-precheck.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_transfer_source.ml: $(srcdir)/rhv-upload-transfer.py +-output_ovirt_upload_transfer_source.ml: $(srcdir)/ovirt-upload-transfer.py - $(srcdir)/embed.sh code $^ $@ --output_rhv_upload_vmcheck_source.ml: $(srcdir)/rhv-upload-vmcheck.py +-output_ovirt_upload_vmcheck_source.ml: $(srcdir)/ovirt-upload-vmcheck.py - $(srcdir)/embed.sh code $^ $@ - # We pretend that we're building a C library. automake handles the # compilation of the C sources for us. At the end we take the C # objects and OCaml objects and link them into the OCaml library. -diff --git a/output/output_rhv.ml b/output/output_rhv.ml +diff --git a/output/output_ovirt.ml b/output/output_ovirt.ml deleted file mode 100644 -index e10b2010..00000000 ---- a/output/output_rhv.ml +index 0f0f4c36..00000000 +--- a/output/output_ovirt.ml +++ /dev/null -@@ -1,317 +0,0 @@ +@@ -1,319 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2025 Red Hat Inc. - * @@ -774,12 +756,12 @@ index e10b2010..00000000 - -open Output - --module RHV = struct +-module OVirt = struct - type poptions = Types.output_allocation * string * string * string - - type t = string * string * string * string list * string list * int64 list - -- let to_string options = "-o rhv" +- let to_string options = "-o ovirt" - - let query_output_options () = - printf (f_"No output options can be used in this mode.\n") @@ -788,21 +770,21 @@ index e10b2010..00000000 - if options.output_options <> [] then - error (f_"no -oo (output options) are allowed here"); - if options.output_password <> None then -- error_option_cannot_be_used_in_output_mode "rhv" "-op"; +- error_option_cannot_be_used_in_output_mode "ovirt" "-op"; - - (* -os must be set, but at this point we cannot check it. *) - let output_storage = - match options.output_storage with -- | None -> error (f_"-o rhv: -os option was not specified") +- | None -> error (f_"-o ovirt: -os option was not specified") - | Some d -> d in - - let output_name = Option.value ~default:source.s_name options.output_name in - - (options.output_alloc, options.output_format, output_name, output_storage) - -- let rec setup dir options source = -- error_if_disk_count_gt dir 23; -- let disks = get_disks dir in +- let rec setup dir options source input_disks = +- error_if_disk_count_gt input_disks 23; +- let input_sizes = get_disk_sizes input_disks in - let output_alloc, output_format, output_name, output_storage = options in - - (* UID:GID required for files and directories when writing to ESD. *) @@ -821,7 +803,7 @@ index e10b2010..00000000 - let esd_mp, esd_uuid = - mount_and_check_storage_domain (s_"Export Storage Domain") - output_storage in -- debug "RHV: ESD mountpoint: %s\nRHV: ESD UUID: %s" esd_mp esd_uuid; +- debug "ovirt: ESD mountpoint: %s\novirt: ESD UUID: %s" esd_mp esd_uuid; - - (* See if we can write files as UID:GID 36:36. *) - let () = @@ -830,7 +812,7 @@ index e10b2010..00000000 - let stat = stat testfile in - Changeuid.unlink changeuid_t testfile; - let actual_uid = stat.st_uid and actual_gid = stat.st_gid in -- debug "RHV: actual UID:GID of new files is %d:%d" actual_uid actual_gid; +- debug "ovirt: actual UID:GID of new files is %d:%d" actual_uid actual_gid; - if uid <> actual_uid || gid <> actual_gid then ( - if running_as_root then - warning (f_"cannot write files to the NFS server as %d:%d, \ @@ -838,7 +820,7 @@ index e10b2010..00000000 - probably means the NFS client or idmapd is not \ - configured properly.\n\nYou will have to chown \ - the files that virt-v2v creates after the run, \ -- otherwise RHV-M will not be able to import the VM.") +- otherwise oVirt will not be able to import the VM.") - uid gid - else - warning (f_"cannot write files to the NFS server as %d:%d. \ @@ -849,8 +831,8 @@ index e10b2010..00000000 - (* Create unique UUIDs for everything *) - let vm_uuid = uuidgen () in - (* Generate random image and volume UUIDs for each target disk. *) -- let image_uuids = List.map (fun _ -> uuidgen ()) disks in -- let vol_uuids = List.map (fun _ -> uuidgen ()) disks in +- let image_uuids = List.map (fun _ -> uuidgen ()) input_disks in +- let vol_uuids = List.map (fun _ -> uuidgen ()) input_disks in - - (* We need to create the target image director(ies) so there's a place - * for the main program to copy the images to. However if image @@ -893,15 +875,14 @@ index e10b2010..00000000 - List.map ( - fun (image_uuid, vol_uuid) -> - let filename = images_dir // image_uuid // vol_uuid in -- debug "RHV: disk: %s" filename; +- debug "ovirt: disk: %s" filename; - filename - ) (List.combine image_uuids vol_uuids) in - - (* Generate the .meta file associated with each volume. *) -- let sizes = List.map snd disks in - let metas = - Create_ovf.create_meta_files output_alloc output_format -- esd_uuid image_uuids sizes in +- esd_uuid image_uuids input_sizes in - List.iter ( - fun (filename, meta) -> - let meta_filename = filename ^ ".meta" in @@ -909,39 +890,42 @@ index e10b2010..00000000 - ) (List.combine filenames metas); - - (* Set up the NBD servers. *) -- List.iter ( -- fun ((i, size), filename) -> -- let socket = sprintf "%s/out%d" dir i in -- On_exit.unlink socket; +- let uris = +- List.mapi ( +- fun i (size, filename) -> +- let socket = sprintf "%s/out%d" dir i in +- On_exit.unlink socket; - -- (* Create the actual output disk. *) -- let changeuid f = -- Changeuid.func changeuid_t ( -- fun () -> -- (* Run the command to create the file. *) -- f (); -- (* Make the file sufficiently writable so that possibly root, or -- * root squashed nbdkit will definitely be able to open it. -- * An example of how root squashing nonsense makes everyone -- * less secure. -- *) -- chmod filename 0o666 -- ) -- in +- (* Create the actual output disk. *) +- let changeuid f = +- Changeuid.func changeuid_t ( +- fun () -> +- (* Run the command to create the file. *) +- f (); +- (* Make the file sufficiently writable so that possibly root, +- * or root squashed nbdkit will definitely be able to open it. +- * An example of how root squashing nonsense makes everyone +- * less secure. +- *) +- chmod filename 0o666 +- ) +- in - -- (* We have to wait for the NBD server to exit rather than just -- * killing it, otherwise it races with unmounting. See: -- * https://bugzilla.redhat.com/show_bug.cgi?id=1953286#c26 -- *) -- let on_exit_kill = Output.KillAndWait in +- (* We have to wait for the NBD server to exit rather than just +- * killing it, otherwise it races with unmounting. See: +- * https://bugzilla.redhat.com/show_bug.cgi?id=1953286#c26 +- *) +- let on_exit_kill = Output.KillAndWait in - -- output_to_local_file ~changeuid ~on_exit_kill -- output_alloc output_format filename size socket -- ) (List.combine disks filenames); +- output_to_local_file ~changeuid ~on_exit_kill +- output_alloc output_format filename size socket; +- +- NBD_URI.Unix (socket, None) +- ) (List.combine input_sizes filenames) in - - (* Save parameters since we need them during finalization. *) -- let t = esd_mp, esd_uuid, vm_uuid, image_uuids, vol_uuids, sizes in -- t +- let t = esd_mp, esd_uuid, vm_uuid, image_uuids, vol_uuids, input_sizes in +- t, uris - - and mount_and_check_storage_domain domain_class os = - (* The user can either specify -os nfs:/export, or a local directory @@ -989,7 +973,7 @@ index e10b2010..00000000 - with Sys_error msg -> - error (f_"could not read the %s specified by the '-os %s' \ - parameter on the command line. Is it really an \ -- OVirt or RHV-M %s? The original error is: %s") +- OVirt %s? The original error is: %s") - domain_class os domain_class msg in - let entries = Array.to_list entries in - let uuids = List.filter ( @@ -1003,7 +987,7 @@ index e10b2010..00000000 - | [uuid] -> uuid - | [] -> - error (f_"there are no UUIDs in the %s (%s). Is it really an \ -- OVirt or RHV-M %s?") domain_class os domain_class +- OVirt %s?") domain_class os domain_class - | _::_ -> - error (f_"there are multiple UUIDs in the %s (%s). This is \ - unexpected, and may be a bug in virt-v2v or OVirt.") @@ -1019,16 +1003,16 @@ index e10b2010..00000000 - cause: Either the %s (%s) has not been attached to any \ - Data Center, or the path %s is not an %s at all.\n\n\ - You have to attach the %s to a Data Center using the \ -- RHV-M / OVirt user interface first.\n\nIf you don’t \ +- oVirt user interface first.\n\nIf you don’t \ - know what the %s mount point should be then you can \ -- also find this out through the RHV-M user interface.") +- also find this out through the oVirt user interface.") - master_vms_dir domain_class os os - domain_class domain_class domain_class in - - (* Looks good, so return the SD mountpoint and UUID. *) - (mp, uuid) - -- let finalize dir options t source inspect target_meta = +- let finalize dir options t output_disks source inspect target_meta = - let output_alloc, output_format, output_name, output_storage = options in - let esd_mp, esd_uuid, vm_uuid, image_uuids, vol_uuids, sizes = t in - @@ -1049,8 +1033,8 @@ index e10b2010..00000000 - let ovf = - Create_ovf.create_ovf source inspect target_meta sizes - output_alloc output_format output_name esd_uuid image_uuids vol_uuids -- ~need_actual_sizes:true dir vm_uuid -- Create_ovf.RHVExportStorageDomain in +- ~need_actual_sizes:true output_disks vm_uuid +- Create_ovf.OVirtExportStorageDomain in - - (* Write it to the metadata file. *) - let dir = esd_mp // esd_uuid // "master" // "vms" // vm_uuid in @@ -1060,10 +1044,10 @@ index e10b2010..00000000 - - let request_size = None -end -diff --git a/output/output_rhv.mli b/output/output_rhv.mli +diff --git a/output/output_ovirt.mli b/output/output_ovirt.mli deleted file mode 100644 -index ceb12c3f..00000000 ---- a/output/output_rhv.mli +index 29e66059..00000000 +--- a/output/output_ovirt.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v @@ -1084,15 +1068,15 @@ index ceb12c3f..00000000 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - --(** [-o rhv] output mode. *) +-(** [-o ovirt] output mode. *) - --module RHV : Output.OUTPUT -diff --git a/output/output_rhv_upload.ml b/output/output_rhv_upload.ml +-module OVirt : Output.OUTPUT +diff --git a/output/output_ovirt_upload.ml b/output/output_ovirt_upload.ml deleted file mode 100644 -index 8133db2b..00000000 ---- a/output/output_rhv_upload.ml +index e7577edb..00000000 +--- a/output/output_ovirt_upload.ml +++ /dev/null -@@ -1,520 +0,0 @@ +@@ -1,514 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2025 Red Hat Inc. - * @@ -1123,7 +1107,7 @@ index 8133db2b..00000000 - -open Output - --module RHVUpload = struct +-module OVirtUpload = struct - type poptions = string * string * string * string * string * - string option * string option * bool * bool * - string list option @@ -1134,7 +1118,7 @@ index 8133db2b..00000000 - string option * string * int list ref - - let to_string options = -- "-o rhv-upload" ^ +- "-o ovirt-upload" ^ - (match options.output_conn with - | Some oc -> " -oc " ^ oc - | None -> "") ^ @@ -1143,83 +1127,86 @@ index 8133db2b..00000000 - | None -> "") - - let query_output_options () = -- printf (f_"Output options (-oo) which can be used with -o rhv-upload: +- printf (f_"Output options (-oo) which can be used with -o ovirt-upload: - -- -oo rhv-cafile=CA.PEM Set ‘ca.pem’ certificate bundle filename. -- -oo rhv-cluster=CLUSTERNAME Set RHV cluster name. -- -oo rhv-proxy Connect via oVirt Engine proxy (default: false). -- -oo rhv-verifypeer[=true|false] Verify server identity (default: false). +- -oo ovirt-cafile=CA.PEM Set ‘ca.pem’ certificate bundle filename. +- -oo ovirt-cluster=CLUSTERNAME Set oVirt cluster name. +- -oo ovirt-proxy Connect via oVirt Engine proxy (default: false). +- -oo ovirt-verifypeer[=true|false] Verify server identity (default: false). - -You can override the UUIDs of the disks, instead of using autogenerated UUIDs -after their uploads (if you do, you must supply one for each disk): - -- -oo rhv-disk-uuid=UUID Disk UUID +- -oo ovirt-disk-uuid=UUID Disk UUID -") - - let rec parse_options options source = - let output_conn = - match options.output_conn with - | None -> -- error (f_"-o rhv-upload: use ‘-oc’ to point to the oVirt \ -- or RHV server REST API URL, which is usually \ +- error (f_"-o ovirt-upload: use ‘-oc’ to point to the oVirt \ +- server REST API URL, which is usually \ - https://servername/ovirt-engine/api") - | Some oc -> oc in - (* In theory we could make the password optional in future. *) - let output_password = - match options.output_password with - | None -> -- error (f_"-o rhv-upload: output password file was not specified, \ +- error (f_"-o ovirt-upload: output password file was not specified, \ - use ‘-op’ to point to a file which contains the password \ -- used to connect to the oVirt or RHV server") +- used to connect to the oVirt server") - | Some op -> op in - let output_storage = - match options.output_storage with - | None -> -- error (f_"-o rhv-upload: output storage was not specified, use ‘-os’"); +- error (f_"-o ovirt-upload: output storage was not specified, \ +- use ‘-os’"); - | Some os -> os in - -- let rhv_cafile = ref None in -- let rhv_cluster = ref None in -- let rhv_direct = ref true in -- let rhv_verifypeer = ref false in -- let rhv_disk_uuids = ref None in +- let ovirt_cafile = ref None in +- let ovirt_cluster = ref None in +- let ovirt_direct = ref true in +- let ovirt_verifypeer = ref false in +- let ovirt_disk_uuids = ref None in - - List.iter ( - function -- | "rhv-cafile", v -> -- if !rhv_cafile <> None then -- error (f_"-o rhv-upload: -oo rhv-cafile set more than once"); -- rhv_cafile := Some v -- | "rhv-cluster", v -> -- if !rhv_cluster <> None then -- error (f_"-o rhv-upload: -oo rhv-cluster set more than once"); -- rhv_cluster := Some v -- | "rhv-direct", "" -> rhv_direct := true -- | "rhv-direct", v -> rhv_direct := bool_of_string v -- | "rhv-proxy", "" -> rhv_direct := false -- | "rhv-proxy", v -> rhv_direct := not (bool_of_string v) -- | "rhv-verifypeer", "" -> rhv_verifypeer := true -- | "rhv-verifypeer", v -> rhv_verifypeer := bool_of_string v -- | "rhv-disk-uuid", v -> +- | ("ovirt-cafile"|"rhv-cafile"), v -> +- if !ovirt_cafile <> None then +- error (f_"-o ovirt-upload: -oo ovirt-cafile set more than once"); +- ovirt_cafile := Some v +- | ("ovirt-cluster"|"rhv-cluster"), v -> +- if !ovirt_cluster <> None then +- error (f_"-o ovirt-upload: -oo ovirt-cluster set more than once"); +- ovirt_cluster := Some v +- | ("ovirt-direct"|"rhv-direct"), "" -> ovirt_direct := true +- | ("ovirt-direct"|"rhv-direct"), v -> ovirt_direct := bool_of_string v +- | ("ovirt-proxy"|"rhv-proxy"), "" -> ovirt_direct := false +- | ("ovirt-proxy"|"rhv-proxy"), v -> ovirt_direct := not (bool_of_string v) +- | ("ovirt-verifypeer"|"rhv-verifypeer"), "" -> ovirt_verifypeer := true +- | ("ovirt-verifypeer"|"rhv-verifypeer"), v -> +- ovirt_verifypeer := bool_of_string v +- | ("ovirt-disk-uuid"|"rhv-disk-uuid"), v -> - if not (is_nonnil_uuid v) then -- error (f_"-o rhv-upload: invalid UUID for -oo rhv-disk-uuid"); -- rhv_disk_uuids := Some (v :: (Option.value ~default:[] !rhv_disk_uuids)) +- error (f_"-o ovirt-upload: invalid UUID for -oo ovirt-disk-uuid"); +- ovirt_disk_uuids := +- Some (v :: (Option.value ~default:[] !ovirt_disk_uuids)) - | k, _ -> -- error (f_"-o rhv-upload: unknown output option ‘-oo %s’") k +- error (f_"-o ovirt-upload: unknown output option ‘-oo %s’") k - ) options.output_options; - -- let rhv_cafile = !rhv_cafile in -- let rhv_cluster = !rhv_cluster in -- let rhv_direct = !rhv_direct in -- let rhv_verifypeer = !rhv_verifypeer in -- let rhv_disk_uuids = Option.map List.rev !rhv_disk_uuids in +- let ovirt_cafile = !ovirt_cafile in +- let ovirt_cluster = !ovirt_cluster in +- let ovirt_direct = !ovirt_direct in +- let ovirt_verifypeer = !ovirt_verifypeer in +- let ovirt_disk_uuids = Option.map List.rev !ovirt_disk_uuids in - - let output_name = Option.value ~default:source.s_name options.output_name in - - (output_conn, options.output_format, - output_password, output_name, output_storage, -- rhv_cafile, rhv_cluster, rhv_direct, -- rhv_verifypeer, rhv_disk_uuids) +- ovirt_cafile, ovirt_cluster, ovirt_direct, +- ovirt_verifypeer, ovirt_disk_uuids) - - and is_nonnil_uuid uuid = - let nil_uuid = "00000000-0000-0000-0000-000000000000" in @@ -1232,19 +1219,13 @@ index 8133db2b..00000000 - if uuid = nil_uuid then false - else PCRE.matches (Lazy.force rex_uuid) uuid - -- let rec setup dir options source = -- error_if_disk_count_gt dir 23; -- let disks = get_disks dir in +- let rec setup dir options source input_disks = +- error_if_disk_count_gt input_disks 23; +- let input_sizes = get_disk_sizes input_disks in - let output_conn, output_format, - output_password, output_name, output_storage, -- rhv_cafile, rhv_cluster, rhv_direct, -- rhv_verifypeer, rhv_disk_uuids = options in -- -- (* We need nbdkit >= 1.22 for API_VERSION 2 and parallel threading model -- * in the python plugin. -- *) -- let nbdkit_min_version = (1, 22, 0) in -- let nbdkit_min_version_string = "1.22.0" in +- ovirt_cafile, ovirt_cluster, ovirt_direct, +- ovirt_verifypeer, ovirt_disk_uuids = options in - - (* Check that the 'ovirtsdk4' Python module is available. *) - let error_unless_ovirtsdk4_module_available () = @@ -1259,17 +1240,10 @@ index 8133db2b..00000000 - let error_unless_nbdkit_working () = - if not (Nbdkit.is_installed ()) then - error (f_"nbdkit is not installed or not working. It is required \ -- to use ‘-o rhv-upload’. See the virt-v2v-output-rhv(1) \ +- to use ‘-o ovirt-upload’. See the virt-v2v-output-ovirt(1) \ - manual.") - in - -- let error_unless_nbdkit_min_version () = -- let version = Nbdkit.version () in -- if version < nbdkit_min_version then -- error (f_"nbdkit is not new enough, you need to upgrade to nbdkit ≥ %s") -- nbdkit_min_version_string -- in -- - (* Check that the python3 plugin is installed and working - * and can load the plugin script. - *) @@ -1279,9 +1253,9 @@ index 8133db2b..00000000 - debug "%s" cmd; - if Sys.command cmd <> 0 then - error (f_"nbdkit python plugin is not installed or not working. \ -- It is required if you want to use ‘-o rhv-upload’. +- It is required if you want to use ‘-o ovirt-upload’. - --See also the virt-v2v-output-rhv(1) manual."); +-See also the virt-v2v-output-ovirt(1) manual."); - in - - (* Check that nbdkit was compiled with SELinux support (for the @@ -1302,31 +1276,30 @@ index 8133db2b..00000000 - Python_script.error_unless_python_interpreter_found (); - error_unless_ovirtsdk4_module_available (); - error_unless_nbdkit_working (); -- error_unless_nbdkit_min_version (); - error_unless_nbdkit_compiled_with_selinux (); - - (* Python code. *) - let precheck_script = -- Python_script.create ~name:"rhv-upload-precheck.py" -- Output_rhv_upload_precheck_source.code in +- Python_script.create ~name:"ovirt-upload-precheck.py" +- Output_ovirt_upload_precheck_source.code in - let vmcheck_script = -- Python_script.create ~name:"rhv-upload-vmcheck.py" -- Output_rhv_upload_vmcheck_source.code in +- Python_script.create ~name:"ovirt-upload-vmcheck.py" +- Output_ovirt_upload_vmcheck_source.code in - let plugin_script = -- Python_script.create ~name:"rhv-upload-plugin.py" -- Output_rhv_upload_plugin_source.code in +- Python_script.create ~name:"ovirt-upload-plugin.py" +- Output_ovirt_upload_plugin_source.code in - let transfer_script = -- Python_script.create ~name:"rhv-upload-transfer.py" -- Output_rhv_upload_transfer_source.code in +- Python_script.create ~name:"ovirt-upload-transfer.py" +- Output_ovirt_upload_transfer_source.code in - let finalize_script = -- Python_script.create ~name:"rhv-upload-finalize.py" -- Output_rhv_upload_finalize_source.code in +- Python_script.create ~name:"ovirt-upload-finalize.py" +- Output_ovirt_upload_finalize_source.code in - let cancel_script = -- Python_script.create ~name:"rhv-upload-cancel.py" -- Output_rhv_upload_cancel_source.code in +- Python_script.create ~name:"ovirt-upload-cancel.py" +- Output_ovirt_upload_cancel_source.code in - let createvm_script = -- Python_script.create ~name:"rhv-upload-createvm.py" -- Output_rhv_upload_createvm_source.code in +- Python_script.create ~name:"ovirt-upload-createvm.py" +- Output_ovirt_upload_createvm_source.code in - - error_unless_nbdkit_python_plugin_working plugin_script; - @@ -1337,16 +1310,17 @@ index 8133db2b..00000000 - "output_conn", JSON.String output_conn; - "output_password", JSON.String output_password; - "output_storage", JSON.String output_storage; -- "rhv_cafile", json_optstring rhv_cafile; -- "rhv_cluster", JSON.String (Option.value ~default:"Default" rhv_cluster); -- "rhv_direct", JSON.Bool rhv_direct; +- "ovirt_cafile", json_optstring ovirt_cafile; +- "ovirt_cluster", +- JSON.String (Option.value ~default:"Default" ovirt_cluster); +- "ovirt_direct", JSON.Bool ovirt_direct; - - (* The 'Insecure' flag seems to be a number with various possible - * meanings, however we just set it to True/False. - * - * https://github.com/oVirt/ovirt-engine-sdk/blob/19aa7070b80e60a4cfd910448287aecf9083acbe/sdk/lib/ovirtsdk4/__init__.py#L395 - *) -- "insecure", JSON.Bool (not rhv_verifypeer); +- "insecure", JSON.Bool (not ovirt_verifypeer); - ] in - - (* nbdkit command line which is invariant between disks. *) @@ -1357,11 +1331,11 @@ index 8133db2b..00000000 - Nbdkit.set_threads cmd 8; - - (* Python code prechecks. *) -- let json_params = match rhv_disk_uuids with +- let json_params = match ovirt_disk_uuids with - | None -> json_params - | Some uuids -> - let ids = List.map (fun uuid -> JSON.String uuid) uuids in -- ("rhv_disk_uuids", JSON.List ids) :: json_params +- ("ovirt_disk_uuids", JSON.List ids) :: json_params - in - let precheck_json = dir // "v2vprecheck.json" in - let fd = Unix.openfile precheck_json [O_WRONLY; O_CREAT; O_TRUNC] 0o600 in @@ -1374,35 +1348,35 @@ index 8133db2b..00000000 - let json = JSON_parser.json_parser_tree_parse_file precheck_json in - debug "precheck output parsed as: %s" - (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); -- let rhv_storagedomain_uuid = -- Some (JSON_parser.object_get_string "rhv_storagedomain_uuid" json) in -- let rhv_cluster_uuid = -- Some (JSON_parser.object_get_string "rhv_cluster_uuid" json) in -- let rhv_cluster_cpu_architecture = -- Some (JSON_parser.object_get_string "rhv_cluster_cpu_architecture" json) in +- let ovirt_storagedomain_uuid = +- Some (JSON_parser.object_get_string "ovirt_storagedomain_uuid" json) in +- let ovirt_cluster_uuid = +- Some (JSON_parser.object_get_string "ovirt_cluster_uuid" json) in +- let ovirt_cluster_cpu_architecture = +- Some (JSON_parser.object_get_string "ovirt_cluster_cpu_architecture" json) in - - (* If the disk UUIDs were not provided, then generate them. -- * This is simpler than letting RHV generate them and trying -- * to read them back from RHV. +- * This is simpler than letting oVirt generate them and trying +- * to read them back from oVirt. - *) - let disk_uuids = -- match rhv_disk_uuids with +- match ovirt_disk_uuids with - | Some uuids -> -- let nr_disks = List.length disks in +- let nr_disks = List.length input_disks in - if List.length uuids <> nr_disks then -- error (f_"the number of ‘-oo rhv-disk-uuid’ parameters passed on \ +- error (f_"the number of ‘-oo ovirt-disk-uuid’ parameters passed on \ - the command line has to match the number of guest \ - disk images (for this guest: %d)") nr_disks; - uuids -- | None -> List.map (fun _ -> uuidgen ()) disks in +- | None -> List.map (fun _ -> uuidgen ()) input_disks in - - (* This will accumulate the list of transfer IDs from the transfer - * script. - *) - let transfer_ids = ref [] in - -- let rhv_cluster_name = -- match List.assoc "rhv_cluster" json_params with +- let ovirt_cluster_name = +- match List.assoc "ovirt_cluster" json_params with - | JSON.String s -> s - | _ -> assert false in - @@ -1454,106 +1428,110 @@ index 8133db2b..00000000 - (* Create an nbdkit instance for each disk and set the - * target URI to point to the NBD socket. - *) -- List.iter ( -- fun ((i, size), uuid) -> -- let socket = sprintf "%s/out%d" dir i in -- On_exit.unlink socket; +- let uris = +- List.mapi ( +- fun i (size, uuid) -> +- let socket = sprintf "%s/out%d" dir i in +- On_exit.unlink socket; - -- let disk_name = sprintf "%s-%03d" output_name i in -- let json_params = -- ("disk_name", JSON.String disk_name) :: json_params in +- let disk_name = sprintf "%s-%03d" output_name i in +- let json_params = +- ("disk_name", JSON.String disk_name) :: json_params in - -- let disk_format = -- match output_format with -- | "raw" as fmt -> fmt -- | "qcow2" as fmt -> fmt -- | _ -> -- error (f_"rhv-upload: -of %s: Only output format ‘raw’ or ‘qcow2’ \ -- is supported. If the input is in a different format \ -- then force one of these output formats by adding \ -- either ‘-of raw’ or ‘-of qcow2’ on the command line.") -- output_format in -- let json_params = -- ("disk_format", JSON.String disk_format) :: json_params in +- let disk_format = +- match output_format with +- | "raw" as fmt -> fmt +- | "qcow2" as fmt -> fmt +- | _ -> +- error (f_"ovirt-upload: -of %s: Only output format ‘raw’ \ +- or ‘qcow2’ \ +- is supported. If the input is in a different format \ +- then force one of these output formats by adding \ +- either ‘-of raw’ or ‘-of qcow2’ on the command line.") +- output_format in +- let json_params = +- ("disk_format", JSON.String disk_format) :: json_params in - -- let json_params = -- ("disk_size", JSON.Int size) :: json_params in +- let json_params = +- ("disk_size", JSON.Int size) :: json_params in - -- let json_params = -- ("disk_uuid", JSON.String uuid) :: json_params in +- let json_params = +- ("disk_uuid", JSON.String uuid) :: json_params in - -- (* Write the JSON parameters to a file. *) -- let json_param_file = dir // sprintf "out.params%d.json" i in -- with_open_out -- json_param_file -- (fun chan -> output_string chan (JSON.string_of_doc json_params)); +- (* Write the JSON parameters to a file. *) +- let json_param_file = dir // sprintf "out.params%d.json" i in +- with_open_out +- json_param_file +- (fun chan -> output_string chan (JSON.string_of_doc json_params)); - -- (* Start the transfer. *) -- let transfer_json = dir // sprintf "v2vtransfer%d.json" i in -- let fd = -- Unix.openfile transfer_json [O_WRONLY; O_CREAT; O_TRUNC] 0o600 in -- if Python_script.run_command ~stdout_fd:fd -- transfer_script json_params [] <> 0 then -- error (f_"failed to start transfer, see earlier errors"); -- if verbose () then -- debug "transfer output before parsing: %s" -- (read_whole_file transfer_json); -- let json = JSON_parser.json_parser_tree_parse_file transfer_json in -- debug "transfer output parsed as: %s" -- (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); -- let destination_url = -- JSON_parser.object_get_string "destination_url" json in -- let transfer_id = -- JSON_parser.object_get_string "transfer_id" json in -- List.push_back transfer_ids transfer_id; -- let is_ovirt_host = -- JSON_parser.object_get_bool "is_ovirt_host" json in +- (* Start the transfer. *) +- let transfer_json = dir // sprintf "v2vtransfer%d.json" i in +- let fd = +- Unix.openfile transfer_json [O_WRONLY; O_CREAT; O_TRUNC] 0o600 in +- if Python_script.run_command ~stdout_fd:fd +- transfer_script json_params [] <> 0 then +- error (f_"failed to start transfer, see earlier errors"); +- if verbose () then +- debug "transfer output before parsing: %s" +- (read_whole_file transfer_json); +- let json = JSON_parser.json_parser_tree_parse_file transfer_json in +- debug "transfer output parsed as: %s" +- (JSON.string_of_doc ~fmt:JSON.Indented ["", json]); +- let destination_url = +- JSON_parser.object_get_string "destination_url" json in +- let transfer_id = +- JSON_parser.object_get_string "transfer_id" json in +- List.push_back transfer_ids transfer_id; +- let is_ovirt_host = +- JSON_parser.object_get_bool "is_ovirt_host" json in - -- (* Create the nbdkit instance. *) -- Nbdkit.add_arg cmd "size" (Int64.to_string size); -- Nbdkit.add_arg cmd "url" destination_url; -- Option.iter (Nbdkit.add_arg cmd "cafile") rhv_cafile; -- if not rhv_verifypeer then -- Nbdkit.add_arg cmd "insecure" "true"; -- if is_ovirt_host then -- Nbdkit.add_arg cmd "is_ovirt_host" "true"; -- let _, pid = Nbdkit.run_unix socket cmd in -- List.push_front pid nbdkit_pids -- ) (List.combine disks disk_uuids); +- (* Create the nbdkit instance. *) +- Nbdkit.add_arg cmd "size" (Int64.to_string size); +- Nbdkit.add_arg cmd "url" destination_url; +- Option.iter (Nbdkit.add_arg cmd "cafile") ovirt_cafile; +- if not ovirt_verifypeer then +- Nbdkit.add_arg cmd "insecure" "true"; +- if is_ovirt_host then +- Nbdkit.add_arg cmd "is_ovirt_host" "true"; +- let _, pid = Nbdkit.run_unix socket cmd in +- List.push_front pid nbdkit_pids; +- +- NBD_URI.Unix (socket, None) +- ) (List.combine input_sizes disk_uuids) in - - (* Stash some data we will need during finalization. *) -- let disk_sizes = List.map snd disks in -- let t = (disk_sizes : int64 list), disk_uuids, !transfer_ids, +- let t = (input_sizes : int64 list), disk_uuids, !transfer_ids, - finalize_script, createvm_script, json_params, -- rhv_storagedomain_uuid, rhv_cluster_uuid, -- rhv_cluster_cpu_architecture, rhv_cluster_name, nbdkit_pids in -- t +- ovirt_storagedomain_uuid, ovirt_cluster_uuid, +- ovirt_cluster_cpu_architecture, ovirt_cluster_name, nbdkit_pids in +- +- t, uris - - and json_optstring = function - | Some s -> JSON.String s - | None -> JSON.Null - -- let finalize dir options t source inspect target_meta = +- let finalize dir options t output_disks source inspect target_meta = - let output_conn, output_format, - output_password, output_name, output_storage, -- rhv_cafile, rhv_cluster, rhv_direct, -- rhv_verifypeer, rhv_disk_uuids = options in -- let disk_sizes, disk_uuids, transfer_ids, +- ovirt_cafile, ovirt_cluster, ovirt_direct, +- ovirt_verifypeer, ovirt_disk_uuids = options in +- let input_sizes, disk_uuids, transfer_ids, - finalize_script, createvm_script, json_params, -- rhv_storagedomain_uuid, rhv_cluster_uuid, -- rhv_cluster_cpu_architecture, rhv_cluster_name, +- ovirt_storagedomain_uuid, ovirt_cluster_uuid, +- ovirt_cluster_cpu_architecture, ovirt_cluster_name, - nbdkit_pids = t in - - (* Check the cluster CPU arch matches what we derived about the - * guest during conversion. - *) -- (match rhv_cluster_cpu_architecture with +- (match ovirt_cluster_cpu_architecture with - | None -> assert false - | Some arch -> - if arch <> target_meta.guestcaps.gcaps_arch then - error (f_"the cluster ‘%s’ does not support the architecture %s \ - but %s") -- rhv_cluster_name target_meta.guestcaps.gcaps_arch arch +- ovirt_cluster_name target_meta.guestcaps.gcaps_arch arch - ); - - (* We must kill all our nbdkit instances before finalizing the @@ -1581,25 +1559,25 @@ index 8133db2b..00000000 - - (* The storage domain UUID. *) - let sd_uuid = -- match rhv_storagedomain_uuid with +- match ovirt_storagedomain_uuid with - | None -> assert false - | Some uuid -> uuid in - - (* The volume and VM UUIDs are made up. *) -- let vol_uuids = List.map (fun _ -> uuidgen ()) disk_sizes +- let vol_uuids = List.map (fun _ -> uuidgen ()) input_sizes - and vm_uuid = uuidgen () in - - (* Create the metadata. *) - let ovf = -- Create_ovf.create_ovf source inspect target_meta disk_sizes +- Create_ovf.create_ovf source inspect target_meta input_sizes - Sparse output_format output_name -- sd_uuid disk_uuids vol_uuids dir vm_uuid OVirt in +- sd_uuid disk_uuids vol_uuids output_disks vm_uuid OVirt in - let ovf = DOM.doc_to_string ovf in - - let json_params = -- match rhv_cluster_uuid with +- match ovirt_cluster_uuid with - | None -> assert false -- | Some uuid -> ("rhv_cluster_uuid", JSON.String uuid) :: json_params in +- | Some uuid -> ("ovirt_cluster_uuid", JSON.String uuid) :: json_params in - - let ovf_file = dir // "vm.ovf" in - with_open_out ovf_file (fun chan -> output_string chan ovf); @@ -1613,10 +1591,10 @@ index 8133db2b..00000000 - *) - let request_size = Some (4*1024*1024) -end -diff --git a/output/output_rhv_upload.mli b/output/output_rhv_upload.mli +diff --git a/output/output_ovirt_upload.mli b/output/output_ovirt_upload.mli deleted file mode 100644 -index 7106a3f1..00000000 ---- a/output/output_rhv_upload.mli +index 06daca34..00000000 +--- a/output/output_ovirt_upload.mli +++ /dev/null @@ -1,21 +0,0 @@ -(* virt-v2v @@ -1637,13 +1615,13 @@ index 7106a3f1..00000000 - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - --(** [-o rhv-upload] output mode. *) +-(** [-o ovirt-upload] output mode. *) - --module RHVUpload : Output.OUTPUT -diff --git a/output/output_rhv_upload_cancel_source.mli b/output/output_rhv_upload_cancel_source.mli +-module OVirtUpload : Output.OUTPUT +diff --git a/output/output_ovirt_upload_cancel_source.mli b/output/output_ovirt_upload_cancel_source.mli deleted file mode 100644 index aa33bc54..00000000 ---- a/output/output_rhv_upload_cancel_source.mli +--- a/output/output_ovirt_upload_cancel_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1665,10 +1643,10 @@ index aa33bc54..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_createvm_source.mli b/output/output_rhv_upload_createvm_source.mli +diff --git a/output/output_ovirt_upload_createvm_source.mli b/output/output_ovirt_upload_createvm_source.mli deleted file mode 100644 index c1bafa15..00000000 ---- a/output/output_rhv_upload_createvm_source.mli +--- a/output/output_ovirt_upload_createvm_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1690,10 +1668,10 @@ index c1bafa15..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_finalize_source.mli b/output/output_rhv_upload_finalize_source.mli +diff --git a/output/output_ovirt_upload_finalize_source.mli b/output/output_ovirt_upload_finalize_source.mli deleted file mode 100644 index aa33bc54..00000000 ---- a/output/output_rhv_upload_finalize_source.mli +--- a/output/output_ovirt_upload_finalize_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1715,10 +1693,10 @@ index aa33bc54..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_plugin_source.mli b/output/output_rhv_upload_plugin_source.mli +diff --git a/output/output_ovirt_upload_plugin_source.mli b/output/output_ovirt_upload_plugin_source.mli deleted file mode 100644 index c1bafa15..00000000 ---- a/output/output_rhv_upload_plugin_source.mli +--- a/output/output_ovirt_upload_plugin_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1740,10 +1718,10 @@ index c1bafa15..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_precheck_source.mli b/output/output_rhv_upload_precheck_source.mli +diff --git a/output/output_ovirt_upload_precheck_source.mli b/output/output_ovirt_upload_precheck_source.mli deleted file mode 100644 index aa33bc54..00000000 ---- a/output/output_rhv_upload_precheck_source.mli +--- a/output/output_ovirt_upload_precheck_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1765,10 +1743,10 @@ index aa33bc54..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_transfer_source.mli b/output/output_rhv_upload_transfer_source.mli +diff --git a/output/output_ovirt_upload_transfer_source.mli b/output/output_ovirt_upload_transfer_source.mli deleted file mode 100644 index aa33bc54..00000000 ---- a/output/output_rhv_upload_transfer_source.mli +--- a/output/output_ovirt_upload_transfer_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1790,10 +1768,10 @@ index aa33bc54..00000000 - *) - -val code : string -diff --git a/output/output_rhv_upload_vmcheck_source.mli b/output/output_rhv_upload_vmcheck_source.mli +diff --git a/output/output_ovirt_upload_vmcheck_source.mli b/output/output_ovirt_upload_vmcheck_source.mli deleted file mode 100644 index c1bafa15..00000000 ---- a/output/output_rhv_upload_vmcheck_source.mli +--- a/output/output_ovirt_upload_vmcheck_source.mli +++ /dev/null @@ -1,19 +0,0 @@ -(* virt-v2v @@ -1817,10 +1795,10 @@ index c1bafa15..00000000 -val code : string diff --git a/output/output_vdsm.ml b/output/output_vdsm.ml deleted file mode 100644 -index 8ab2e766..00000000 +index db12e0b1..00000000 --- a/output/output_vdsm.ml +++ /dev/null -@@ -1,237 +0,0 @@ +@@ -1,239 +0,0 @@ -(* virt-v2v - * Copyright (C) 2009-2025 Red Hat Inc. - * @@ -1870,7 +1848,7 @@ index 8ab2e766..00000000 - -oo vdsm-vm-uuid=UUID VM UUID (required) - -oo vdsm-ovf-output=DIR OVF metadata directory (required) - -oo vdsm-ovf-flavour=%s -- Set the type of generated OVF (default: rhvexp) +- Set the type of generated OVF (default: ovirtexp) - -For each disk you must supply one of each of these options: - @@ -1885,7 +1863,7 @@ index 8ab2e766..00000000 - let vm_uuid = ref None in - let ovf_output = ref None in (* default "." *) - let compat = ref "0.10" in -- let ovf_flavour = ref Create_ovf.RHVExportStorageDomain in +- let ovf_flavour = ref Create_ovf.OVirtExportStorageDomain in - let image_uuids = ref [] in - let vol_uuids = ref [] in - @@ -1943,26 +1921,26 @@ index 8ab2e766..00000000 - image_uuids, vol_uuids, vm_uuid, ovf_output, - compat, ovf_flavour) - -- let setup dir options source = -- error_if_disk_count_gt dir 23; -- let disks = get_disks dir in +- let setup dir options source input_disks = +- error_if_disk_count_gt input_disks 23; +- let input_sizes = get_disk_sizes input_disks in - let output_alloc, output_format, - output_name, output_storage, - image_uuids, vol_uuids, vm_uuid, ovf_output, - compat, ovf_flavour = options in - -- if List.length image_uuids <> List.length disks || -- List.length vol_uuids <> List.length disks then +- if List.length image_uuids <> List.length input_disks || +- List.length vol_uuids <> List.length input_disks then - error (f_"the number of ‘-oo vdsm-image-uuid’ and ‘-oo vdsm-vol-uuid’ \ - parameters passed on the command line has to match the \ - number of guest disk images (for this guest: %d)") -- (List.length disks); +- (List.length input_disks); - - let dd_mp, dd_uuid = - let fields = - String.nsplit "/" output_storage in (* ... "data-center" "UUID" *) - let fields = List.rev fields in (* "UUID" "data-center" ... *) -- let fields = List.dropwhile ((=) "") fields in +- let fields = List.drop_while ((=) "") fields in - match fields with - | uuid :: rest when String.length uuid = 36 -> - let mp = String.concat "/" (List.rev rest) in @@ -2012,10 +1990,9 @@ index 8ab2e766..00000000 - ) (List.combine image_uuids vol_uuids) in - - (* Generate the .meta files associated with each volume. *) -- let sizes = List.map snd disks in - let metas = - Create_ovf.create_meta_files output_alloc output_format -- dd_uuid image_uuids sizes in +- dd_uuid image_uuids input_sizes in - List.iter ( - fun (filename, meta) -> - let meta_filename = filename ^ ".meta" in @@ -2023,20 +2000,23 @@ index 8ab2e766..00000000 - ) (List.combine filenames metas); - - (* Set up the NBD servers. *) -- List.iter ( -- fun ((i, size), filename) -> -- let socket = sprintf "%s/out%d" dir i in -- On_exit.unlink socket; +- let uris = +- List.mapi ( +- fun i (size, filename) -> +- let socket = sprintf "%s/out%d" dir i in +- On_exit.unlink socket; - -- (* Create the actual output disk. *) -- output_to_local_file output_alloc output_format filename size socket -- ) (List.combine disks filenames); +- (* Create the actual output disk. *) +- output_to_local_file output_alloc output_format filename size socket; +- +- NBD_URI.Unix (socket, None) +- ) (List.combine input_sizes filenames) in - - (* Save parameters since we need them during finalization. *) -- let t = dd_mp, dd_uuid, sizes in -- t +- let t = dd_mp, dd_uuid, input_sizes in +- t, uris - -- let finalize dir options t source inspect target_meta = +- let finalize dir options t output_disks source inspect target_meta = - let output_alloc, output_format, - output_name, output_storage, - image_uuids, vol_uuids, vm_uuid, ovf_output, @@ -2048,7 +2028,7 @@ index 8ab2e766..00000000 - output_alloc output_format output_name dd_uuid - image_uuids - vol_uuids -- dir +- output_disks - vm_uuid - ovf_flavour in - @@ -2085,14 +2065,14 @@ index c598f5df..00000000 -(** [-o vdsm] output mode. *) - -module VDSM : Output.OUTPUT -diff --git a/output/rhv-upload-cancel.py b/output/rhv-upload-cancel.py +diff --git a/output/ovirt-upload-cancel.py b/output/ovirt-upload-cancel.py deleted file mode 100644 -index 82122a2a..00000000 ---- a/output/rhv-upload-cancel.py +index fed44b45..00000000 +--- a/output/ovirt-upload-cancel.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- python -*- --# oVirt or RHV upload cancel used by ‘virt-v2v -o rhv-upload’ +-# oVirt upload cancel used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2019-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -2152,7 +2132,7 @@ index 82122a2a..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) @@ -2187,14 +2167,14 @@ index 82122a2a..00000000 - except Exception: - if params['verbose']: - traceback.print_exc() -diff --git a/output/rhv-upload-createvm.py b/output/rhv-upload-createvm.py +diff --git a/output/ovirt-upload-createvm.py b/output/ovirt-upload-createvm.py deleted file mode 100644 -index 9af2c167..00000000 ---- a/output/rhv-upload-createvm.py +index 6afde782..00000000 +--- a/output/ovirt-upload-createvm.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- python -*- --# oVirt or RHV upload create VM used by ‘virt-v2v -o rhv-upload’ +-# oVirt upload create VM used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -2294,7 +2274,7 @@ index 9af2c167..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) @@ -2302,7 +2282,7 @@ index 9af2c167..00000000 -system_service = connection.system_service() - -# Get the cluster. --cluster = system_service.clusters_service().cluster_service(params['rhv_cluster_uuid']) +-cluster = system_service.clusters_service().cluster_service(params['ovirt_cluster_uuid']) -cluster = cluster.get() - -correlation_id = str(uuid.uuid4()) @@ -2330,14 +2310,14 @@ index 9af2c167..00000000 - raise RuntimeError( - "Timed out waiting for VM creation!" - " Jobs still running for correlation id %s" % correlation_id) -diff --git a/output/rhv-upload-finalize.py b/output/rhv-upload-finalize.py +diff --git a/output/ovirt-upload-finalize.py b/output/ovirt-upload-finalize.py deleted file mode 100644 -index ee14873e..00000000 ---- a/output/rhv-upload-finalize.py +index 8dd4a731..00000000 +--- a/output/ovirt-upload-finalize.py +++ /dev/null @@ -1,174 +0,0 @@ -# -*- python -*- --# oVirt or RHV upload finalize used by ‘virt-v2v -o rhv-upload’ +-# oVirt upload finalize used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -2500,7 +2480,7 @@ index ee14873e..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) @@ -2510,14 +2490,14 @@ index ee14873e..00000000 - finalize_transfer(connection, transfer_id, disk_id) - -connection.close() -diff --git a/output/rhv-upload-plugin.py b/output/rhv-upload-plugin.py +diff --git a/output/ovirt-upload-plugin.py b/output/ovirt-upload-plugin.py deleted file mode 100644 -index b7a42005..00000000 ---- a/output/rhv-upload-plugin.py +index a10ecfd5..00000000 +--- a/output/ovirt-upload-plugin.py +++ /dev/null @@ -1,525 +0,0 @@ -# -*- python -*- --# oVirt or RHV upload nbdkit plugin used by ‘virt-v2v -o rhv-upload’ +-# oVirt upload nbdkit plugin used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -2829,7 +2809,7 @@ index b7a42005..00000000 - send_flush(item.http) - item.last_used = time.monotonic() - finally: -- # Unlock the pool by puting the connection back. +- # Unlock the pool by putting the connection back. - for item in locked: - pool.put(item) - @@ -3041,14 +3021,14 @@ index b7a42005..00000000 - else: - raise RuntimeError("could not use OPTIONS request: %d: %s" % - (r.status, r.reason)) -diff --git a/output/rhv-upload-precheck.py b/output/rhv-upload-precheck.py +diff --git a/output/ovirt-upload-precheck.py b/output/ovirt-upload-precheck.py deleted file mode 100644 -index 539a7508..00000000 ---- a/output/rhv-upload-precheck.py +index 00d5a829..00000000 +--- a/output/ovirt-upload-precheck.py +++ /dev/null @@ -1,135 +0,0 @@ -# -*- python -*- --# oVirt or RHV pre-upload checks used by ‘virt-v2v -o rhv-upload’ +-# oVirt pre-upload checks used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -3111,7 +3091,7 @@ index 539a7508..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) @@ -3150,24 +3130,24 @@ index 539a7508..00000000 - -# Get the cluster. -clusters = connection.follow_link(datacenter.clusters) --clusters = [cluster for cluster in clusters if cluster.name == params['rhv_cluster']] +-clusters = [cluster for cluster in clusters if cluster.name == params['ovirt_cluster']] -if len(clusters) == 0: - raise RuntimeError("The cluster ‘%s’ is not part of the DC ‘%s’, " - "where the storage domain ‘%s’ is" % -- (params['rhv_cluster'], datacenter.name, +- (params['ovirt_cluster'], datacenter.name, - output_storage)) -cluster = clusters[0] -cpu = cluster.cpu -if cpu.architecture == types.Architecture.UNDEFINED: - raise RuntimeError("The cluster ‘%s’ has an unknown architecture" % -- (params['rhv_cluster'])) +- (params['ovirt_cluster'])) - -# Find if any disk already exists with specified UUID. --# Only used with -oo rhv-disk-uuid. It is assumed that the +-# Only used with -oo ovirt-disk-uuid. It is assumed that the -# random UUIDs that we generate are unlikely to conflict. -disks_service = system_service.disks_service() - --for uuid in params.get('rhv_disk_uuids', []): +-for uuid in params.get('ovirt_disk_uuids', []): - try: - disk_service = disks_service.disk_service(uuid).get() - raise RuntimeError("Disk with the UUID '%s' already exists" % uuid) @@ -3176,20 +3156,20 @@ index 539a7508..00000000 - -# Otherwise everything is OK, print a JSON with the results. -results = { -- "rhv_storagedomain_uuid": storage_domain.id, -- "rhv_cluster_uuid": cluster.id, -- "rhv_cluster_cpu_architecture": cpu.architecture.value, +- "ovirt_storagedomain_uuid": storage_domain.id, +- "ovirt_cluster_uuid": cluster.id, +- "ovirt_cluster_cpu_architecture": cpu.architecture.value, -} - -json.dump(results, sys.stdout) -diff --git a/output/rhv-upload-transfer.py b/output/rhv-upload-transfer.py +diff --git a/output/ovirt-upload-transfer.py b/output/ovirt-upload-transfer.py deleted file mode 100644 -index 322418e2..00000000 ---- a/output/rhv-upload-transfer.py +index 22a99592..00000000 +--- a/output/ovirt-upload-transfer.py +++ /dev/null @@ -1,298 +0,0 @@ -# -*- python -*- --# oVirt or RHV upload start transfer used by ‘virt-v2v -o rhv-upload’ +-# oVirt upload start transfer used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -3253,7 +3233,7 @@ index 322418e2..00000000 - if len(data_centers) == 0: - # The storage domain is not attached to a datacenter - # (shouldn't happen, would fail on disk creation). -- debug("storange domain (%s) is not attached to a DC" % storage_name) +- debug("storage domain (%s) is not attached to a DC" % storage_name) - return None - - datacenter = data_centers[0] @@ -3408,8 +3388,8 @@ index 322418e2..00000000 - -def transfer_supports_format(): - """ -- Return True if transfer supports the "format" argument, enabing the NBD -- bakend on imageio side, which allows uploading to qcow2 images. +- Return True if transfer supports the "format" argument, enabling the NBD +- backend on imageio side, which allows uploading to qcow2 images. - - This feature was added in ovirt 4.3. We assume that the SDK version matches - engine version. @@ -3422,11 +3402,11 @@ index 322418e2..00000000 - """ - Returns the transfer url, preferring direct transfer if possible. - """ -- if params['rhv_direct']: +- if params['ovirt_direct']: - if transfer.transfer_url is None: - raise RuntimeError("direct upload to host not supported, " - "requires ovirt-engine >= 4.2 and only works " -- "when virt-v2v is run within the oVirt/RHV " +- "when virt-v2v is run within the oVirt " - "environment, eg. on an oVirt node.") - return transfer.transfer_url - else: @@ -3466,14 +3446,14 @@ index 322418e2..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) - -with closing(connection): - # Use the local host if possible. -- host = find_host(connection) if params['rhv_direct'] else None +- host = find_host(connection) if params['ovirt_direct'] else None - disk = create_disk(connection) - - transfer = create_transfer(connection, disk, host) @@ -3486,14 +3466,14 @@ index 322418e2..00000000 - "is_ovirt_host": host is not None, -} -json.dump(results, sys.stdout) -diff --git a/output/rhv-upload-vmcheck.py b/output/rhv-upload-vmcheck.py +diff --git a/output/ovirt-upload-vmcheck.py b/output/ovirt-upload-vmcheck.py deleted file mode 100644 -index 42cc24e8..00000000 ---- a/output/rhv-upload-vmcheck.py +index 6240046e..00000000 +--- a/output/ovirt-upload-vmcheck.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- python -*- --# oVirt or RHV VM existence check used by ‘virt-v2v -o rhv-upload’ +-# oVirt VM existence check used by ‘virt-v2v -o ovirt-upload’ -# Copyright (C) 2018-2025 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify @@ -3546,7 +3526,7 @@ index 42cc24e8..00000000 - url=urlunparse(parsed._replace(netloc=netloc)), - username=username, - password=output_password, -- ca_file=params['rhv_cafile'], +- ca_file=params['ovirt_cafile'], - log=logging.getLogger(), - insecure=params['insecure'], -) @@ -3564,43 +3544,78 @@ index 42cc24e8..00000000 - (params['output_name'], vm.id)) - -# Otherwise everything is OK, exit with no error. +diff --git a/output/select_output.ml b/output/select_output.ml +index eaee5bb5..20e7c661 100644 +--- a/output/select_output.ml ++++ b/output/select_output.ml +@@ -20,7 +20,7 @@ open Tools_utils + open Common_gettext.Gettext + + type output_mode = Disk | Kubevirt | Libvirt | Null +- | Openstack | OVirt | OVirt_Upload | QEmu | VDSM ++ | Openstack | QEmu + + let output_mode_of_string = function + | "kubevirt" -> Kubevirt +@@ -28,11 +28,7 @@ let output_mode_of_string = function + | "disk" | "local" -> Disk + | "null" -> Null + | "openstack" | "osp" | "rhosp" -> Openstack +- | "ovirt" | "rhv" | "rhev" -> OVirt +- | "ovirt-upload" | "ovirt_upload" | "rhv-upload" | "rhv_upload" -> +- OVirt_Upload + | "qemu" -> QEmu +- | "vdsm" -> VDSM + | s -> error (f_"unknown -o option: %s") s + + let select_output = function +@@ -42,6 +38,3 @@ let select_output = function + | Some QEmu -> (module Output_qemu.QEMU) + | Some Kubevirt -> (module Output_kubevirt.Kubevirt) + | Some Openstack -> (module Output_openstack.Openstack) +- | Some OVirt_Upload -> (module Output_ovirt_upload.OVirtUpload) +- | Some OVirt -> (module Output_ovirt.OVirt) +- | Some VDSM -> (module Output_vdsm.VDSM) +diff --git a/output/select_output.mli b/output/select_output.mli +index 5c13572e..e0923245 100644 +--- a/output/select_output.mli ++++ b/output/select_output.mli +@@ -17,7 +17,7 @@ + *) + + type output_mode = Disk | Kubevirt | Libvirt | Null +- | Openstack | OVirt | OVirt_Upload | QEmu | VDSM ++ | Openstack | QEmu + (** [-o] option on the command line *) + + val output_mode_of_string : string -> output_mode diff --git a/tests/Makefile.am b/tests/Makefile.am -index befa9337..73b84958 100644 +index f64316fd..0b43f26b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -99,11 +99,6 @@ TESTS = \ - test-o-null.sh \ - test-o-openstack.sh \ +@@ -102,8 +102,6 @@ TESTS = \ + test-o-ovirt-upload.sh \ + test-o-ovirt.sh \ test-o-qemu.sh \ -- test-o-rhv-upload-oo-query.sh \ -- test-o-rhv-upload.sh \ -- test-o-rhv.sh \ - test-o-vdsm-oo-query.sh \ - test-o-vdsm-options.sh \ test-oa-option-qcow2.sh \ test-oa-option-raw.sh \ test-of-option.sh \ -@@ -291,16 +286,6 @@ EXTRA_DIST += \ - test-o-null.sh \ - test-o-openstack.sh \ +@@ -300,9 +298,6 @@ EXTRA_DIST += \ + test-o-ovirt.ovf.expected \ + test-o-ovirt.sh \ test-o-qemu.sh \ -- test-o-rhv-upload-module/imageio.py \ -- test-o-rhv-upload-module/ovirtsdk4/__init__.py \ -- test-o-rhv-upload-module/ovirtsdk4/types.py \ -- test-o-rhv-upload-oo-query.sh \ -- test-o-rhv-upload.sh \ -- test-o-rhv.ovf.expected \ -- test-o-rhv.sh \ - test-o-vdsm-oo-query.sh \ - test-o-vdsm-options.ovf.expected \ - test-o-vdsm-options.sh \ test-oa-option-qcow2.sh \ test-oa-option-raw.sh \ test-of-option.sh \ -diff --git a/tests/test-o-rhv-upload-module/imageio.py b/tests/test-o-rhv-upload-module/imageio.py +diff --git a/tests/test-o-ovirt-upload-module/imageio.py b/tests/test-o-ovirt-upload-module/imageio.py deleted file mode 100755 -index 70ea2ef4..00000000 ---- a/tests/test-o-rhv-upload-module/imageio.py +index f832f8dc..00000000 +--- a/tests/test-o-ovirt-upload-module/imageio.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 @@ -3622,7 +3637,7 @@ index 70ea2ef4..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake imageio web server used as a test harness. --# See v2v/test-o-rhv-upload.sh +-# See v2v/test-o-ovirt-upload.sh - -import sys -import threading @@ -3634,7 +3649,7 @@ index 70ea2ef4..00000000 - def do_OPTIONS(self): - self.discard_request() - -- # Advertize only flush and zero support. +- # Advertise only flush and zero support. - content = b'''{ "features": [ "flush", "zero" ] }''' - length = len(content) - @@ -3674,10 +3689,10 @@ index 70ea2ef4..00000000 -sys.stdout.flush() - -httpd.serve_forever() -diff --git a/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py b/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py +diff --git a/tests/test-o-ovirt-upload-module/ovirtsdk4/__init__.py b/tests/test-o-ovirt-upload-module/ovirtsdk4/__init__.py deleted file mode 100644 -index fefc9821..00000000 ---- a/tests/test-o-rhv-upload-module/ovirtsdk4/__init__.py +index 3236b0fa..00000000 +--- a/tests/test-o-ovirt-upload-module/ovirtsdk4/__init__.py +++ /dev/null @@ -1,150 +0,0 @@ -# -*- python -*- @@ -3698,7 +3713,7 @@ index fefc9821..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake ovirtsdk4 module used as a test harness. --# See v2v/test-o-rhv-upload.sh +-# See v2v/test-o-ovirt-upload.sh - -class Error(Exception): - pass @@ -3830,10 +3845,10 @@ index fefc9821..00000000 - - def list(self, search=None): - return [] -diff --git a/tests/test-o-rhv-upload-module/ovirtsdk4/types.py b/tests/test-o-rhv-upload-module/ovirtsdk4/types.py +diff --git a/tests/test-o-ovirt-upload-module/ovirtsdk4/types.py b/tests/test-o-ovirt-upload-module/ovirtsdk4/types.py deleted file mode 100644 -index 397432f1..00000000 ---- a/tests/test-o-rhv-upload-module/ovirtsdk4/types.py +index ca2a0562..00000000 +--- a/tests/test-o-ovirt-upload-module/ovirtsdk4/types.py +++ /dev/null @@ -1,184 +0,0 @@ -# -*- python -*- @@ -3854,7 +3869,7 @@ index 397432f1..00000000 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Fake ovirtsdk4 module used as a test harness. --# See v2v/test-o-rhv-upload.sh +-# See v2v/test-o-ovirt-upload.sh - -import os -from enum import Enum @@ -4020,10 +4035,10 @@ index 397432f1..00000000 - name = "DC" - storage_domains = [StorageDomain()] - clusters = [Cluster()] -diff --git a/tests/test-o-rhv-upload-oo-query.sh b/tests/test-o-rhv-upload-oo-query.sh +diff --git a/tests/test-o-ovirt-upload-oo-query.sh b/tests/test-o-ovirt-upload-oo-query.sh deleted file mode 100755 -index 5dda6e04..00000000 ---- a/tests/test-o-rhv-upload-oo-query.sh +index 771f0613..00000000 +--- a/tests/test-o-ovirt-upload-oo-query.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - @@ -4057,20 +4072,20 @@ index 5dda6e04..00000000 -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" -export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" - --f=test-o-rhv-upload-oo-query.actual +-f=test-o-ovirt-upload-oo-query.actual -rm -f $f - -$VG virt-v2v --debug-gc \ -- -o rhv-upload -oo "?" > $f +- -o ovirt-upload -oo "?" > $f - --grep -- "-oo rhv-cafile" $f --grep -- "-oo rhv-verifypeer" $f +-grep -- "-oo ovirt-cafile" $f +-grep -- "-oo ovirt-verifypeer" $f - -rm $f -diff --git a/tests/test-o-rhv-upload.sh b/tests/test-o-rhv-upload.sh +diff --git a/tests/test-o-ovirt-upload.sh b/tests/test-o-ovirt-upload.sh deleted file mode 100755 -index 718f6ce8..00000000 ---- a/tests/test-o-rhv-upload.sh +index c4a1fc92..00000000 +--- a/tests/test-o-ovirt-upload.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - @@ -4091,10 +4106,10 @@ index 718f6ce8..00000000 -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - --# Test -o rhv-upload. +-# Test -o ovirt-upload. -# -# These uses a test harness (see --# tests/test-o-rhv-upload-module/ovirtsdk4) to fake responses from +-# tests/test-o-ovirt-upload-module/ovirtsdk4) to fake responses from -# oVirt. - -set -e @@ -4114,13 +4129,13 @@ index 718f6ce8..00000000 - -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" -export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" --export PYTHONPATH=$srcdir/test-o-rhv-upload-module:$PYTHONPATH +-export PYTHONPATH=$srcdir/test-o-ovirt-upload-module:$PYTHONPATH - -# Run the imageio process and get the port number. --log=test-o-rhv-upload.webserver.log +-log=test-o-ovirt-upload.webserver.log -rm -f $log -cleanup_fn rm -f $log --$srcdir/test-o-rhv-upload-module/imageio.py >$log 2>&1 & +-$srcdir/test-o-ovirt-upload-module/imageio.py >$log 2>&1 & -pid=$! -cleanup_fn kill $pid -export IMAGEIO_PORT= @@ -4136,21 +4151,21 @@ index 718f6ce8..00000000 -fi -echo IMAGEIO_PORT=$IMAGEIO_PORT - --# Run virt-v2v -o rhv-upload. +-# Run virt-v2v -o ovirt-upload. -# -# The fake ovirtsdk4 module doesn't care about most of the options --# like -oc, -oo rhv-cafile, -op etc. Any values may be used. +-# like -oc, -oo ovirt-cafile, -op etc. Any values may be used. -$VG virt-v2v --debug-gc -v -x \ - -i libvirt -ic "$libvirt_uri" windows \ -- -o rhv-upload \ +- -o ovirt-upload \ - -oc https://example.com/ovirt-engine/api \ -- -oo rhv-cafile=/dev/null \ +- -oo ovirt-cafile=/dev/null \ - -op /dev/null \ - -os Storage -diff --git a/tests/test-o-rhv.ovf.expected b/tests/test-o-rhv.ovf.expected +diff --git a/tests/test-o-ovirt.ovf.expected b/tests/test-o-ovirt.ovf.expected deleted file mode 100644 index 4f437d88..00000000 ---- a/tests/test-o-rhv.ovf.expected +--- a/tests/test-o-ovirt.ovf.expected +++ /dev/null @@ -1,113 +0,0 @@ - @@ -4266,10 +4281,10 @@ index 4f437d88..00000000 - - - -diff --git a/tests/test-o-rhv.sh b/tests/test-o-rhv.sh +diff --git a/tests/test-o-ovirt.sh b/tests/test-o-ovirt.sh deleted file mode 100755 -index 173d762c..00000000 ---- a/tests/test-o-rhv.sh +index cb0d2ccf..00000000 +--- a/tests/test-o-ovirt.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - @@ -4290,7 +4305,7 @@ index 173d762c..00000000 -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - --# Test -o rhv. +-# Test -o ovirt. - -set -e - @@ -4307,7 +4322,7 @@ index 173d762c..00000000 -export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools" -export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win/drivers" - --d=test-o-rhv.d +-d=test-o-ovirt.d -rm -rf $d -cleanup_fn rm -r $d -mkdir $d @@ -4318,11 +4333,11 @@ index 173d762c..00000000 -mkdir $d/12345678-1234-1234-1234-123456789abc/master -mkdir $d/12345678-1234-1234-1234-123456789abc/master/vms - --# $VG - XXX Disabled because the forking used to write files in -o rhv +-# $VG - XXX Disabled because the forking used to write files in -o ovirt -# mode confuses valgrind. -virt-v2v --debug-gc -v -x \ - -i libvirt -ic "$libvirt_uri" windows \ -- -o rhv -os $d +- -o ovirt -os $d - -# Test the OVF metadata was created. -test -f $d/12345678-1234-1234-1234-123456789abc/master/vms/*/*.ovf @@ -4358,7 +4373,7 @@ index 173d762c..00000000 - -e 's/\ output_mode := `Disk - | "null" -> output_mode := `Null - | "openstack" | "osp" | "rhosp" -> output_mode := `Openstack -- | "ovirt" | "rhv" | "rhev" -> output_mode := `RHV -- | "ovirt-upload" | "ovirt_upload" | "rhv-upload" | "rhv_upload" -> -- output_mode := `RHV_Upload - | "qemu" -> output_mode := `QEmu -- | "vdsm" -> output_mode := `VDSM - | s -> - error (f_"unknown -o option: %s") s - in -@@ -247,7 +243,7 @@ let rec main () = +@@ -210,7 +210,7 @@ let rec main () = + s_"Map NIC to network or bridge or assign static IP"; + [ S 'n'; L"network" ], Getopt.String ("in:out", add_network), s_"Map network ‘in’ to ‘out’"; - [ L"no-trim" ], Getopt.String ("-", no_trim_warning), - s_"Ignored for backwards compatibility"; -- [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|qemu|rhv|rhv-upload|vdsm", set_output_mode), +- [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|ovirt|ovirt-upload|qemu|vdsm", set_output_mode), + [ S 'o' ], Getopt.String ("kubevirt|libvirt|local|null|openstack|qemu", set_output_mode), s_"Set output mode (default: libvirt)"; [ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc), s_"Set output allocation mode"; -@@ -287,18 +283,6 @@ let rec main () = - s_"Same as ‘-io vddk-thumbprint=thumbprint’"; - [ L"vddk-transports" ], Getopt.String ("transports", set_input_option_compat "vddk-transports"), - s_"Same as ‘-io vddk-transports=transports’"; -- [ L"vdsm-compat" ], Getopt.String ("0.10|1.1", set_output_option_compat "vdsm-compat"), -- s_"Same as ‘-oo vdsm-compat=0.10|1.1’"; -- [ L"vdsm-image-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-image-uuid"), -- s_"Same as ‘-oo vdsm-image-uuid=uuid’"; -- [ L"vdsm-vol-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vol-uuid"), -- s_"Same as ‘-oo vdsm-vol-uuid=uuid’"; -- [ L"vdsm-vm-uuid" ], Getopt.String ("uuid", set_output_option_compat "vdsm-vm-uuid"), -- s_"Same as ‘-oo vdsm-vm-uuid=uuid’"; -- [ L"vdsm-ovf-output" ], Getopt.String ("dir", set_output_option_compat "vdsm-ovf-output"), -- s_"Same as ‘-oo vdsm-ovf-output=dir’"; -- [ L"vdsm-ovf-flavour" ], Getopt.String ("ovirt|rhvexp", set_output_option_compat "vdsm-ovf-flavour"), -- s_"Same as ‘-oo vdsm-ovf-flavour=flavour’"; - [ L"vmtype" ], Getopt.String ("-", vmtype_warning), - s_"Ignored for backwards compatibility"; - ] in -@@ -318,9 +302,6 @@ let rec main () = +@@ -249,9 +249,6 @@ let rec main () = virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest -virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi esx_guest \ -- -o rhv -os rhv.nfs:/export_domain --network ovirtmgmt +- -o ovirt -os ovirt.nfs:/export_domain --network ovirtmgmt - virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp virt-v2v -i disk disk.img -o local -os /var/tmp -@@ -387,7 +368,6 @@ read the man page virt-v2v(1). +@@ -318,7 +315,6 @@ read the man page virt-v2v(1). pr "vcenter-https\n"; pr "vddk\n"; pr "colours-option\n"; @@ -4689,9 +4673,9 @@ index e656afa3..8678dce7 100644 pr "io/oo\n"; pr "mac-option\n"; pr "bandwidth-option\n"; -@@ -405,9 +385,6 @@ read the man page virt-v2v(1). - pr "output:null\n"; - pr "output:openstack\n"; +@@ -338,9 +334,6 @@ read the man page virt-v2v(1). + pr "output:ovirt\n"; + pr "output:ovirt-upload\n"; pr "output:qemu\n"; - pr "output:rhv\n"; - pr "output:rhv-upload\n"; @@ -4699,23 +4683,11 @@ index e656afa3..8678dce7 100644 pr "convert:linux\n"; pr "convert:windows\n"; List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours; -@@ -492,10 +469,7 @@ read the man page virt-v2v(1). - | `Null -> (module Output_null.Null) - | `QEmu -> (module Output_qemu.QEMU) - | `Kubevirt -> (module Output_kubevirt.Kubevirt) -- | `Openstack -> (module Output_openstack.Openstack) -- | `RHV_Upload -> (module Output_rhv_upload.RHVUpload) -- | `RHV -> (module Output_rhv.RHV) -- | `VDSM -> (module Output_vdsm.VDSM) in -+ | `Openstack -> (module Output_openstack.Openstack) in - - let output_options = { - Output.output_alloc = output_alloc; -@@ -520,7 +494,6 @@ read the man page virt-v2v(1). +@@ -401,7 +394,6 @@ read the man page virt-v2v(1). *) let remove_serial_console = match output_mode with -- | `RHV | `VDSM -> true +- | Some Select_output.OVirt | Some VDSM -> true | _ -> false in (* Get the conversion options. *) diff --git a/0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch b/0017-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch similarity index 90% rename from 0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch rename to 0017-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch index 5b68d9b..c83ca75 100644 --- a/0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch +++ b/0017-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch @@ -1,4 +1,4 @@ -From 597a67b31d506ff076e694be21e2e45d767f7e46 Mon Sep 17 00:00:00 2001 +From d529bc6e02c0de394c6c90c34bc25659c7d97824 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 9 Jul 2024 11:30:09 +0100 Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported @@ -25,10 +25,10 @@ index 3d0d1b28..9714bbac 100644 run on KVM. It does this conversion in place, modifying the original disk. diff --git a/in-place/in_place.ml b/in-place/in_place.ml -index 84e783dc..0b9cc753 100644 +index dc19dca7..530ee9af 100644 --- a/in-place/in_place.ml +++ b/in-place/in_place.ml -@@ -214,6 +214,9 @@ read the man page virt-v2v-in-place(1). +@@ -207,6 +207,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; diff --git a/sources b/sources index 7ea33b9..f30eb94 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (virt-v2v-2.7.12.tar.gz) = 0de36782f19570ca48610e6d8a277ec6d3ed77f1dbe084bbc485fa21b380282c71311de650eaa2c1bff8f17e2073a9b5fd97bca67d576ba7c83a4b0c0a6d2d91 -SHA512 (virt-v2v-2.7.12.tar.gz.sig) = ec991f3e6444b9fa58a6b645649458c13b3ba76833d75087a0cdb733d628ef5f82ac6ed8ab35a7ec8b0bd4cd086faa62db1877a769c9832a71038c3161ac5531 +SHA512 (virt-v2v-2.7.15.tar.gz) = 3762a48dbb8ebb04e39496a816b6a367b78fb6a1137f5bc7b11c369692f80790afea8a0314a0f2e5dfbd9891f055f3f163e77fb6203029f1b2c17c444e3b7343 +SHA512 (virt-v2v-2.7.15.tar.gz.sig) = 1e9d2bab8a1cb757cd3222c2f77f4ff887fffd3b82ce380ce9b9850f183a31c1686f054b5b48cf0dad286d0fc5c5a12a7fe5a8b708b9f3b1b1ab0227ff35bac3 diff --git a/virt-v2v.spec b/virt-v2v.spec index 22bc744..7ef11f6 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -6,7 +6,7 @@ Name: virt-v2v Epoch: 1 -Version: 2.7.12 +Version: 2.7.15 Release: 1%{?dist} Summary: Convert a virtual machine to run on KVM @@ -27,18 +27,23 @@ Source3: copy-patches.sh # https://github.com/libguestfs/virt-v2v/commits/rhel-10.1 # Patches. -Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch -Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch -Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch -Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch -Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch -Patch0006: 0006-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch -Patch0007: 0007-RHEL-Remove-input-from-Xen.patch -Patch0008: 0008-RHEL-Remove-o-glance.patch -Patch0009: 0009-RHEL-tests-Remove-btrfs-test.patch -Patch0010: 0010-RHEL-Remove-block-driver-option.patch -Patch0011: 0011-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch -Patch0012: 0012-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch +Patch0001: 0001-input-vddk-Use-single-nbdkit-vddk-plugin-instance-wi.patch +Patch0002: 0002-docs-Further-updates-to-virt-v2v-release-notes-for-2.patch +Patch0003: 0003-input-vddk-Break-long-line-of-code.patch +Patch0004: 0004-TODO-Rewrite-this-document.patch +Patch0005: 0005-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0006: 0006-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch +Patch0007: 0007-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch +Patch0008: 0008-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch +Patch0009: 0009-RHEL-Fixes-for-libguestfs-winsupport.patch +Patch0010: 0010-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch +Patch0011: 0011-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch +Patch0012: 0012-RHEL-Remove-input-from-Xen.patch +Patch0013: 0013-RHEL-Remove-o-glance.patch +Patch0014: 0014-RHEL-tests-Remove-btrfs-test.patch +Patch0015: 0015-RHEL-Remove-block-driver-option.patch +Patch0016: 0016-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch +Patch0017: 0017-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch %if !0%{?rhel} # libguestfs hasn't been built on i686 for a while since there is no @@ -160,9 +165,9 @@ Requires: nbdkit-ssh-plugin Requires: nbdkit-vddk-plugin %endif Requires: nbdkit-blocksize-filter -Requires: nbdkit-cacheextents-filter Requires: nbdkit-cow-filter >= 1.28.3-1.el9 Requires: nbdkit-multi-conn-filter +Requires: nbdkit-noextents-filter Requires: nbdkit-rate-filter Requires: nbdkit-retry-filter @@ -180,9 +185,9 @@ Recommends: virtio-win Virt-v2v converts a single guest from a foreign hypervisor to run on KVM. It can read Linux and Windows guests running on VMware, Xen, Hyper-V and some other hypervisors, and convert them to KVM managed by -libvirt, OpenStack, oVirt, Red Hat Virtualisation (RHV) or several -other targets. It can modify the guest to make it bootable on KVM and -install virtio drivers so it will run quickly. +libvirt, OpenStack or several other targets. It can modify the guest +to make it bootable on KVM and install virtio drivers so it will run +quickly. %package bash-completion @@ -249,6 +254,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete mkdir -p $RPM_BUILD_ROOT%{_libexecdir} mv $RPM_BUILD_ROOT%{_bindir}/virt-v2v-in-place $RPM_BUILD_ROOT%{_libexecdir}/ rm $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-in-place.1* +# these are also not supported on RHEL +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-input-xen.1* +rm -f $RPM_BUILD_ROOT%{_mandir}/man1/virt-v2v-output-ovirt.1* %endif # Find locale files. @@ -290,6 +298,7 @@ done %{_libexecdir}/virt-v2v-in-place %endif %{_bindir}/virt-v2v-inspector +%{_bindir}/virt-v2v-open %{_mandir}/man1/virt-v2v.1* %{_mandir}/man1/virt-v2v-hacking.1* %{_mandir}/man1/virt-v2v-input-vmware.1* @@ -298,10 +307,11 @@ done %{_mandir}/man1/virt-v2v-in-place.1* %endif %{_mandir}/man1/virt-v2v-inspector.1* +%{_mandir}/man1/virt-v2v-open.1* %{_mandir}/man1/virt-v2v-output-local.1* %{_mandir}/man1/virt-v2v-output-openstack.1* %if !0%{?rhel} -%{_mandir}/man1/virt-v2v-output-rhv.1* +%{_mandir}/man1/virt-v2v-output-ovirt.1* %endif %{_mandir}/man1/virt-v2v-release-notes-1.42.1* %{_mandir}/man1/virt-v2v-release-notes-2.*.1* @@ -324,15 +334,29 @@ done %changelog -* Tue Apr 15 2025 Richard W.M. Jones - 1:2.7.12-1 -- Rebase to virt-v2v 2.7.12 +* Tue May 13 2025 Richard W.M. Jones - 1:2.7.15-1 +- Rebase to virt-v2v 2.7.15 related: RHEL-81735 - Fix virt-v2v -v --install dnf5 error resolves: RHEL-83288 - Print blkhash of converted image in virt-v2v debugging output resolves: RHEL-85514 - Document dracut network-legacy conversion failure - related: RHEL-55732 + resolves: RHEL-55732 +- Print nbdcopy command in debug output + resolves: RHEL-86088 +- Remove usage of nbdkit-cacheextents-filter + resolves: RHEL-88860 +- Print better mountpoint stats in debug output + resolves: RHEL-88862 +- Add virt-v2v -io vddk-noextents=true so we can test noextents + resolves: RHEL-88864 +- Remove several ancient, deprecated options + resolves: RHEL-88867 +- virt-v2v-inspector is failing on snapshots of running VMs + resolves: RHEL-88544 +- Add virt-v2v-open tool + resolves: RHEL-89993 * Tue Feb 11 2025 Richard W.M. Jones - 1:2.7.1-4 - Rebase to virt-v2v 2.7.1