Fix a several issues I found in our downstream patches
I also made some changes upstream which should make it easier to maintain the downstream patches that remove -i and -o modes in future, removing duplication and conflicts. related: RHEL-81735
This commit is contained in:
parent
e5999487d2
commit
d962a06eab
@ -0,0 +1,98 @@
|
||||
From 634a00168f1575e1e76605aac961d1935b977654 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 May 2025 11:24:33 +0100
|
||||
Subject: [PATCH] input, output: List input and output modes one per line
|
||||
|
||||
This just makes it easier to patch some unsupported modes out
|
||||
downstream.
|
||||
---
|
||||
input/select_input.ml | 7 ++++++-
|
||||
input/select_input.mli | 7 ++++++-
|
||||
output/select_output.ml | 13 +++++++++++--
|
||||
output/select_output.mli | 13 +++++++++++--
|
||||
4 files changed, 34 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/input/select_input.ml b/input/select_input.ml
|
||||
index 785fcae6..24cc2183 100644
|
||||
--- a/input/select_input.ml
|
||||
+++ b/input/select_input.ml
|
||||
@@ -19,7 +19,12 @@
|
||||
open Tools_utils
|
||||
open Common_gettext.Gettext
|
||||
|
||||
-type input_mode = Disk | Libvirt | LibvirtXML | OVA | VMX
|
||||
+type input_mode =
|
||||
+ | Disk
|
||||
+ | Libvirt
|
||||
+ | LibvirtXML
|
||||
+ | OVA
|
||||
+ | VMX
|
||||
|
||||
let input_mode_of_string = function
|
||||
| "disk" | "local" -> Disk
|
||||
diff --git a/input/select_input.mli b/input/select_input.mli
|
||||
index 7a59e5a8..c7e95dbe 100644
|
||||
--- a/input/select_input.mli
|
||||
+++ b/input/select_input.mli
|
||||
@@ -16,7 +16,12 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*)
|
||||
|
||||
-type input_mode = Disk | Libvirt | LibvirtXML | OVA | VMX
|
||||
+type input_mode =
|
||||
+ | Disk
|
||||
+ | Libvirt
|
||||
+ | LibvirtXML
|
||||
+ | OVA
|
||||
+ | VMX
|
||||
(** [-i] option on the command line *)
|
||||
|
||||
val input_mode_of_string : string -> input_mode
|
||||
diff --git a/output/select_output.ml b/output/select_output.ml
|
||||
index 299d8463..afe4d996 100644
|
||||
--- a/output/select_output.ml
|
||||
+++ b/output/select_output.ml
|
||||
@@ -19,8 +19,17 @@
|
||||
open Tools_utils
|
||||
open Common_gettext.Gettext
|
||||
|
||||
-type output_mode = Disk | Glance | Kubevirt | Libvirt | Null
|
||||
- | Openstack | OVirt | OVirt_Upload | QEmu | VDSM
|
||||
+type output_mode =
|
||||
+ | Disk
|
||||
+ | Glance
|
||||
+ | Kubevirt
|
||||
+ | Libvirt
|
||||
+ | Null
|
||||
+ | Openstack
|
||||
+ | OVirt
|
||||
+ | OVirt_Upload
|
||||
+ | QEmu
|
||||
+ | VDSM
|
||||
|
||||
let output_mode_of_string = function
|
||||
| "glance" -> Glance
|
||||
diff --git a/output/select_output.mli b/output/select_output.mli
|
||||
index ff9d3d32..8a12b1f4 100644
|
||||
--- a/output/select_output.mli
|
||||
+++ b/output/select_output.mli
|
||||
@@ -16,8 +16,17 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*)
|
||||
|
||||
-type output_mode = Disk | Glance | Kubevirt | Libvirt | Null
|
||||
- | Openstack | OVirt | OVirt_Upload | QEmu | VDSM
|
||||
+type output_mode =
|
||||
+ | Disk
|
||||
+ | Glance
|
||||
+ | Kubevirt
|
||||
+ | Libvirt
|
||||
+ | Null
|
||||
+ | Openstack
|
||||
+ | OVirt
|
||||
+ | OVirt_Upload
|
||||
+ | QEmu
|
||||
+ | VDSM
|
||||
(** [-o] option on the command line *)
|
||||
|
||||
val output_mode_of_string : string -> output_mode
|
||||
108
0006-input-output-Add-functions-for-list-all-input-output.patch
Normal file
108
0006-input-output-Add-functions-for-list-all-input-output.patch
Normal file
@ -0,0 +1,108 @@
|
||||
From d1f1cac3e973da378ad9beff19cbbbdddb12a5f7 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 May 2025 11:30:57 +0100
|
||||
Subject: [PATCH] input, output: Add functions for list all input/output modes
|
||||
|
||||
---
|
||||
input/select_input.ml | 15 +++++++++++++++
|
||||
input/select_input.mli | 6 ++++++
|
||||
output/select_output.ml | 25 +++++++++++++++++++++++++
|
||||
output/select_output.mli | 6 ++++++
|
||||
4 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/input/select_input.ml b/input/select_input.ml
|
||||
index 24cc2183..a5eb1433 100644
|
||||
--- a/input/select_input.ml
|
||||
+++ b/input/select_input.ml
|
||||
@@ -26,6 +26,21 @@ type input_mode =
|
||||
| OVA
|
||||
| VMX
|
||||
|
||||
+let input_modes = [
|
||||
+ Disk;
|
||||
+ Libvirt;
|
||||
+ LibvirtXML;
|
||||
+ OVA;
|
||||
+ VMX;
|
||||
+ ]
|
||||
+
|
||||
+let string_of_input_mode = function
|
||||
+ | Disk -> "disk"
|
||||
+ | Libvirt -> "libvirt"
|
||||
+ | LibvirtXML -> "libvirtxml"
|
||||
+ | OVA -> "ova"
|
||||
+ | VMX -> "vmx"
|
||||
+
|
||||
let input_mode_of_string = function
|
||||
| "disk" | "local" -> Disk
|
||||
| "libvirt" -> Libvirt
|
||||
diff --git a/input/select_input.mli b/input/select_input.mli
|
||||
index c7e95dbe..a60a848c 100644
|
||||
--- a/input/select_input.mli
|
||||
+++ b/input/select_input.mli
|
||||
@@ -24,6 +24,12 @@ type input_mode =
|
||||
| VMX
|
||||
(** [-i] option on the command line *)
|
||||
|
||||
+val input_modes : input_mode list
|
||||
+(** A list of the available input modes. *)
|
||||
+
|
||||
+val string_of_input_mode : input_mode -> string
|
||||
+(** Return the canonical string form of an input mode *)
|
||||
+
|
||||
val input_mode_of_string : string -> input_mode
|
||||
(** Return the input mode corresponding to a string. This is
|
||||
used when parsing the command line. If the input mode
|
||||
diff --git a/output/select_output.ml b/output/select_output.ml
|
||||
index afe4d996..ab4bfe4d 100644
|
||||
--- a/output/select_output.ml
|
||||
+++ b/output/select_output.ml
|
||||
@@ -31,6 +31,31 @@ type output_mode =
|
||||
| QEmu
|
||||
| VDSM
|
||||
|
||||
+let output_modes = [
|
||||
+ Disk;
|
||||
+ Glance;
|
||||
+ Kubevirt;
|
||||
+ Libvirt;
|
||||
+ Null;
|
||||
+ Openstack;
|
||||
+ OVirt;
|
||||
+ OVirt_Upload;
|
||||
+ QEmu;
|
||||
+ VDSM;
|
||||
+ ]
|
||||
+
|
||||
+let string_of_output_mode = function
|
||||
+ | Disk -> "disk"
|
||||
+ | Glance -> "glance"
|
||||
+ | Kubevirt -> "kubevirt"
|
||||
+ | Libvirt -> "libvirt"
|
||||
+ | Null -> "null"
|
||||
+ | Openstack -> "openstack"
|
||||
+ | OVirt -> "ovirt"
|
||||
+ | OVirt_Upload -> "ovirt-upload"
|
||||
+ | QEmu -> "qemu"
|
||||
+ | VDSM -> "vdsm"
|
||||
+
|
||||
let output_mode_of_string = function
|
||||
| "glance" -> Glance
|
||||
| "kubevirt" -> Kubevirt
|
||||
diff --git a/output/select_output.mli b/output/select_output.mli
|
||||
index 8a12b1f4..a509a1db 100644
|
||||
--- a/output/select_output.mli
|
||||
+++ b/output/select_output.mli
|
||||
@@ -29,6 +29,12 @@ type output_mode =
|
||||
| VDSM
|
||||
(** [-o] option on the command line *)
|
||||
|
||||
+val output_modes : output_mode list
|
||||
+(** A list of the available output modes. *)
|
||||
+
|
||||
+val string_of_output_mode : output_mode -> string
|
||||
+(** Return the canonical string form of an output mode *)
|
||||
+
|
||||
val output_mode_of_string : string -> output_mode
|
||||
(** Return the output mode corresponding to a string. This is
|
||||
used when parsing the command line. If the output mode
|
||||
132
0007-v2v-Replace-hard-coded-lists-of-input-and-output-mod.patch
Normal file
132
0007-v2v-Replace-hard-coded-lists-of-input-and-output-mod.patch
Normal file
@ -0,0 +1,132 @@
|
||||
From 4af6b1c43b30e68d6d1b41b6b24db26d6e2fd1d3 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 May 2025 11:33:56 +0100
|
||||
Subject: [PATCH] v2v: Replace hard-coded lists of input and output modes
|
||||
|
||||
In the --help output of each tool there was a hard-coded list of each
|
||||
input and output mode. This makes downstream patching (to remove
|
||||
unsupported modes) harder than it needs to be, so generate these lists
|
||||
instead.
|
||||
---
|
||||
in-place/in_place.ml | 6 +++++-
|
||||
inspector/inspector.ml | 6 +++++-
|
||||
open/open.ml | 6 +++++-
|
||||
v2v/v2v.ml | 12 ++++++++++--
|
||||
4 files changed, 25 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index 01fa9d24..b545360a 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -148,6 +148,10 @@ let rec main () =
|
||||
(* Other options that we handle here. *)
|
||||
let print_source = ref false in
|
||||
|
||||
+ let input_modes =
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ String.concat "|" in
|
||||
let input_mode = ref None in
|
||||
let set_input_mode mode =
|
||||
if !input_mode <> None then
|
||||
@@ -160,7 +164,7 @@ let rec main () =
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
[ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver),
|
||||
s_"Prefer 'virtio-blk' or 'virtio-scsi'";
|
||||
- [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
+ [ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
s_"Libvirt URI";
|
||||
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
|
||||
index 19ff8bc9..ceb2c50a 100644
|
||||
--- a/inspector/inspector.ml
|
||||
+++ b/inspector/inspector.ml
|
||||
@@ -136,6 +136,10 @@ let rec main () =
|
||||
let root_choice = ref default_root_choice in
|
||||
let set_root_choice = Types.set_root_choice root_choice in
|
||||
|
||||
+ let input_modes =
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ String.concat "|" in
|
||||
let input_mode = ref None in
|
||||
let set_input_mode mode =
|
||||
if !input_mode <> None then
|
||||
@@ -146,7 +150,7 @@ let rec main () =
|
||||
let argspec = [
|
||||
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
- [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
+ [ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
s_"Libvirt URI";
|
||||
diff --git a/open/open.ml b/open/open.ml
|
||||
index e34c81a6..65e5bff8 100644
|
||||
--- a/open/open.ml
|
||||
+++ b/open/open.ml
|
||||
@@ -58,6 +58,10 @@ let rec main () =
|
||||
)
|
||||
in
|
||||
|
||||
+ let input_modes =
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ String.concat "|" in
|
||||
let input_mode = ref None in
|
||||
let set_input_mode mode =
|
||||
if !input_mode <> None then
|
||||
@@ -68,7 +72,7 @@ let rec main () =
|
||||
let command_template = ref None in
|
||||
|
||||
let argspec = [
|
||||
- [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
+ [ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
s_"Libvirt URI";
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index cb62d847..58ca79ea 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -166,6 +166,10 @@ let rec main () =
|
||||
(* Other options that we handle here. *)
|
||||
let print_source = ref false in
|
||||
|
||||
+ let input_modes =
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ String.concat "|" in
|
||||
let input_mode = ref None in
|
||||
let set_input_mode mode =
|
||||
if !input_mode <> None then
|
||||
@@ -173,6 +177,10 @@ let rec main () =
|
||||
input_mode := Some (Select_input.input_mode_of_string mode)
|
||||
in
|
||||
|
||||
+ let output_modes =
|
||||
+ Select_output.output_modes |>
|
||||
+ List.map Select_output.string_of_output_mode |>
|
||||
+ String.concat "|" in
|
||||
let output_mode = ref None in
|
||||
let set_output_mode mode =
|
||||
if !output_mode <> None then
|
||||
@@ -195,7 +203,7 @@ let rec main () =
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
[ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver),
|
||||
s_"Prefer 'virtio-blk' or 'virtio-scsi'";
|
||||
- [ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
+ [ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
s_"Libvirt URI";
|
||||
@@ -213,7 +221,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’";
|
||||
- [ S 'o' ], Getopt.String ("glance|kubevirt|libvirt|local|null|openstack|ovirt|ovirt-upload|qemu|vdsm", set_output_mode),
|
||||
+ [ S 'o' ], Getopt.String (output_modes, set_output_mode),
|
||||
s_"Set output mode (default: libvirt)";
|
||||
[ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc),
|
||||
s_"Set output allocation mode";
|
||||
104
0008-v2v-Generate-machine-readable-list-of-input-and-outp.patch
Normal file
104
0008-v2v-Generate-machine-readable-list-of-input-and-outp.patch
Normal file
@ -0,0 +1,104 @@
|
||||
From db4066f6678028fa599bced49ac07ebafe6b7202 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 May 2025 11:47:05 +0100
|
||||
Subject: [PATCH] v2v: Generate --machine-readable list of input and output
|
||||
modes
|
||||
|
||||
---
|
||||
in-place/in_place.ml | 8 +++-----
|
||||
inspector/inspector.ml | 8 +++-----
|
||||
open/open.ml | 8 +++-----
|
||||
v2v/v2v.ml | 23 ++++++-----------------
|
||||
4 files changed, 15 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index b545360a..604a662d 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -259,11 +259,9 @@ read the man page virt-v2v-in-place(1).
|
||||
pr "mac-ip-option\n";
|
||||
pr "customize-ops\n";
|
||||
pr "output-xml-option\n";
|
||||
- pr "input:disk\n";
|
||||
- pr "input:libvirt\n";
|
||||
- pr "input:libvirtxml\n";
|
||||
- pr "input:ova\n";
|
||||
- pr "input:vmx\n";
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ List.iter (pr "input:%s\n");
|
||||
pr "convert:linux\n";
|
||||
pr "convert:windows\n";
|
||||
List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours;
|
||||
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
|
||||
index ceb2c50a..50b8f711 100644
|
||||
--- a/inspector/inspector.ml
|
||||
+++ b/inspector/inspector.ml
|
||||
@@ -238,11 +238,9 @@ read the man page virt-v2v-inspector(1).
|
||||
pr "mac-option\n";
|
||||
pr "mac-ip-option\n";
|
||||
pr "customize-ops\n";
|
||||
- pr "input:disk\n";
|
||||
- pr "input:libvirt\n";
|
||||
- pr "input:libvirtxml\n";
|
||||
- pr "input:ova\n";
|
||||
- pr "input:vmx\n";
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ List.iter (pr "input:%s\n");
|
||||
pr "convert:linux\n";
|
||||
pr "convert:windows\n";
|
||||
List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours;
|
||||
diff --git a/open/open.ml b/open/open.ml
|
||||
index 65e5bff8..8ba41e20 100644
|
||||
--- a/open/open.ml
|
||||
+++ b/open/open.ml
|
||||
@@ -145,11 +145,9 @@ read the man page virt-v2v-open(1).
|
||||
pr "libguestfs-rewrite\n";
|
||||
pr "colours-option\n";
|
||||
pr "io\n";
|
||||
- pr "input:disk\n";
|
||||
- pr "input:libvirt\n";
|
||||
- pr "input:libvirtxml\n";
|
||||
- pr "input:ova\n";
|
||||
- pr "input:vmx\n";
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ List.iter (pr "input:%s\n");
|
||||
exit 0
|
||||
| _, _ -> ()
|
||||
);
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 58ca79ea..d32993d4 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -345,23 +345,12 @@ read the man page virt-v2v(1).
|
||||
pr "mac-ip-option\n";
|
||||
pr "parallel-option\n";
|
||||
pr "customize-ops\n";
|
||||
- pr "input:disk\n";
|
||||
- pr "input:libvirt\n";
|
||||
- pr "input:libvirtxml\n";
|
||||
- pr "input:ova\n";
|
||||
- pr "input:vmx\n";
|
||||
- pr "output:glance\n";
|
||||
- pr "output:kubevirt\n";
|
||||
- pr "output:libvirt\n";
|
||||
- pr "output:local\n";
|
||||
- pr "output:null\n";
|
||||
- pr "output:openstack\n";
|
||||
- pr "output:ovirt\n";
|
||||
- pr "output:ovirt-upload\n";
|
||||
- pr "output:qemu\n";
|
||||
- pr "output:rhv\n";
|
||||
- pr "output:rhv-upload\n";
|
||||
- pr "output:vdsm\n";
|
||||
+ Select_input.input_modes |>
|
||||
+ List.map Select_input.string_of_input_mode |>
|
||||
+ List.iter (pr "input:%s\n");
|
||||
+ Select_output.output_modes |>
|
||||
+ List.map Select_output.string_of_output_mode |>
|
||||
+ List.iter (pr "output:%s\n");
|
||||
pr "convert:linux\n";
|
||||
pr "convert:windows\n";
|
||||
List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours;
|
||||
@ -1,43 +0,0 @@
|
||||
From f86881542194d3abb9337cde07b66ae87d14ac6d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 30 Aug 2015 03:21:57 -0400
|
||||
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport
|
||||
|
||||
In tests we cannot use guestfish for arbitrary Windows edits.
|
||||
In virt-v2v helpers we must set the program name to virt-v2v.
|
||||
|
||||
For RHEL 9.3 and above, see this comment:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1
|
||||
---
|
||||
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" <<EOF
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ inspect-os
|
||||
+ mount /dev/sda2 /
|
||||
+EOF
|
||||
+
|
||||
+cat >> "$expected" <<EOF
|
||||
+/dev/sda2
|
||||
+EOF
|
||||
+
|
||||
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
||||
mktest "is-dir \"$firstboot_dir\"" true
|
||||
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
||||
@@ -80,5 +91,5 @@ mktest "ls \"$virtio_dir\"" "$(cat test-phony-$guestname-ls.txt)"
|
||||
osinfo_name="${guestname%-32}"
|
||||
mktest "inspect-get-osinfo /dev/sda2" "$osinfo_name"
|
||||
|
||||
-guestfish --ro -a "$d/$guestname-sda" -i < "$script" > "$response"
|
||||
+guestfish --ro -a "$d/$guestname-sda" < "$script" > "$response"
|
||||
diff -u "$expected" "$response"
|
||||
@ -0,0 +1,38 @@
|
||||
From fafdec5b58e607a6b6d5a64440da50fc07d1ef11 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 14 May 2025 11:58:22 +0100
|
||||
Subject: [PATCH] docs/virt-v2v-output-local.pod: --qemu-boot has been removed
|
||||
|
||||
Fixes: commit 471607b01543debfb2f44d9a8aa0dc7a592f5c06
|
||||
---
|
||||
docs/virt-v2v-output-local.pod | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
|
||||
index 5a342434..49f00754 100644
|
||||
--- a/docs/virt-v2v-output-local.pod
|
||||
+++ b/docs/virt-v2v-output-local.pod
|
||||
@@ -9,7 +9,7 @@ or libvirt
|
||||
|
||||
virt-v2v [-i* options] -o local -os DIRECTORY
|
||||
|
||||
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
|
||||
+ virt-v2v [-i* options] -o qemu -os DIRECTORY [-oo qemu-boot]
|
||||
|
||||
virt-v2v [-i* options] -o null
|
||||
|
||||
@@ -47,12 +47,12 @@ where C<NAME> is the guest name.
|
||||
|
||||
=item B<-o qemu -os> C<DIRECTORY>
|
||||
|
||||
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
|
||||
+=item B<-o qemu -os> C<DIRECTORY> B<-oo qemu-boot>
|
||||
|
||||
This converts the guest to files in C<DIRECTORY>. Unlike I<-o local>
|
||||
above, a shell script is created which contains the raw qemu command
|
||||
you would need to boot the guest. However the shell script is not
|
||||
-run, I<unless> you also add the I<--qemu-boot> option.
|
||||
+run, I<unless> you also add the I<-oo qemu-boot> option.
|
||||
|
||||
=item B<-o null>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From d974b64916edb1b8f49237572c2cf6daae026ecf Mon Sep 17 00:00:00 2001
|
||||
From 54628a8e1e029986d8a94b2bc8e85f4a3d8df0c9 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 30 Aug 2015 03:21:57 -0400
|
||||
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.
|
||||
@ -9,13 +9,14 @@ 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 +++++++-
|
||||
6 files changed, 28 insertions(+), 4 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 +++++++-
|
||||
tests/test-windows-phony.sh | 13 ++++++++++++-
|
||||
7 files changed, 40 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/convert/convert.ml b/convert/convert.ml
|
||||
index 66d1361f..15845a20 100644
|
||||
@ -134,3 +135,32 @@ 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" <<EOF
|
||||
+ set-program virt-testing
|
||||
+ run
|
||||
+ inspect-os
|
||||
+ mount /dev/sda2 /
|
||||
+EOF
|
||||
+
|
||||
+cat >> "$expected" <<EOF
|
||||
+/dev/sda2
|
||||
+EOF
|
||||
+
|
||||
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
||||
mktest "is-dir \"$firstboot_dir\"" true
|
||||
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
||||
@@ -80,5 +91,5 @@ mktest "ls \"$virtio_dir\"" "$(cat test-phony-$guestname-ls.txt)"
|
||||
osinfo_name="${guestname%-32}"
|
||||
mktest "inspect-get-osinfo /dev/sda2" "$osinfo_name"
|
||||
|
||||
-guestfish --ro -a "$d/$guestname-sda" -i < "$script" > "$response"
|
||||
+guestfish --ro -a "$d/$guestname-sda" < "$script" > "$response"
|
||||
diff -u "$expected" "$response"
|
||||
@ -1,4 +1,4 @@
|
||||
From 3f4ccc36b8f87b5dad4b63572c3da77b6156bcc5 Mon Sep 17 00:00:00 2001
|
||||
From da65e457bce25d851c7ed043b30ba9e5a52c09f7 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Sun, 28 Sep 2014 19:14:43 +0100
|
||||
Subject: [PATCH] RHEL: v2v: Select correct qemu binary for -o qemu mode
|
||||
@ -1,4 +1,4 @@
|
||||
From 356fce60d60427361053bf4e2e4f2db9de891ebd Mon Sep 17 00:00:00 2001
|
||||
From 63fe3fb057c68774a5824e4206a6885e2cbd83da Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 30 Sep 2014 10:50:27 +0100
|
||||
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
|
||||
@ -16,14 +16,14 @@ qemu script.
|
||||
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
|
||||
index 49f00754..bdf12c5d 100644
|
||||
--- a/docs/virt-v2v-output-local.pod
|
||||
+++ b/docs/virt-v2v-output-local.pod
|
||||
@@ -9,7 +9,7 @@ or libvirt
|
||||
|
||||
virt-v2v [-i* options] -o local -os DIRECTORY
|
||||
|
||||
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
|
||||
- virt-v2v [-i* options] -o qemu -os DIRECTORY [-oo qemu-boot]
|
||||
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
|
||||
|
||||
virt-v2v [-i* options] -o null
|
||||
@ -32,12 +32,12 @@ index 5a342434..bdf12c5d 100644
|
||||
|
||||
=item B<-o qemu -os> C<DIRECTORY>
|
||||
|
||||
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
|
||||
-=item B<-o qemu -os> C<DIRECTORY> B<-oo qemu-boot>
|
||||
-
|
||||
This converts the guest to files in C<DIRECTORY>. Unlike I<-o local>
|
||||
above, a shell script is created which contains the raw qemu command
|
||||
you would need to boot the guest. However the shell script is not
|
||||
-run, I<unless> you also add the I<--qemu-boot> option.
|
||||
-run, I<unless> you also add the I<-oo qemu-boot> option.
|
||||
+run.
|
||||
|
||||
=item B<-o null>
|
||||
@ -1,4 +1,4 @@
|
||||
From 92faf39ff792662037068ae01231bc102e222962 Mon Sep 17 00:00:00 2001
|
||||
From f0d4697d984d00007e247555ab2e9b2cc25b2c49 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 24 Apr 2015 09:45:41 -0400
|
||||
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
|
||||
@ -1,4 +1,4 @@
|
||||
From 03c59620c41498c9d5e00b30850c33f0d1b635b2 Mon Sep 17 00:00:00 2001
|
||||
From 027b35a41dd590e2f59387bcc6268c562454242f Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 2 Mar 2017 14:21:37 +0100
|
||||
Subject: [PATCH] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)
|
||||
@ -1,4 +1,4 @@
|
||||
From 5b648f5fb38d84a2308e128a197c553c9a4e97fb Mon Sep 17 00:00:00 2001
|
||||
From 91757bf2736bc5acff90bb7bd006a7c5932a939a Mon Sep 17 00:00:00 2001
|
||||
From: Pino Toscano <ptoscano@redhat.com>
|
||||
Date: Tue, 26 Mar 2019 09:42:25 +0100
|
||||
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests
|
||||
@ -1,4 +1,4 @@
|
||||
From c20502fd651748ca1183fcbf696b8b846c390589 Mon Sep 17 00:00:00 2001
|
||||
From 46865d84db7c610ea27b39ce007867e96552375a Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2024 09:35:54 +0100
|
||||
Subject: [PATCH] RHEL: Remove input from Xen
|
||||
@ -515,10 +515,10 @@ index 339309b8..00000000
|
||||
-
|
||||
-module XenSSH : Input.INPUT
|
||||
diff --git a/input/select_input.ml b/input/select_input.ml
|
||||
index 785fcae6..e1c2002f 100644
|
||||
index a5eb1433..bbf0180f 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 =
|
||||
@@ -90,10 +90,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)
|
||||
|
||||
@ -530,10 +530,10 @@ index 785fcae6..e1c2002f 100644
|
||||
* 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 cb62d847..b5e479bd 100644
|
||||
index d32993d4..fe9ed756 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -327,7 +327,6 @@ read the man page virt-v2v(1).
|
||||
@@ -335,7 +335,6 @@ read the man page virt-v2v(1).
|
||||
pr "virt-v2v-2.0\n";
|
||||
pr "libguestfs-rewrite\n";
|
||||
pr "vcenter-https\n";
|
||||
@ -1,4 +1,4 @@
|
||||
From 2bd28ced53017ac11ac8350c0dba78edc8ee4577 Mon Sep 17 00:00:00 2001
|
||||
From 5db0c8d26186129e786aa34a1023264e373d049b Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 30 Jun 2021 11:15:52 +0100
|
||||
Subject: [PATCH] RHEL: Remove -o glance
|
||||
@ -8,11 +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 +-
|
||||
output/select_output.ml | 5 ---
|
||||
output/select_output.mli | 1 -
|
||||
tests/test-o-glance.sh | 3 ++
|
||||
v2v/v2v.ml | 5 +--
|
||||
7 files changed, 9 insertions(+), 81 deletions(-)
|
||||
v2v/v2v.ml | 2 --
|
||||
7 files changed, 6 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod
|
||||
index 9bef76ea..04595816 100644
|
||||
@ -155,23 +155,42 @@ 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
|
||||
index ab4bfe4d..b1f7d0ab 100644
|
||||
--- a/output/select_output.ml
|
||||
+++ b/output/select_output.ml
|
||||
@@ -19,11 +19,10 @@
|
||||
open Tools_utils
|
||||
open Common_gettext.Gettext
|
||||
@@ -21,7 +21,6 @@ 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
|
||||
type output_mode =
|
||||
| Disk
|
||||
- | Glance
|
||||
| Kubevirt
|
||||
| Libvirt
|
||||
| Null
|
||||
@@ -33,7 +32,6 @@ type output_mode =
|
||||
|
||||
let output_modes = [
|
||||
Disk;
|
||||
- Glance;
|
||||
Kubevirt;
|
||||
Libvirt;
|
||||
Null;
|
||||
@@ -46,7 +44,6 @@ let output_modes = [
|
||||
|
||||
let string_of_output_mode = function
|
||||
| Disk -> "disk"
|
||||
- | Glance -> "glance"
|
||||
| Kubevirt -> "kubevirt"
|
||||
| Libvirt -> "libvirt"
|
||||
| Null -> "null"
|
||||
@@ -57,7 +54,6 @@ let string_of_output_mode = function
|
||||
| VDSM -> "vdsm"
|
||||
|
||||
let output_mode_of_string = function
|
||||
- | "glance" -> Glance
|
||||
| "kubevirt" -> Kubevirt
|
||||
| "libvirt" -> Libvirt
|
||||
| "disk" | "local" -> Disk
|
||||
@@ -41,7 +40,6 @@ let select_output = function
|
||||
@@ -75,7 +71,6 @@ let select_output = function
|
||||
| Some Disk -> (module Output_disk.Disk)
|
||||
| Some Null -> (module Output_null.Null)
|
||||
| Some QEmu -> (module Output_qemu.QEMU)
|
||||
@ -180,18 +199,17 @@ index 299d8463..eaee5bb5 100644
|
||||
| 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
|
||||
index a509a1db..093c9b9a 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 *)
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
type output_mode =
|
||||
| Disk
|
||||
- | Glance
|
||||
| Kubevirt
|
||||
| Libvirt
|
||||
| Null
|
||||
diff --git a/tests/test-o-glance.sh b/tests/test-o-glance.sh
|
||||
index 9e32d2bf..632579ee 100755
|
||||
--- a/tests/test-o-glance.sh
|
||||
@ -207,19 +225,10 @@ index 9e32d2bf..632579ee 100755
|
||||
set -e
|
||||
set -x
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index b5e479bd..284af43c 100644
|
||||
index fe9ed756..11ac7a2e 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -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’";
|
||||
- [ 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";
|
||||
@@ -259,8 +259,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
@@ -267,8 +267,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
|
||||
virt-v2v -i disk disk.img -o local -os /var/tmp
|
||||
|
||||
@ -228,11 +237,3 @@ index b5e479bd..284af43c 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.
|
||||
|
||||
@@ -341,7 +339,6 @@ read the man page virt-v2v(1).
|
||||
pr "input:libvirtxml\n";
|
||||
pr "input:ova\n";
|
||||
pr "input:vmx\n";
|
||||
- pr "output:glance\n";
|
||||
pr "output:kubevirt\n";
|
||||
pr "output:libvirt\n";
|
||||
pr "output:local\n";
|
||||
@ -1,4 +1,4 @@
|
||||
From 1ffbc2996a92e7baa01f0bc9960f0dfff311d5d6 Mon Sep 17 00:00:00 2001
|
||||
From 32a2c8e2750487459e7c8a8122f7ffb036e7d4b7 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 5 Jul 2022 11:58:09 +0100
|
||||
Subject: [PATCH] RHEL: tests: Remove btrfs test
|
||||
@ -1,4 +1,4 @@
|
||||
From 8258ebaa6ee4106f4fcb447aabc84838101c44a1 Mon Sep 17 00:00:00 2001
|
||||
From e1df6ef3dd28aaaa5e71e9df95933f828a0b72fa Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 28 Apr 2023 12:28:19 +0100
|
||||
Subject: [PATCH] RHEL: Remove --block-driver option
|
||||
@ -58,7 +58,7 @@ index c32e6db6..2afd6182 100644
|
||||
|
||||
=item B<--colours>
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index 01fa9d24..dc19dca7 100644
|
||||
index 604a662d..a91ee39d 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -49,7 +49,6 @@ let rec main () =
|
||||
@ -69,16 +69,16 @@ index 01fa9d24..dc19dca7 100644
|
||||
let input_conn = ref None in
|
||||
let input_format = ref None in
|
||||
let input_password = ref None in
|
||||
@@ -158,8 +157,6 @@ let rec main () =
|
||||
@@ -162,8 +161,6 @@ let rec main () =
|
||||
let argspec = [
|
||||
[ S 'b'; L"bridge" ], Getopt.String ("in:out", add_bridge),
|
||||
s_"Map bridge ‘in’ to ‘out’";
|
||||
- [ L"block-driver" ], Getopt.String ("driver", set_string_option_once "--block-driver" block_driver),
|
||||
- s_"Prefer 'virtio-blk' or 'virtio-scsi'";
|
||||
[ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
[ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
@@ -226,12 +223,6 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -230,12 +227,6 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
@ -91,7 +91,7 @@ index 01fa9d24..dc19dca7 100644
|
||||
let customize_ops = get_customize_ops () in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
@@ -296,7 +287,7 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -298,7 +289,7 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
||||
@ -113,7 +113,7 @@ index 51d84bc9..f64316fd 100644
|
||||
test-checksum-bad.sh \
|
||||
test-checksum-good-qcow2.sh \
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 284af43c..673ce688 100644
|
||||
index 11ac7a2e..46df3e26 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -48,7 +48,6 @@ let rec main () =
|
||||
@ -124,16 +124,16 @@ index 284af43c..673ce688 100644
|
||||
let input_conn = ref None in
|
||||
let input_format = ref None in
|
||||
let input_password = ref None in
|
||||
@@ -193,8 +192,6 @@ let rec main () =
|
||||
@@ -201,8 +200,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'";
|
||||
[ S 'i' ], Getopt.String ("disk|libvirt|libvirtxml|ova|vmx", set_input_mode),
|
||||
[ S 'i' ], Getopt.String (input_modes, set_input_mode),
|
||||
s_"Set input mode (default: libvirt)";
|
||||
[ M"ic" ], Getopt.String ("uri", set_string_option_once "-ic" input_conn),
|
||||
@@ -287,12 +284,6 @@ read the man page virt-v2v(1).
|
||||
@@ -295,12 +292,6 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
@ -146,7 +146,7 @@ index 284af43c..673ce688 100644
|
||||
let customize_ops = get_customize_ops () in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
@@ -415,7 +406,7 @@ read the man page virt-v2v(1).
|
||||
@@ -413,7 +404,7 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
||||
@ -1,4 +1,4 @@
|
||||
From b458c7097acb171bef9a947daeb26423c868fe01 Mon Sep 17 00:00:00 2001
|
||||
From cf32e1adc123565a4ed816aece1c3bac378e61af Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 8 Jul 2024 09:56:54 +0100
|
||||
Subject: [PATCH] RHEL: Remove -o ovirt, -o ovirt-upload and -o vdsm modes
|
||||
@ -29,9 +29,9 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712
|
||||
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 -
|
||||
output/select_output.ml | 16 -
|
||||
output/select_output.mli | 3 -
|
||||
tests/Makefile.am | 15 -
|
||||
tests/test-o-ovirt-upload-module/imageio.py | 71 ---
|
||||
.../ovirtsdk4/__init__.py | 150 -----
|
||||
.../ovirtsdk4/types.py | 184 ------
|
||||
@ -42,8 +42,8 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712
|
||||
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 | 10 +-
|
||||
38 files changed, 7 insertions(+), 4183 deletions(-)
|
||||
v2v/v2v.ml | 5 -
|
||||
38 files changed, 4 insertions(+), 4199 deletions(-)
|
||||
delete mode 100644 docs/virt-v2v-output-ovirt.pod
|
||||
delete mode 100644 output/output_ovirt.ml
|
||||
delete mode 100644 output/output_ovirt.mli
|
||||
@ -3545,19 +3545,43 @@ index 6240046e..00000000
|
||||
-
|
||||
-# Otherwise everything is OK, exit with no error.
|
||||
diff --git a/output/select_output.ml b/output/select_output.ml
|
||||
index eaee5bb5..20e7c661 100644
|
||||
index b1f7d0ab..7c01b50b 100644
|
||||
--- a/output/select_output.ml
|
||||
+++ b/output/select_output.ml
|
||||
@@ -20,7 +20,7 @@ open Tools_utils
|
||||
open Common_gettext.Gettext
|
||||
@@ -25,10 +25,7 @@ type output_mode =
|
||||
| Libvirt
|
||||
| Null
|
||||
| Openstack
|
||||
- | OVirt
|
||||
- | OVirt_Upload
|
||||
| QEmu
|
||||
- | VDSM
|
||||
|
||||
type output_mode = Disk | Kubevirt | Libvirt | Null
|
||||
- | Openstack | OVirt | OVirt_Upload | QEmu | VDSM
|
||||
+ | Openstack | QEmu
|
||||
let output_modes = [
|
||||
Disk;
|
||||
@@ -36,10 +33,7 @@ let output_modes = [
|
||||
Libvirt;
|
||||
Null;
|
||||
Openstack;
|
||||
- OVirt;
|
||||
- OVirt_Upload;
|
||||
QEmu;
|
||||
- VDSM;
|
||||
]
|
||||
|
||||
let string_of_output_mode = function
|
||||
@@ -48,10 +42,7 @@ let string_of_output_mode = function
|
||||
| Libvirt -> "libvirt"
|
||||
| Null -> "null"
|
||||
| Openstack -> "openstack"
|
||||
- | OVirt -> "ovirt"
|
||||
- | OVirt_Upload -> "ovirt-upload"
|
||||
| QEmu -> "qemu"
|
||||
- | VDSM -> "vdsm"
|
||||
|
||||
let output_mode_of_string = function
|
||||
| "kubevirt" -> Kubevirt
|
||||
@@ -28,11 +28,7 @@ let output_mode_of_string = function
|
||||
@@ -59,11 +50,7 @@ let output_mode_of_string = function
|
||||
| "disk" | "local" -> Disk
|
||||
| "null" -> Null
|
||||
| "openstack" | "osp" | "rhosp" -> Openstack
|
||||
@ -3569,7 +3593,7 @@ index eaee5bb5..20e7c661 100644
|
||||
| s -> error (f_"unknown -o option: %s") s
|
||||
|
||||
let select_output = function
|
||||
@@ -42,6 +38,3 @@ let select_output = function
|
||||
@@ -73,6 +60,3 @@ let select_output = function
|
||||
| Some QEmu -> (module Output_qemu.QEMU)
|
||||
| Some Kubevirt -> (module Output_kubevirt.Kubevirt)
|
||||
| Some Openstack -> (module Output_openstack.Openstack)
|
||||
@ -3577,34 +3601,48 @@ index eaee5bb5..20e7c661 100644
|
||||
- | 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
|
||||
index 093c9b9a..1f8259e3 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
|
||||
@@ -22,10 +22,7 @@ type output_mode =
|
||||
| Libvirt
|
||||
| Null
|
||||
| Openstack
|
||||
- | OVirt
|
||||
- | OVirt_Upload
|
||||
| QEmu
|
||||
- | VDSM
|
||||
(** [-o] option on the command line *)
|
||||
|
||||
val output_mode_of_string : string -> output_mode
|
||||
val output_modes : output_mode list
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index f64316fd..0b43f26b 100644
|
||||
index f64316fd..58dc74b8 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -102,8 +102,6 @@ TESTS = \
|
||||
test-o-ovirt-upload.sh \
|
||||
test-o-ovirt.sh \
|
||||
@@ -98,12 +98,7 @@ TESTS = \
|
||||
test-o-local-qcow2-compressed.sh \
|
||||
test-o-null.sh \
|
||||
test-o-openstack.sh \
|
||||
- test-o-ovirt-upload-oo-query.sh \
|
||||
- test-o-ovirt-upload.sh \
|
||||
- test-o-ovirt.sh \
|
||||
test-o-qemu.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 \
|
||||
@@ -300,9 +298,6 @@ EXTRA_DIST += \
|
||||
test-o-ovirt.ovf.expected \
|
||||
test-o-ovirt.sh \
|
||||
@@ -292,17 +287,7 @@ EXTRA_DIST += \
|
||||
test-o-local-qcow2-compressed.sh \
|
||||
test-o-null.sh \
|
||||
test-o-openstack.sh \
|
||||
- test-o-ovirt-upload-module/imageio.py \
|
||||
- test-o-ovirt-upload-module/ovirtsdk4/__init__.py \
|
||||
- test-o-ovirt-upload-module/ovirtsdk4/types.py \
|
||||
- test-o-ovirt-upload-oo-query.sh \
|
||||
- test-o-ovirt-upload.sh \
|
||||
- test-o-ovirt.ovf.expected \
|
||||
- test-o-ovirt.sh \
|
||||
test-o-qemu.sh \
|
||||
- test-o-vdsm-oo-query.sh \
|
||||
- test-o-vdsm-options.ovf.expected \
|
||||
@ -4643,19 +4681,10 @@ index a8c5b208..00000000
|
||||
-diff -u "$srcdir/test-o-vdsm-options.ovf.expected" \
|
||||
- "$OVF"
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 673ce688..2004ed62 100644
|
||||
index 46df3e26..f7db0a97 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -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’";
|
||||
- [ 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";
|
||||
@@ -249,9 +249,6 @@ let rec main () =
|
||||
@@ -257,9 +257,6 @@ let rec main () =
|
||||
|
||||
virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest
|
||||
|
||||
@ -4665,7 +4694,7 @@ index 673ce688..2004ed62 100644
|
||||
virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
|
||||
virt-v2v -i disk disk.img -o local -os /var/tmp
|
||||
@@ -318,7 +315,6 @@ read the man page virt-v2v(1).
|
||||
@@ -326,7 +323,6 @@ read the man page virt-v2v(1).
|
||||
pr "vcenter-https\n";
|
||||
pr "vddk\n";
|
||||
pr "colours-option\n";
|
||||
@ -4673,17 +4702,7 @@ index 673ce688..2004ed62 100644
|
||||
pr "io/oo\n";
|
||||
pr "mac-option\n";
|
||||
pr "bandwidth-option\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";
|
||||
- pr "output:vdsm\n";
|
||||
pr "convert:linux\n";
|
||||
pr "convert:windows\n";
|
||||
List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours;
|
||||
@@ -401,7 +394,6 @@ read the man page virt-v2v(1).
|
||||
@@ -399,7 +395,6 @@ read the man page virt-v2v(1).
|
||||
*)
|
||||
let remove_serial_console =
|
||||
match output_mode with
|
||||
@ -1,4 +1,4 @@
|
||||
From d529bc6e02c0de394c6c90c34bc25659c7d97824 Mon Sep 17 00:00:00 2001
|
||||
From 6c3db0e30ff03e06f83ffd5d90d5d34525e4f5cd Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 9 Jul 2024 11:30:09 +0100
|
||||
Subject: [PATCH] RHEL: Add warning about virt-v2v-in-place not being supported
|
||||
@ -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 dc19dca7..530ee9af 100644
|
||||
index a91ee39d..dba0772c 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -207,6 +207,9 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -211,6 +211,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;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
Name: virt-v2v
|
||||
Epoch: 1
|
||||
Version: 2.7.15
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Convert a virtual machine to run on KVM
|
||||
|
||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||
@ -31,19 +31,23 @@ 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
|
||||
Patch0005: 0005-input-output-List-input-and-output-modes-one-per-lin.patch
|
||||
Patch0006: 0006-input-output-Add-functions-for-list-all-input-output.patch
|
||||
Patch0007: 0007-v2v-Replace-hard-coded-lists-of-input-and-output-mod.patch
|
||||
Patch0008: 0008-v2v-Generate-machine-readable-list-of-input-and-outp.patch
|
||||
Patch0009: 0009-docs-virt-v2v-output-local.pod-qemu-boot-has-been-re.patch
|
||||
Patch0010: 0010-RHEL-Fixes-for-libguestfs-winsupport.patch
|
||||
Patch0011: 0011-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
|
||||
Patch0012: 0012-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
|
||||
Patch0013: 0013-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
|
||||
Patch0014: 0014-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
|
||||
Patch0015: 0015-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
|
||||
Patch0016: 0016-RHEL-Remove-input-from-Xen.patch
|
||||
Patch0017: 0017-RHEL-Remove-o-glance.patch
|
||||
Patch0018: 0018-RHEL-tests-Remove-btrfs-test.patch
|
||||
Patch0019: 0019-RHEL-Remove-block-driver-option.patch
|
||||
Patch0020: 0020-RHEL-Remove-o-ovirt-o-ovirt-upload-and-o-vdsm-modes.patch
|
||||
Patch0021: 0021-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
|
||||
@ -334,7 +338,7 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue May 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.15-1
|
||||
* Wed May 14 2025 Richard W.M. Jones <rjones@redhat.com> - 1:2.7.15-2
|
||||
- Rebase to virt-v2v 2.7.15
|
||||
related: RHEL-81735
|
||||
- Fix virt-v2v -v --install dnf5 error
|
||||
|
||||
Loading…
Reference in New Issue
Block a user