Rebase to virt-v2v 2.6.0
resolves: RHEL-56814
This commit is contained in:
parent
3c59f5fad1
commit
7e8507c992
@ -1,4 +1,4 @@
|
||||
From 73faaa69c32f09436ea8358c507102f2a0a0868e Mon Sep 17 00:00:00 2001
|
||||
From 2a509aaffa688b65fef784037d5828c7ede0bd80 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,28 +0,0 @@
|
||||
From 7800049c5612e6ffb30be7f8862d147d82976ae8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Wed, 31 Jul 2024 10:09:50 +0100
|
||||
Subject: [PATCH] docs: Note that --mac len field is now optional
|
||||
|
||||
Reported-by: Ming Xie
|
||||
Updates: commit 159fda411d2f75b087106e7293d273ae142c9fbe
|
||||
---
|
||||
docs/virt-v2v.pod | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index b53face6..dfe92d77 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -394,9 +394,9 @@ Force a particular interface (controlled by its MAC address) to have a
|
||||
static IP address after boot.
|
||||
|
||||
The fields in the parameter are: C<ipaddr> is the IP address. C<gw>
|
||||
-is the optional gateway IP address. C<len> is the subnet mask length
|
||||
-(an integer). The final parameters are zero or more nameserver IP
|
||||
-addresses.
|
||||
+is the optional gateway IP address. C<len> is the optional subnet
|
||||
+mask length (an integer). The final parameters are zero or more
|
||||
+nameserver IP addresses.
|
||||
|
||||
This option can be supplied zero or more times.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b3860f7f91c5c239d06de4a260b8c312f9b49387 Mon Sep 17 00:00:00 2001
|
||||
From b73da142eebe536682ca3cd915fdecf3baff3167 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
|
||||
@ -44,10 +44,10 @@ index d2a1c270..0be37f5e 100644
|
||||
=item B<-o null>
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 346be606..81a4b45a 100644
|
||||
index 5345a6c9..a1e8fb30 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -146,11 +146,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
|
||||
@@ -157,11 +157,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
|
||||
image(s) you do not need to specify the name of the disk image on the
|
||||
command line.
|
||||
|
||||
@ -59,7 +59,7 @@ index 346be606..81a4b45a 100644
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
@@ -522,9 +517,6 @@ This is similar to I<-o local>, except that a shell script is written
|
||||
@@ -533,9 +528,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>.
|
||||
|
||||
@ -69,7 +69,7 @@ index 346be606..81a4b45a 100644
|
||||
=item B<-o> B<rhev>
|
||||
|
||||
This is the same as I<-o rhv>.
|
||||
@@ -607,11 +599,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
|
||||
@@ -618,11 +610,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
|
||||
which is saved on each Cinder volume in the C<virt_v2v_guest_id>
|
||||
volume property.
|
||||
|
||||
@ -81,7 +81,7 @@ index 346be606..81a4b45a 100644
|
||||
=item B<-oo verify-server-certificate>
|
||||
|
||||
=item B<-oo verify-server-certificate=>C<true|false>
|
||||
@@ -782,10 +769,6 @@ Print information about the source guest and stop. This option is
|
||||
@@ -793,10 +780,6 @@ Print information about the source guest and stop. This option is
|
||||
useful when you are setting up network and bridge maps.
|
||||
See L</Networks and bridges>.
|
||||
|
||||
@ -107,7 +107,7 @@ index 07dae8c2..b6f24565 100644
|
||||
let output_storage =
|
||||
match options.output_storage with
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 48c8cfba..fca5f6e9 100644
|
||||
index 194e6233..6baa111f 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -277,8 +277,6 @@ let rec main () =
|
@ -1,207 +0,0 @@
|
||||
From c57ec4fd5d4942d2320aec4a6b01977dabb87f83 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 1 Aug 2024 09:01:47 +0100
|
||||
Subject: [PATCH] convert: More robust qemu-ga installation, change paths
|
||||
|
||||
Add a commit from the common submodule to attempt to make qemu-ga
|
||||
installation more robust on Windows.
|
||||
|
||||
Rename network configuration Powershell script from "v2vnetcf" to
|
||||
"network-configuration". I also dropped the ".ps1" extension as the
|
||||
modified Firstboot.add_firstboot_powershell function now adds this.
|
||||
|
||||
Update the common submodule to get these changes:
|
||||
|
||||
Richard W.M. Jones (3):
|
||||
mlcustomize: Use Start-Process -Wait to run qemu-ga installer
|
||||
mlcustomize: Add Firstboot.firstboot_dir function
|
||||
mlcustomize: Place powershell scripts into <firstboot_dir>\Temp
|
||||
---
|
||||
common | 2 +-
|
||||
convert/convert_windows.ml | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
Submodule common ae639ba3..d489469f:
|
||||
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
|
||||
index 4b9b910b..3bbba714 100644
|
||||
--- a/common/mlcustomize/firstboot.ml
|
||||
+++ b/common/mlcustomize/firstboot.ml
|
||||
@@ -239,7 +239,22 @@ WantedBy=%s
|
||||
end
|
||||
|
||||
module Windows = struct
|
||||
- let rec install_service (g : Guestfs.guestfs) root =
|
||||
+ (* Create and return the firstboot directory. *)
|
||||
+ let create_firstboot_dir (g : Guestfs.guestfs) =
|
||||
+ let rec loop firstboot_dir firstboot_dir_win = function
|
||||
+ | [] -> firstboot_dir, firstboot_dir_win
|
||||
+ | dir :: path ->
|
||||
+ let firstboot_dir =
|
||||
+ if firstboot_dir = "" then "/" ^ dir else firstboot_dir // dir in
|
||||
+ let firstboot_dir_win = firstboot_dir_win ^ "\\" ^ dir in
|
||||
+ let firstboot_dir = g#case_sensitive_path firstboot_dir in
|
||||
+ g#mkdir_p firstboot_dir;
|
||||
+ loop firstboot_dir firstboot_dir_win path
|
||||
+ in
|
||||
+ loop "" "C:" ["Program Files"; "Guestfs"; "Firstboot"]
|
||||
+
|
||||
+ let rec install_service (g : Guestfs.guestfs) root
|
||||
+ firstboot_dir firstboot_dir_win =
|
||||
(* Either rhsrvany.exe or pvvxsvc.exe must exist.
|
||||
*
|
||||
* (Check also that it's not a dangling symlink but a real file).
|
||||
@@ -254,20 +269,7 @@ module Windows = struct
|
||||
error (f_"One of rhsrvany.exe or pvvxsvc.exe is missing in %s. One of them is required in order to install Windows firstboot scripts. You can get one by building rhsrvany (https://github.com/rwmjones/rhsrvany)")
|
||||
(virt_tools_data_dir ()) in
|
||||
|
||||
- (* Create a directory for firstboot files in the guest. *)
|
||||
- let firstboot_dir, firstboot_dir_win =
|
||||
- let rec loop firstboot_dir firstboot_dir_win = function
|
||||
- | [] -> firstboot_dir, firstboot_dir_win
|
||||
- | dir :: path ->
|
||||
- let firstboot_dir =
|
||||
- if firstboot_dir = "" then "/" ^ dir else firstboot_dir // dir in
|
||||
- let firstboot_dir_win = firstboot_dir_win ^ "\\" ^ dir in
|
||||
- let firstboot_dir = g#case_sensitive_path firstboot_dir in
|
||||
- g#mkdir_p firstboot_dir;
|
||||
- loop firstboot_dir firstboot_dir_win path
|
||||
- in
|
||||
- loop "" "C:" ["Program Files"; "Guestfs"; "Firstboot"] in
|
||||
-
|
||||
+ (* Create a directory for firstboot scripts in the guest. *)
|
||||
g#mkdir_p (firstboot_dir // "scripts");
|
||||
|
||||
(* Copy pvvxsvc or rhsrvany to the guest. *)
|
||||
@@ -339,11 +341,25 @@ echo uninstalling firstboot service
|
||||
"PWD", REG_SZ firstboot_dir_win ];
|
||||
] in
|
||||
reg_import reg regedits
|
||||
- );
|
||||
-
|
||||
- firstboot_dir
|
||||
+ )
|
||||
end
|
||||
|
||||
+let firstboot_dir (g : Guestfs.guestfs) root =
|
||||
+ let typ = g#inspect_get_type root in
|
||||
+
|
||||
+ match typ with
|
||||
+ | "linux" ->
|
||||
+ let dir = Linux.firstboot_dir in
|
||||
+ g#mkdir_p dir;
|
||||
+ dir, None
|
||||
+
|
||||
+ | "windows" ->
|
||||
+ let dir, dir_win = Windows.create_firstboot_dir g in
|
||||
+ dir, Some dir_win
|
||||
+
|
||||
+ | _ ->
|
||||
+ error (f_"guest type %s is not supported") typ
|
||||
+
|
||||
let script_count = ref 0
|
||||
|
||||
let add_firstboot_script (g : Guestfs.guestfs) root ?(prio = 5000) name
|
||||
@@ -363,7 +379,8 @@ let add_firstboot_script (g : Guestfs.guestfs) root ?(prio = 5000) name
|
||||
g#chmod 0o755 filename
|
||||
|
||||
| "windows", _ ->
|
||||
- let firstboot_dir = Windows.install_service g root in
|
||||
+ let firstboot_dir, firstboot_dir_win = Windows.create_firstboot_dir g in
|
||||
+ Windows.install_service g root firstboot_dir firstboot_dir_win;
|
||||
let filename = firstboot_dir // "scripts" // filename ^ ".bat" in
|
||||
g#write filename (String.unix2dos content)
|
||||
|
||||
@@ -382,15 +399,18 @@ let add_firstboot_powershell g root ?prio name code =
|
||||
*)
|
||||
assert (g#inspect_get_type root = "windows");
|
||||
|
||||
- let windows_systemroot = g#inspect_get_windows_systemroot root in
|
||||
-
|
||||
- (* Create the temporary directory to put the Powershell file. *)
|
||||
- let tempdir = sprintf "%s/Temp" windows_systemroot in
|
||||
+ (* Place the Powershell script into firstboot_dir/Temp *)
|
||||
+ let firstboot_dir, firstboot_dir_win = Windows.create_firstboot_dir g in
|
||||
+ let tempdir = sprintf "%s/Temp" firstboot_dir in
|
||||
g#mkdir_p tempdir;
|
||||
- let ps_path = sprintf "%s/%s" tempdir name in
|
||||
+
|
||||
+ let ps_path = sprintf "%s/%s.ps1" tempdir name in
|
||||
+ let ps_path_win = sprintf "%s\\Temp\\%s.ps1" firstboot_dir_win name in
|
||||
let code = String.concat "\r\n" code ^ "\r\n" in
|
||||
g#write ps_path code;
|
||||
|
||||
- let fb = sprintf "powershell.exe -ExecutionPolicy ByPass -NoProfile -file %s"
|
||||
- ps_path in
|
||||
+ (* Create a regular firstboot bat that just invokes powershell *)
|
||||
+ let fb =
|
||||
+ sprintf "powershell.exe -ExecutionPolicy ByPass -NoProfile -file \"%s\""
|
||||
+ ps_path_win in
|
||||
add_firstboot_script g root ?prio name fb
|
||||
diff --git a/common/mlcustomize/firstboot.mli b/common/mlcustomize/firstboot.mli
|
||||
index 8231af65..34ff0690 100644
|
||||
--- a/common/mlcustomize/firstboot.mli
|
||||
+++ b/common/mlcustomize/firstboot.mli
|
||||
@@ -16,6 +16,23 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*)
|
||||
|
||||
+val firstboot_dir : Guestfs.guestfs -> string -> string * string option
|
||||
+(** [firstboot_dir g root]
|
||||
+ returns the path of the firstboot directory, creating it in
|
||||
+ the guest if necessary.
|
||||
+
|
||||
+ This returns the name of the directory as a guestfs path, and
|
||||
+ optionally the name as a Windows path (only for Windows guests).
|
||||
+
|
||||
+ For Linux this could be [/usr/lib/virt-sysprep, None]
|
||||
+
|
||||
+ For Windows this could be ["/Program Files/Guestfs/Firstboot",
|
||||
+ Some "C:\Program Files\Guestfs\Firstboot"]
|
||||
+
|
||||
+ Additional files that are used during firstboot can be placed
|
||||
+ in this directory, but be careful not to conflict with files
|
||||
+ and scripts added by the firstboot process itself. *)
|
||||
+
|
||||
val add_firstboot_script : Guestfs.guestfs -> string -> ?prio:int -> string ->
|
||||
string -> unit
|
||||
(** [add_firstboot_script g root prio name content] adds a firstboot
|
||||
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
|
||||
index eee93669..b04a3b38 100644
|
||||
--- a/common/mlcustomize/inject_virtio_win.ml
|
||||
+++ b/common/mlcustomize/inject_virtio_win.ml
|
||||
@@ -592,11 +592,11 @@ and configure_qemu_ga t files =
|
||||
add "# Run qemu-ga installers";
|
||||
List.iter (
|
||||
fun msi_path ->
|
||||
- add (sprintf "C:\\%s /norestart /qn /l+*vx C:\\%s.log"
|
||||
+ add (sprintf "Start-Process -Wait -FilePath \"C:\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"C:\\%s.log\""
|
||||
msi_path msi_path)
|
||||
) files;
|
||||
|
||||
- Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga.ps1" !script
|
||||
+ Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga" !script
|
||||
|
||||
and configure_blnsvr t blnsvr =
|
||||
let cmd = sprintf "\
|
||||
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
|
||||
index 2d6e2059..52ca5bbe 100644
|
||||
--- a/convert/convert_windows.ml
|
||||
+++ b/convert/convert_windows.ml
|
||||
@@ -397,7 +397,7 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
|
||||
%systemroot%\\Sysnative\\PnPutil -i -a \
|
||||
%systemroot%\\Drivers\\Virtio\\*.inf" in
|
||||
|
||||
- (* Set priority higher than that of "v2vnetcf.ps1" firstboot script. *)
|
||||
+ (* Set priority higher than that of "network-configure" firstboot script. *)
|
||||
Firstboot.add_firstboot_script g inspect.i_root ~prio:2000
|
||||
"pnputil install drivers" fb_script;
|
||||
|
||||
@@ -674,7 +674,7 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
|
||||
* Powershell script which runs at boot.
|
||||
*)
|
||||
if static_ips <> [] then (
|
||||
- let psh_filename = "v2vnetcf.ps1" in
|
||||
+ let psh_filename = "network-configure" in
|
||||
let psh = ref [] in
|
||||
let add = List.push_back psh in
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9b602a74f1cb359a281a80d944921d6d09a38bc8 Mon Sep 17 00:00:00 2001
|
||||
From 3a35716e78ff51342942e77a6dfe228b3cb9c6b4 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,116 +0,0 @@
|
||||
From 168eacf977ca49e96bc63ddc4109c27515ac0277 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 1 Aug 2024 10:36:52 +0100
|
||||
Subject: [PATCH] common: mlcustomize: Inject qemu-ga & blnsvr into
|
||||
<firstboot_dir>/Temp
|
||||
|
||||
Update common submodule to pick up this further change which should
|
||||
mean that for all Windows conversions, everything is confined to
|
||||
C:\Program Files\Guestfs\Firstboot (except the virtio drivers
|
||||
themselves).
|
||||
|
||||
Richard W.M. Jones (1):
|
||||
mlcustomize: Inject qemu-ga & blnsvr into <firstboot_dir>/Temp
|
||||
---
|
||||
common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Submodule common d489469f..04116678:
|
||||
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
|
||||
index b04a3b38..2981bff5 100644
|
||||
--- a/common/mlcustomize/inject_virtio_win.ml
|
||||
+++ b/common/mlcustomize/inject_virtio_win.ml
|
||||
@@ -263,14 +263,28 @@ let rec inject_virtio_win_drivers ({ g } as t) reg =
|
||||
}
|
||||
)
|
||||
|
||||
-and inject_qemu_ga t =
|
||||
- let msi_files = copy_qemu_ga t in
|
||||
+and inject_qemu_ga ({ g; root } as t) =
|
||||
+ (* Copy the qemu-ga MSI(s) to the guest. *)
|
||||
+ let dir, dir_win = Firstboot.firstboot_dir g root in
|
||||
+ let dir_win = Option.value dir_win ~default:dir in
|
||||
+ let tempdir = sprintf "%s/Temp" dir in
|
||||
+ let tempdir_win = sprintf "%s\\Temp" dir_win in
|
||||
+ g#mkdir_p tempdir;
|
||||
+
|
||||
+ let msi_files = copy_qemu_ga t tempdir in
|
||||
if msi_files <> [] then
|
||||
- configure_qemu_ga t msi_files;
|
||||
+ configure_qemu_ga t tempdir_win msi_files;
|
||||
msi_files <> [] (* return true if we found some qemu-ga MSI files *)
|
||||
|
||||
-and inject_blnsvr t =
|
||||
- let files = copy_blnsvr t in
|
||||
+and inject_blnsvr ({ g; root } as t) =
|
||||
+ (* Copy the files to the guest. *)
|
||||
+ let dir, dir_win = Firstboot.firstboot_dir g root in
|
||||
+ let dir_win = Option.value dir_win ~default:dir in
|
||||
+ let tempdir = sprintf "%s/Temp" dir in
|
||||
+ let tempdir_win = sprintf "%s\\Temp" dir_win in
|
||||
+ g#mkdir_p tempdir;
|
||||
+
|
||||
+ let files = copy_blnsvr t tempdir in
|
||||
match files with
|
||||
| [] -> false (* Didn't find or install anything. *)
|
||||
|
||||
@@ -278,7 +292,7 @@ and inject_blnsvr t =
|
||||
* drivers/by-driver). Pick the first.
|
||||
*)
|
||||
| blnsvr :: _ ->
|
||||
- configure_blnsvr t blnsvr;
|
||||
+ configure_blnsvr t tempdir_win blnsvr;
|
||||
true
|
||||
|
||||
and add_guestor_to_registry t ((g, root) as reg) drv_name drv_pciid =
|
||||
@@ -360,13 +374,13 @@ and copy_drivers t driverdir =
|
||||
(fun () ->
|
||||
error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
|
||||
|
||||
-and copy_qemu_ga t =
|
||||
- copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_qemu_ga t)
|
||||
+and copy_qemu_ga t tempdir =
|
||||
+ copy_from_virtio_win t "/" tempdir (virtio_iso_path_matches_qemu_ga t)
|
||||
(fun () ->
|
||||
error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
|
||||
|
||||
-and copy_blnsvr t =
|
||||
- copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_blnsvr t)
|
||||
+and copy_blnsvr t tempdir =
|
||||
+ copy_from_virtio_win t "/" tempdir (virtio_iso_path_matches_blnsvr t)
|
||||
(fun () ->
|
||||
error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log."))
|
||||
|
||||
@@ -578,7 +592,7 @@ and copy_from_libosinfo { g; i_osinfo; i_arch } destdir =
|
||||
(* Install qemu-ga. [files] is the non-empty list of possible qemu-ga
|
||||
* installers we detected.
|
||||
*)
|
||||
-and configure_qemu_ga t files =
|
||||
+and configure_qemu_ga t tempdir_win files =
|
||||
let script = ref [] in
|
||||
let add = List.push_back script in
|
||||
|
||||
@@ -591,16 +605,17 @@ and configure_qemu_ga t files =
|
||||
add "";
|
||||
add "# Run qemu-ga installers";
|
||||
List.iter (
|
||||
- fun msi_path ->
|
||||
- add (sprintf "Start-Process -Wait -FilePath \"C:\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"C:\\%s.log\""
|
||||
- msi_path msi_path)
|
||||
+ fun msi ->
|
||||
+ (* [`] is an escape char for quotes *)
|
||||
+ add (sprintf "Start-Process -Wait -FilePath \"%s\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"`\"%s\\%s.log`\"\""
|
||||
+ tempdir_win msi tempdir_win msi)
|
||||
) files;
|
||||
|
||||
Firstboot.add_firstboot_powershell t.g t.root "install-qemu-ga" !script
|
||||
|
||||
-and configure_blnsvr t blnsvr =
|
||||
+and configure_blnsvr t tempdir_win blnsvr =
|
||||
let cmd = sprintf "\
|
||||
@echo off\n\
|
||||
echo Installing %s\n\
|
||||
- c:\\%s -i\n" blnsvr blnsvr in
|
||||
- Firstboot.add_firstboot_script t.g t.root (sprintf "install-%s" blnsvr) cmd
|
||||
+ \"%s\\%s\" -i\n" blnsvr tempdir_win blnsvr in
|
||||
+ Firstboot.add_firstboot_script t.g t.root "install-blnsvr" cmd
|
@ -1,4 +1,4 @@
|
||||
From 024513d941b74936c1cf13bcb7375117004f6ba5 Mon Sep 17 00:00:00 2001
|
||||
From a4c21bcb10cd13f4cfe330d479c1e9d70e5836a7 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.
|
||||
@ -18,10 +18,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=2187961#c1
|
||||
6 files changed, 28 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/convert/convert.ml b/convert/convert.ml
|
||||
index 344c5858..ecc48ad4 100644
|
||||
index 64b36c97..604902d1 100644
|
||||
--- a/convert/convert.ml
|
||||
+++ b/convert/convert.ml
|
||||
@@ -52,6 +52,7 @@ let rec convert dir options source =
|
||||
@@ -53,6 +53,7 @@ let rec convert dir options source =
|
||||
|
||||
message (f_"Opening the source");
|
||||
let g = open_guestfs ~identifier:"v2v" () in
|
||||
@ -30,7 +30,7 @@ index 344c5858..ecc48ad4 100644
|
||||
(* Setting the number of vCPUs allows parallel mkinitrd, but make
|
||||
* sure this is not too large because each vCPU consumes guest RAM.
|
||||
diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh
|
||||
index 30908a91..73cf5144 100755
|
||||
index 501c2a93..28b2744f 100755
|
||||
--- a/test-data/phony-guests/make-windows-img.sh
|
||||
+++ b/test-data/phony-guests/make-windows-img.sh
|
||||
@@ -37,6 +37,7 @@ fi
|
||||
@ -85,7 +85,7 @@ index 4373f140..2b31b0bb 100755
|
||||
|
||||
# Test the base image remained untouched
|
||||
diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh
|
||||
index 69f6f414..b9b806fb 100755
|
||||
index 68fb879b..2e133034 100755
|
||||
--- a/tests/test-v2v-virtio-win-iso.sh
|
||||
+++ b/tests/test-v2v-virtio-win-iso.sh
|
||||
@@ -82,6 +82,12 @@ mktest ()
|
@ -1,45 +0,0 @@
|
||||
From c952f310c902e438a8b0b5240a4b486b698bede8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 5 Aug 2024 10:08:34 +0100
|
||||
Subject: [PATCH] docs: Add a note about removal of VMware Tools on Windows
|
||||
|
||||
We use VMware's recommended method for removal, but we know from
|
||||
experience that this rarely works. The alternate method being
|
||||
proposed involves making very invasive changes to the Registry and
|
||||
filesystem, which are inappropriate for virt-v2v to do and highly
|
||||
risky. Therefore simply document this, with notes for the virt-v2v
|
||||
user if they want to try the risky method.
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-51169
|
||||
Thanks: Yan Vugenfirer
|
||||
Reported-by: Ming Xie
|
||||
---
|
||||
docs/virt-v2v.pod | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index dfe92d77..92941026 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -1299,6 +1299,21 @@ B<N.B.> Take care not to interrupt the automatic driver installation
|
||||
process when logging in to the guest for the first time, as this may
|
||||
prevent the guest from subsequently booting correctly.
|
||||
|
||||
+=head3 Removing VMware Tools from Windows guests
|
||||
+
|
||||
+Virt-v2v attempts to remove VMware Tools. For Windows guests this is
|
||||
+supposed to happen during the first boot after conversion.
|
||||
+
|
||||
+We use VMware's recommended uninstallation method as that is the
|
||||
+safest choice. However our experience has shown that this method
|
||||
+usually fails. If so, VMware Tools must be removed by some other
|
||||
+method.
|
||||
+
|
||||
+One possible method is described here:
|
||||
+L<https://gist.github.com/broestls/f872872a00acee2fca02017160840624>
|
||||
+You should carefully check this script since it makes very invasive
|
||||
+changes to the Windows Registry and filesystem.
|
||||
+
|
||||
=head2 Free space for conversion
|
||||
|
||||
=head3 Free space in the guest
|
@ -1,4 +1,4 @@
|
||||
From a3b4f52cd0e74486b13cbb4d0de007c047afe2cd Mon Sep 17 00:00:00 2001
|
||||
From e730683c6e0eb9ae71e8b05a1f12fbaf43a3300b 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,25 +0,0 @@
|
||||
From 7bc9b115baba6df2969451cd6907e2d7543ef22d Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 5 Aug 2024 10:18:31 +0100
|
||||
Subject: [PATCH] Update common submodule
|
||||
|
||||
Richard W.M. Jones (1):
|
||||
mlcustomize: Write qemu-ga log file name to log.txt
|
||||
---
|
||||
common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Submodule common 04116678..7b84a370:
|
||||
diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml
|
||||
index 2981bff5..afec1e45 100644
|
||||
--- a/common/mlcustomize/inject_virtio_win.ml
|
||||
+++ b/common/mlcustomize/inject_virtio_win.ml
|
||||
@@ -606,6 +606,8 @@ and configure_qemu_ga t tempdir_win files =
|
||||
add "# Run qemu-ga installers";
|
||||
List.iter (
|
||||
fun msi ->
|
||||
+ add (sprintf "Write-Host \"Writing log to %s\\%s.log\""
|
||||
+ tempdir_win msi);
|
||||
(* [`] is an escape char for quotes *)
|
||||
add (sprintf "Start-Process -Wait -FilePath \"%s\\%s\" -ArgumentList \"/norestart\",\"/qn\",\"/l+*vx\",\"`\"%s\\%s.log`\"\""
|
||||
tempdir_win msi tempdir_win msi)
|
@ -1,78 +0,0 @@
|
||||
From 50f005f8b7034916588855c15b10a0195bf54b23 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 8 Aug 2024 10:40:24 +0100
|
||||
Subject: [PATCH] Pull in a fix to make Windows firstboot more reliable.
|
||||
|
||||
Update the common submodule to get:
|
||||
|
||||
Richard W.M. Jones (2):
|
||||
mlcustomize: Add some comments to firstboot batch file
|
||||
mlcustomize: Reboot Windows between each firstboot script
|
||||
|
||||
Document that Windows may now reboot several times after conversion.
|
||||
---
|
||||
common | 2 +-
|
||||
docs/virt-v2v.pod | 9 ++++++---
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
Submodule common 7b84a370..a7883967:
|
||||
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
|
||||
index 3bbba714..52e76401 100644
|
||||
--- a/common/mlcustomize/firstboot.ml
|
||||
+++ b/common/mlcustomize/firstboot.ml
|
||||
@@ -278,6 +278,9 @@ module Windows = struct
|
||||
(* Write a firstboot.bat control script which just runs the other
|
||||
* scripts in the directory. Note we need to use CRLF line endings
|
||||
* in this script.
|
||||
+ *
|
||||
+ * XXX It would be better to use powershell here. For some ideas see
|
||||
+ * https://github.com/HCK-CI/HLK-Setup-Scripts/
|
||||
*)
|
||||
let firstboot_script = sprintf "\
|
||||
@echo off
|
||||
@@ -299,6 +302,7 @@ if not exist \"%%scripts_done%%\" (
|
||||
mkdir \"%%scripts_done%%\"
|
||||
)
|
||||
|
||||
+:: Pick the next script to run.
|
||||
for %%%%f in (\"%%scripts%%\"\\*.bat) do (
|
||||
echo running \"%%%%f\"
|
||||
move \"%%%%f\" \"%%scripts_done%%\"
|
||||
@@ -307,8 +311,17 @@ for %%%%f in (\"%%scripts%%\"\\*.bat) do (
|
||||
set elvl=!errorlevel!
|
||||
echo .... exit code !elvl!
|
||||
popd
|
||||
+
|
||||
+ :: Reboot the computer. This is necessary to free any locked
|
||||
+ :: files which may prevent later scripts from running.
|
||||
+ shutdown /r /t 0 /y
|
||||
+
|
||||
+ :: Exit the script (in case shutdown returns before rebooting).
|
||||
+ :: On next boot, the whole firstboot service will be called again.
|
||||
+ exit /b
|
||||
)
|
||||
|
||||
+:: Fallthrough here if there are no scripts.
|
||||
echo uninstalling firstboot service
|
||||
\"%%firstboot%%\\%s\" -s firstboot uninstall
|
||||
" firstboot_dir_win srvany in
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 92941026..587b4604 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -1295,9 +1295,12 @@ The guest will be bootable after the offline conversion stage, but
|
||||
will not yet have all necessary drivers installed to work correctly.
|
||||
These will be installed automatically the first time the guest boots.
|
||||
|
||||
-B<N.B.> Take care not to interrupt the automatic driver installation
|
||||
-process when logging in to the guest for the first time, as this may
|
||||
-prevent the guest from subsequently booting correctly.
|
||||
+B<N.B.> Windows may reboot 4 or more times the first time after
|
||||
+conversion. This is required to install the required drivers, guest
|
||||
+agents, remove VMware Tools, and configure the network. Take care not
|
||||
+to interrupt the automatic driver installation process when logging in
|
||||
+to the guest for the first time, as this may prevent the guest from
|
||||
+subsequently booting correctly.
|
||||
|
||||
=head3 Removing VMware Tools from Windows guests
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3435557683f568e03656adde0af20e5f3d63d5f1 Mon Sep 17 00:00:00 2001
|
||||
From 1acf2b8a7ef9dc10ae95830f884e98df5b624e7b 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 a1dcb4c0bc5670eb739115909bbe08eeefea416a Mon Sep 17 00:00:00 2001
|
||||
From 72e5733e70870a66e8b8132bbfe56d2d688eab41 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
|
||||
@ -23,7 +23,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-37687
|
||||
delete mode 100644 input/input_xen_ssh.mli
|
||||
|
||||
diff --git a/docs/Makefile.am b/docs/Makefile.am
|
||||
index 156dc18c..214cfc24 100644
|
||||
index 0f6a3e21..7cb6e09a 100644
|
||||
--- a/docs/Makefile.am
|
||||
+++ b/docs/Makefile.am
|
||||
@@ -23,7 +23,6 @@ EXTRA_DIST = \
|
||||
@ -34,7 +34,7 @@ index 156dc18c..214cfc24 100644
|
||||
virt-v2v-inspector.pod \
|
||||
virt-v2v-output-local.pod \
|
||||
virt-v2v-output-openstack.pod \
|
||||
@@ -42,7 +41,6 @@ man_MANS = \
|
||||
@@ -43,7 +42,6 @@ man_MANS = \
|
||||
virt-v2v-hacking.1 \
|
||||
virt-v2v-in-place.1 \
|
||||
virt-v2v-input-vmware.1 \
|
||||
@ -42,7 +42,7 @@ index 156dc18c..214cfc24 100644
|
||||
virt-v2v-inspector.1 \
|
||||
virt-v2v-output-local.1 \
|
||||
virt-v2v-output-openstack.1 \
|
||||
@@ -58,7 +56,6 @@ noinst_DATA = \
|
||||
@@ -60,7 +58,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 \
|
||||
@ -50,7 +50,7 @@ index 156dc18c..214cfc24 100644
|
||||
$(top_builddir)/website/virt-v2v-inspector.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-local.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-openstack.1.html \
|
||||
@@ -115,17 +112,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod
|
||||
@@ -119,17 +116,6 @@ stamp-virt-v2v-input-vmware.pod: virt-v2v-input-vmware.pod
|
||||
$<
|
||||
touch $@
|
||||
|
||||
@ -229,10 +229,10 @@ index 4a0544f8..00000000
|
||||
-
|
||||
-Copyright (C) 2009-2020 Red Hat Inc.
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 81a4b45a..9c8dd834 100644
|
||||
index a1e8fb30..ca75c255 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -11,7 +11,7 @@ virt-v2v - Convert a guest to use KVM
|
||||
@@ -12,7 +12,7 @@ virt-v2v - Convert a guest to use KVM
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Virt-v2v converts a single guest from a foreign hypervisor to run on
|
||||
@ -241,7 +241,7 @@ index 81a4b45a..9c8dd834 100644
|
||||
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
|
||||
@@ -50,8 +50,6 @@ management systems, guests.
|
||||
@@ -59,8 +59,6 @@ management systems, guests.
|
||||
|
||||
L<virt-v2v-input-vmware(1)> — Input from VMware.
|
||||
|
||||
@ -250,7 +250,7 @@ index 81a4b45a..9c8dd834 100644
|
||||
L<virt-v2v-output-local(1)> — Output to local files or local libvirt.
|
||||
|
||||
L<virt-v2v-output-rhv(1)> — Output to oVirt or RHV.
|
||||
@@ -175,10 +173,6 @@ This is only supported for:
|
||||
@@ -186,10 +184,6 @@ This is only supported for:
|
||||
|
||||
=item *
|
||||
|
||||
@ -261,7 +261,7 @@ index 81a4b45a..9c8dd834 100644
|
||||
L<input from VMware VMX|virt-v2v-input-vmware(1)/INPUT FROM VMWARE VMX>
|
||||
when using the SSH transport method
|
||||
|
||||
@@ -294,12 +288,10 @@ hypervisor. See L<virt-v2v-input-vmware(1)>.
|
||||
@@ -305,12 +299,10 @@ hypervisor. See L<virt-v2v-input-vmware(1)>.
|
||||
Specify a libvirt connection URI to use when reading the guest. This
|
||||
is only used when S<I<-i libvirt>>.
|
||||
|
||||
@ -277,7 +277,7 @@ index 81a4b45a..9c8dd834 100644
|
||||
|
||||
=item B<-if> format
|
||||
|
||||
@@ -844,40 +836,6 @@ Enable tracing of libguestfs API calls.
|
||||
@@ -859,40 +851,6 @@ __CUSTOMIZE_OPTIONS__
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
@ -318,7 +318,7 @@ index 81a4b45a..9c8dd834 100644
|
||||
=head2 Enabling virtio
|
||||
|
||||
"Virtio" is the name for a set of drivers which make disk (block
|
||||
@@ -1169,7 +1127,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit
|
||||
@@ -1184,7 +1142,7 @@ bandwidth. Virt-v2v should be able to copy guest data at gigabit
|
||||
ethernet speeds or greater.
|
||||
|
||||
Ensure that the network connections between servers (conversion
|
||||
@ -515,10 +515,10 @@ index fa048231..00000000
|
||||
-
|
||||
-module XenSSH : Input.INPUT
|
||||
diff --git a/inspector/inspector.ml b/inspector/inspector.ml
|
||||
index 5dde6e8d..7b2211e4 100644
|
||||
index 1ad67bbc..d7cbf449 100644
|
||||
--- a/inspector/inspector.ml
|
||||
+++ b/inspector/inspector.ml
|
||||
@@ -285,10 +285,6 @@ read the man page virt-v2v-inspector(1).
|
||||
@@ -296,10 +296,6 @@ read the man page virt-v2v-inspector(1).
|
||||
| Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK ->
|
||||
(module Input_vddk.VDDK)
|
||||
|
||||
@ -530,10 +530,10 @@ index 5dde6e8d..7b2211e4 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 fca5f6e9..6d44d987 100644
|
||||
index 6baa111f..9a622da0 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -388,7 +388,6 @@ read the man page virt-v2v(1).
|
||||
@@ -398,7 +398,6 @@ read the man page virt-v2v(1).
|
||||
pr "virt-v2v-2.0\n";
|
||||
pr "libguestfs-rewrite\n";
|
||||
pr "vcenter-https\n";
|
||||
@ -541,7 +541,7 @@ index fca5f6e9..6d44d987 100644
|
||||
pr "vddk\n";
|
||||
pr "colours-option\n";
|
||||
pr "vdsm-compat-option\n";
|
||||
@@ -452,10 +451,6 @@ read the man page virt-v2v(1).
|
||||
@@ -463,10 +462,6 @@ read the man page virt-v2v(1).
|
||||
| Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK ->
|
||||
(module Input_vddk.VDDK)
|
||||
|
@ -1,30 +0,0 @@
|
||||
From e9c0d63b22bcb4c31cfaac00fc1271713c8bd3b3 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 8 Aug 2024 10:56:16 +0100
|
||||
Subject: [PATCH] docs: Restate position on removal of VMware Tools
|
||||
|
||||
With the "reboot after every step" change made in the previous commit,
|
||||
it seems removal of VMware Tools is now more reliable. Update the
|
||||
notes about this.
|
||||
|
||||
Updates: commit c952f310c902e438a8b0b5240a4b486b698bede8
|
||||
---
|
||||
docs/virt-v2v.pod | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 587b4604..346be606 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -1308,9 +1308,8 @@ Virt-v2v attempts to remove VMware Tools. For Windows guests this is
|
||||
supposed to happen during the first boot after conversion.
|
||||
|
||||
We use VMware's recommended uninstallation method as that is the
|
||||
-safest choice. However our experience has shown that this method
|
||||
-usually fails. If so, VMware Tools must be removed by some other
|
||||
-method.
|
||||
+safest choice. If this fails, VMware Tools must be manually removed
|
||||
+by some other method.
|
||||
|
||||
One possible method is described here:
|
||||
L<https://gist.github.com/broestls/f872872a00acee2fca02017160840624>
|
@ -1,4 +1,4 @@
|
||||
From 194e3386a00560e02dc09cbf77f6a30b0c897ada Mon Sep 17 00:00:00 2001
|
||||
From 30a1e0a8b6cfa21a2e24c3d4aca85f5682f63df5 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
|
||||
@ -98,10 +98,10 @@ index cd4862b1..54cd276e 100644
|
||||
=head1 AUTHOR
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 9c8dd834..50424bc3 100644
|
||||
index ca75c255..6e26e62c 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -427,14 +427,6 @@ See L</Networks and bridges> below.
|
||||
@@ -438,14 +438,6 @@ See L</Networks and bridges> below.
|
||||
|
||||
This is the same as I<-o local>.
|
||||
|
||||
@ -116,7 +116,7 @@ index 9c8dd834..50424bc3 100644
|
||||
=item B<-o> B<kubevirt>
|
||||
|
||||
Set the output method to I<kubevirt>. B<Note the way this mode works
|
||||
@@ -1149,11 +1141,6 @@ and output methods may use disk space, as outlined in the table below.
|
||||
@@ -1164,11 +1156,6 @@ and output methods may use disk space, as outlined in the table below.
|
||||
This temporarily places a full copy of the uncompressed source disks
|
||||
in C<$VIRT_V2V_TMPDIR> (or F</var/tmp>).
|
||||
|
||||
@ -128,7 +128,7 @@ index 9c8dd834..50424bc3 100644
|
||||
=item I<-o local>
|
||||
|
||||
=item I<-o qemu>
|
||||
@@ -1356,13 +1343,6 @@ See also L</Starting the libvirt system instance>.
|
||||
@@ -1371,13 +1358,6 @@ See also L</Starting the libvirt system instance>.
|
||||
Because of how Cinder volumes are presented as F</dev> block devices,
|
||||
using I<-o openstack> normally requires that virt-v2v is run as root.
|
||||
|
||||
@ -167,7 +167,7 @@ index c0db9115..074b5e16 100755
|
||||
set -e
|
||||
set -x
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 6d44d987..f51b55d9 100644
|
||||
index 9a622da0..801aaf7d 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -197,7 +197,6 @@ let rec main () =
|
||||
@ -187,7 +187,7 @@ index 6d44d987..f51b55d9 100644
|
||||
s_"Set output mode (default: libvirt)";
|
||||
[ M"oa" ], Getopt.String ("sparse|preallocated", set_output_alloc),
|
||||
s_"Set output allocation mode";
|
||||
@@ -325,8 +324,6 @@ virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
@@ -333,8 +332,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 +196,7 @@ index 6d44d987..f51b55d9 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.
|
||||
|
||||
@@ -400,7 +397,6 @@ read the man page virt-v2v(1).
|
||||
@@ -411,7 +408,6 @@ read the man page virt-v2v(1).
|
||||
pr "input:libvirtxml\n";
|
||||
pr "input:ova\n";
|
||||
pr "input:vmx\n";
|
||||
@ -204,7 +204,7 @@ index 6d44d987..f51b55d9 100644
|
||||
pr "output:kubevirt\n";
|
||||
pr "output:libvirt\n";
|
||||
pr "output:local\n";
|
||||
@@ -493,7 +489,6 @@ read the man page virt-v2v(1).
|
||||
@@ -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)
|
@ -1,4 +1,4 @@
|
||||
From e2898730dd01704c60ad3896afd03507feb59e27 Mon Sep 17 00:00:00 2001
|
||||
From e9d68fe110428f1d24c4cbb45cae744fd644fdea Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Thu, 2 Dec 2021 11:56:05 +0000
|
||||
Subject: [PATCH] RHEL: Remove the --in-place option
|
||||
@ -12,10 +12,10 @@ wish to support in RHEL.
|
||||
3 files changed, 17 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index 50424bc3..e22dc95f 100644
|
||||
index 6e26e62c..2230a556 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -24,9 +24,6 @@ virtualize those machines (physical to virtual, or p2v).
|
||||
@@ -25,9 +25,6 @@ virtualize those machines (physical to virtual, or p2v).
|
||||
To estimate the disk space needed before conversion, see
|
||||
L<virt-v2v-inspector(1)>.
|
||||
|
||||
@ -25,7 +25,7 @@ index 50424bc3..e22dc95f 100644
|
||||
=head2 Input and Output
|
||||
|
||||
You normally run virt-v2v with several I<-i*> options controlling the
|
||||
@@ -39,10 +36,6 @@ The input and output sides of virt-v2v are separate and unrelated.
|
||||
@@ -40,10 +37,6 @@ The input and output sides of virt-v2v are separate and unrelated.
|
||||
Virt-v2v can read from any input and write to any output. Therefore
|
||||
these sides of virt-v2v are documented separately in this manual.
|
||||
|
||||
@ -33,10 +33,10 @@ index 50424bc3..e22dc95f 100644
|
||||
-mode". In this case the source guest is always left unchanged.
|
||||
-In-place conversions may be done using L<virt-v2v-in-place(1)>.
|
||||
-
|
||||
=head2 Other virt-v2v topics
|
||||
=head2 Customization
|
||||
|
||||
L<virt-v2v-support(1)> — Supported hypervisors, virtualization
|
||||
@@ -1624,7 +1617,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c
|
||||
Virt-v2v can also customize the guest during conversion, using the
|
||||
@@ -1639,7 +1632,6 @@ L<https://rwmj.wordpress.com/2015/09/18/importing-kvm-guests-to-ovirt-or-rhev/#c
|
||||
|
||||
L<virt-p2v(1)>,
|
||||
L<virt-v2v-inspector(1)>,
|
||||
@ -45,7 +45,7 @@ index 50424bc3..e22dc95f 100644
|
||||
L<virt-df(1)>,
|
||||
L<virt-filesystems(1)>,
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 723a6506..4bfa1c7a 100644
|
||||
index 1c3d6064..cee516c4 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -77,7 +77,6 @@ TESTS = \
|
||||
@ -57,7 +57,7 @@ index 723a6506..4bfa1c7a 100644
|
||||
test-v2v-inspector.sh \
|
||||
test-v2v-mac.sh \
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index f51b55d9..a61b055e 100644
|
||||
index 801aaf7d..c18aeaa1 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -219,12 +219,6 @@ let rec main () =
|
@ -1,4 +1,4 @@
|
||||
From 5491bd28a055ff7248dd922c75aa3b9653ec488a Mon Sep 17 00:00:00 2001
|
||||
From 2400571532f5dfbef847762f284144b13780f5af Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 5 Jul 2022 11:58:09 +0100
|
||||
Subject: [PATCH] RHEL: tests: Remove btrfs test
|
||||
@ -9,7 +9,7 @@ RHEL does not have btrfs so this test always fails.
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 4bfa1c7a..a380a9bf 100644
|
||||
index cee516c4..ddecdfbf 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -101,7 +101,6 @@ TESTS = \
|
@ -1,4 +1,4 @@
|
||||
From e75a874958d57ef19d3bbd1215c073267a9cc406 Mon Sep 17 00:00:00 2001
|
||||
From 4bcc65e7f7a63ee6f1117e104f92462b9ee3a885 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
|
||||
@ -16,10 +16,10 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2190387
|
||||
5 files changed, 2 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/docs/virt-v2v-in-place.pod b/docs/virt-v2v-in-place.pod
|
||||
index ce57e229..6e1c5363 100644
|
||||
index 4304c0d6..b7384210 100644
|
||||
--- a/docs/virt-v2v-in-place.pod
|
||||
+++ b/docs/virt-v2v-in-place.pod
|
||||
@@ -47,16 +47,6 @@ Display help.
|
||||
@@ -51,16 +51,6 @@ Display help.
|
||||
|
||||
See I<--network> below.
|
||||
|
||||
@ -37,10 +37,10 @@ index ce57e229..6e1c5363 100644
|
||||
|
||||
=item B<--colours>
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index e22dc95f..b94fc8b5 100644
|
||||
index 2230a556..eb7da9ca 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -191,16 +191,6 @@ The options are silently ignored for other input methods.
|
||||
@@ -202,16 +202,6 @@ The options are silently ignored for other input methods.
|
||||
|
||||
See I<--network> below.
|
||||
|
||||
@ -58,7 +58,7 @@ index e22dc95f..b94fc8b5 100644
|
||||
|
||||
=item B<--colours>
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index 1fbd29d3..1c690a54 100644
|
||||
index 8286dbc5..2dc406e2 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -43,7 +43,6 @@ let rec main () =
|
||||
@ -78,7 +78,7 @@ index 1fbd29d3..1c690a54 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),
|
||||
@@ -216,12 +213,6 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -225,12 +222,6 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
@ -88,10 +88,10 @@ index 1fbd29d3..1c690a54 100644
|
||||
- | Some "virtio-scsi" -> Virtio_SCSI
|
||||
- | Some driver ->
|
||||
- error (f_"unknown block driver ‘--block-driver %s’") driver in
|
||||
let customize_ops = get_customize_ops () in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
let print_source = !print_source in
|
||||
@@ -305,7 +296,7 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -316,7 +307,7 @@ read the man page virt-v2v-in-place(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
||||
@ -101,7 +101,7 @@ index 1fbd29d3..1c690a54 100644
|
||||
ks = opthandle.ks;
|
||||
network_map;
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index a380a9bf..1ec1a702 100644
|
||||
index ddecdfbf..b41fed7f 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -77,7 +77,6 @@ TESTS = \
|
||||
@ -113,7 +113,7 @@ index a380a9bf..1ec1a702 100644
|
||||
test-v2v-mac.sh \
|
||||
test-v2v-machine-readable.sh \
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index a61b055e..64a0147c 100644
|
||||
index c18aeaa1..d09c200c 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -48,7 +48,6 @@ let rec main () =
|
||||
@ -133,7 +133,7 @@ index a61b055e..64a0147c 100644
|
||||
[ 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),
|
||||
@@ -343,12 +340,6 @@ read the man page virt-v2v(1).
|
||||
@@ -352,12 +349,6 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Dereference the arguments. *)
|
||||
let args = List.rev !args in
|
||||
@ -143,10 +143,10 @@ index a61b055e..64a0147c 100644
|
||||
- | Some "virtio-scsi" -> Virtio_SCSI
|
||||
- | Some driver ->
|
||||
- error (f_"unknown block driver ‘--block-driver %s’") driver in
|
||||
let customize_ops = get_customize_ops () in
|
||||
let input_conn = !input_conn in
|
||||
let input_mode = !input_mode in
|
||||
let input_transport =
|
||||
@@ -515,7 +506,7 @@ read the man page virt-v2v(1).
|
||||
@@ -526,7 +517,7 @@ read the man page virt-v2v(1).
|
||||
|
||||
(* Get the conversion options. *)
|
||||
let conv_options = {
|
@ -1,4 +1,4 @@
|
||||
From c0f7a321feb08727609a160ac0c0f2c0adea68f2 Mon Sep 17 00:00:00 2001
|
||||
From f2313ec6c8025b0172984911715bd9846d51457c 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 rhv, -o rhv-upload and -o vdsm modes
|
||||
@ -75,7 +75,7 @@ Fixes: https://issues.redhat.com/browse/RHEL-36712
|
||||
delete mode 100755 tests/test-v2v-o-vdsm-options.sh
|
||||
|
||||
diff --git a/docs/Makefile.am b/docs/Makefile.am
|
||||
index 214cfc24..2cbe9397 100644
|
||||
index 7cb6e09a..4c341f8b 100644
|
||||
--- a/docs/Makefile.am
|
||||
+++ b/docs/Makefile.am
|
||||
@@ -26,7 +26,6 @@ EXTRA_DIST = \
|
||||
@ -86,7 +86,7 @@ index 214cfc24..2cbe9397 100644
|
||||
virt-v2v-release-notes-1.42.pod \
|
||||
virt-v2v-release-notes-2.0.pod \
|
||||
virt-v2v-release-notes-2.2.pod \
|
||||
@@ -44,7 +43,6 @@ man_MANS = \
|
||||
@@ -45,7 +44,6 @@ man_MANS = \
|
||||
virt-v2v-inspector.1 \
|
||||
virt-v2v-output-local.1 \
|
||||
virt-v2v-output-openstack.1 \
|
||||
@ -94,7 +94,7 @@ index 214cfc24..2cbe9397 100644
|
||||
virt-v2v-release-notes-1.42.1 \
|
||||
virt-v2v-release-notes-2.0.1 \
|
||||
virt-v2v-release-notes-2.2.1 \
|
||||
@@ -59,7 +57,6 @@ noinst_DATA = \
|
||||
@@ -61,7 +59,6 @@ noinst_DATA = \
|
||||
$(top_builddir)/website/virt-v2v-inspector.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-local.1.html \
|
||||
$(top_builddir)/website/virt-v2v-output-openstack.1.html \
|
||||
@ -102,7 +102,7 @@ index 214cfc24..2cbe9397 100644
|
||||
$(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 \
|
||||
@@ -146,17 +143,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod
|
||||
@@ -150,17 +147,6 @@ stamp-virt-v2v-output-openstack.pod: virt-v2v-output-openstack.pod
|
||||
$<
|
||||
touch $@
|
||||
|
||||
@ -359,10 +359,10 @@ index 2ce697f4..00000000
|
||||
-
|
||||
-Copyright (C) 2009-2020 Red Hat Inc.
|
||||
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
|
||||
index b94fc8b5..f96fd69f 100644
|
||||
index eb7da9ca..de92db84 100644
|
||||
--- a/docs/virt-v2v.pod
|
||||
+++ b/docs/virt-v2v.pod
|
||||
@@ -13,7 +13,7 @@ virt-v2v - Convert a guest to use KVM
|
||||
@@ -14,7 +14,7 @@ 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
|
||||
@ -371,7 +371,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
other targets. It can modify the guest to make it bootable on KVM and
|
||||
install virtio drivers so it will run quickly.
|
||||
|
||||
@@ -45,8 +45,6 @@ L<virt-v2v-input-vmware(1)> — Input from VMware.
|
||||
@@ -54,8 +54,6 @@ L<virt-v2v-input-vmware(1)> — Input from VMware.
|
||||
|
||||
L<virt-v2v-output-local(1)> — Output to local files or local libvirt.
|
||||
|
||||
@ -380,7 +380,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
L<virt-v2v-output-openstack(1)> — Output to OpenStack.
|
||||
|
||||
L<virt-v2v-release-notes-1.42(1)> — Release notes for 1.42 release.
|
||||
@@ -74,21 +72,6 @@ disks to F</var/lib/libvirt/images>.
|
||||
@@ -85,21 +83,6 @@ disks to F</var/lib/libvirt/images>.
|
||||
|
||||
For more information see L<virt-v2v-input-vmware(1)>.
|
||||
|
||||
@ -402,7 +402,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=head2 Convert from ESXi hypervisor over SSH to local libvirt
|
||||
|
||||
You have an ESXi hypervisor called C<esxi.example.com> with SSH access
|
||||
@@ -468,14 +451,6 @@ no metadata is written.
|
||||
@@ -479,14 +462,6 @@ no metadata is written.
|
||||
|
||||
Set the output method to OpenStack. See L<virt-v2v-output-openstack(1)>.
|
||||
|
||||
@ -417,7 +417,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=item B<-o> B<qemu>
|
||||
|
||||
Set the output method to I<qemu>.
|
||||
@@ -484,40 +459,6 @@ This is similar to I<-o local>, except that a shell script is written
|
||||
@@ -495,40 +470,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>.
|
||||
|
||||
@ -458,7 +458,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=item B<-oa> B<sparse>
|
||||
|
||||
=item B<-oa> B<preallocated>
|
||||
@@ -580,117 +521,11 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set optional
|
||||
@@ -591,117 +532,11 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set optional
|
||||
OpenStack authentication. For example I<-oo os-username=>NAME is
|
||||
equivalent to C<openstack --os-username=NAME>.
|
||||
|
||||
@ -576,7 +576,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=item B<-op> file
|
||||
|
||||
Supply a file containing a password to be used when connecting to the
|
||||
@@ -708,28 +543,8 @@ For I<-o libvirt>, this is a libvirt directory pool
|
||||
@@ -719,28 +554,8 @@ 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.
|
||||
|
||||
@ -605,7 +605,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=item B<--print-source>
|
||||
|
||||
Print information about the source guest and stop. This option is
|
||||
@@ -1287,26 +1102,6 @@ require either root or a special user:
|
||||
@@ -1302,26 +1117,6 @@ require either root or a special user:
|
||||
|
||||
=over 4
|
||||
|
||||
@ -632,7 +632,7 @@ index b94fc8b5..f96fd69f 100644
|
||||
=item Writing to libvirt
|
||||
|
||||
When using I<-o libvirt>, you may need to run virt-v2v as root so that
|
||||
@@ -1413,7 +1208,6 @@ virt-v2v binary. Typical output looks like this:
|
||||
@@ -1428,7 +1223,6 @@ virt-v2v binary. Typical output looks like this:
|
||||
virt-v2v
|
||||
libguestfs-rewrite
|
||||
colours-option
|
||||
@ -3565,7 +3565,7 @@ index cd500574..00000000
|
||||
-
|
||||
-# Otherwise everything is OK, exit with no error.
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 1ec1a702..955d08a0 100644
|
||||
index b41fed7f..2cf57248 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -70,8 +70,6 @@ TESTS = \
|
||||
@ -3587,7 +3587,7 @@ index 1ec1a702..955d08a0 100644
|
||||
test-v2v-oa-option-qcow2.sh \
|
||||
test-v2v-oa-option-raw.sh \
|
||||
test-v2v-of-option.sh \
|
||||
@@ -256,16 +251,6 @@ EXTRA_DIST += \
|
||||
@@ -258,16 +253,6 @@ EXTRA_DIST += \
|
||||
test-v2v-o-null.sh \
|
||||
test-v2v-o-openstack.sh \
|
||||
test-v2v-o-qemu.sh \
|
||||
@ -4156,7 +4156,7 @@ index 15d5d028..00000000
|
||||
- -os Storage
|
||||
diff --git a/tests/test-v2v-o-rhv.ovf.expected b/tests/test-v2v-o-rhv.ovf.expected
|
||||
deleted file mode 100644
|
||||
index 25e492fd..00000000
|
||||
index 4f437d88..00000000
|
||||
--- a/tests/test-v2v-o-rhv.ovf.expected
|
||||
+++ /dev/null
|
||||
@@ -1,113 +0,0 @@
|
||||
@ -4185,12 +4185,12 @@ index 25e492fd..00000000
|
||||
- <IsAutoSuspend>False</IsAutoSuspend>
|
||||
- <TimeZone/>
|
||||
- <IsStateless>False</IsStateless>
|
||||
- <VmType>0</VmType>
|
||||
- <VmType>1</VmType>
|
||||
- <DefaultDisplayType>2</DefaultDisplayType>
|
||||
- <BiosType>1</BiosType>
|
||||
- <Section ovf:id='#VM_ID#' ovf:required='false' xsi:type='ovf:OperatingSystemSection_Type'>
|
||||
- <Info>Microsoft Windows 7 Phony Edition</Info>
|
||||
- <Description>Windows7</Description>
|
||||
- <Info>Windows Server 2022 Phony Edition</Info>
|
||||
- <Description>windows_2022</Description>
|
||||
- </Section>
|
||||
- <Section xsi:type='ovf:VirtualHardwareSection_Type'>
|
||||
- <Info>1 CPU, 1024 Memory</Info>
|
||||
@ -4415,7 +4415,7 @@ index 7d4cae4e..00000000
|
||||
-rm $f
|
||||
diff --git a/tests/test-v2v-o-vdsm-options.ovf.expected b/tests/test-v2v-o-vdsm-options.ovf.expected
|
||||
deleted file mode 100644
|
||||
index 23ca180f..00000000
|
||||
index 9f71a44e..00000000
|
||||
--- a/tests/test-v2v-o-vdsm-options.ovf.expected
|
||||
+++ /dev/null
|
||||
@@ -1,113 +0,0 @@
|
||||
@ -4444,12 +4444,12 @@ index 23ca180f..00000000
|
||||
- <IsAutoSuspend>False</IsAutoSuspend>
|
||||
- <TimeZone/>
|
||||
- <IsStateless>False</IsStateless>
|
||||
- <VmType>0</VmType>
|
||||
- <VmType>1</VmType>
|
||||
- <DefaultDisplayType>2</DefaultDisplayType>
|
||||
- <BiosType>1</BiosType>
|
||||
- <OperatingSystemSection ovf:id='VM' ovf:required='false' ovirt:id='11'>
|
||||
- <Info>Microsoft Windows 7 Phony Edition</Info>
|
||||
- <Description>Windows7</Description>
|
||||
- <OperatingSystemSection ovf:id='VM' ovf:required='false' ovirt:id='37'>
|
||||
- <Info>Windows Server 2022 Phony Edition</Info>
|
||||
- <Description>windows_2022</Description>
|
||||
- </OperatingSystemSection>
|
||||
- <VirtualHardwareSection>
|
||||
- <Info>1 CPU, 1024 Memory</Info>
|
||||
@ -4635,7 +4635,7 @@ index e8f8c538..00000000
|
||||
-diff -u "$srcdir/test-v2v-o-vdsm-options.ovf.expected" \
|
||||
- "$OVF"
|
||||
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
||||
index 64a0147c..35133b08 100644
|
||||
index d09c200c..8be1e5cb 100644
|
||||
--- a/v2v/v2v.ml
|
||||
+++ b/v2v/v2v.ml
|
||||
@@ -201,11 +201,7 @@ let rec main () =
|
||||
@ -4678,7 +4678,7 @@ index 64a0147c..35133b08 100644
|
||||
[ L"vmtype" ], Getopt.String ("-", vmtype_warning),
|
||||
s_"Ignored for backwards compatibility";
|
||||
] in
|
||||
@@ -306,9 +290,6 @@ let rec main () =
|
||||
@@ -314,9 +298,6 @@ let rec main () =
|
||||
|
||||
virt-v2v -ic vpx://vcenter.example.com/Datacenter/esxi -os imported esx_guest
|
||||
|
||||
@ -4688,7 +4688,7 @@ index 64a0147c..35133b08 100644
|
||||
virt-v2v -i libvirtxml guest-domain.xml -o local -os /var/tmp
|
||||
|
||||
virt-v2v -i disk disk.img -o local -os /var/tmp
|
||||
@@ -370,7 +351,6 @@ read the man page virt-v2v(1).
|
||||
@@ -380,7 +361,6 @@ read the man page virt-v2v(1).
|
||||
pr "vcenter-https\n";
|
||||
pr "vddk\n";
|
||||
pr "colours-option\n";
|
||||
@ -4696,7 +4696,7 @@ index 64a0147c..35133b08 100644
|
||||
pr "io/oo\n";
|
||||
pr "mac-option\n";
|
||||
pr "bandwidth-option\n";
|
||||
@@ -386,9 +366,6 @@ read the man page virt-v2v(1).
|
||||
@@ -397,9 +377,6 @@ read the man page virt-v2v(1).
|
||||
pr "output:null\n";
|
||||
pr "output:openstack\n";
|
||||
pr "output:qemu\n";
|
||||
@ -4706,7 +4706,7 @@ index 64a0147c..35133b08 100644
|
||||
pr "convert:linux\n";
|
||||
pr "convert:windows\n";
|
||||
List.iter (pr "ovf:%s\n") Create_ovf.ovf_flavours;
|
||||
@@ -473,10 +450,7 @@ read the man page virt-v2v(1).
|
||||
@@ -484,10 +461,7 @@ read the man page virt-v2v(1).
|
||||
| `Null -> (module Output_null.Null)
|
||||
| `QEmu -> (module Output_qemu.QEMU)
|
||||
| `Kubevirt -> (module Output_kubevirt.Kubevirt)
|
||||
@ -4718,7 +4718,7 @@ index 64a0147c..35133b08 100644
|
||||
|
||||
let output_options = {
|
||||
Output.output_alloc = output_alloc;
|
||||
@@ -501,7 +475,6 @@ read the man page virt-v2v(1).
|
||||
@@ -512,7 +486,6 @@ read the man page virt-v2v(1).
|
||||
*)
|
||||
let remove_serial_console =
|
||||
match output_mode with
|
@ -1,4 +1,4 @@
|
||||
From 2a8788ae6bdb392ee12e0e66a7b0c9faef20eb44 Mon Sep 17 00:00:00 2001
|
||||
From 86c4f39cdbf53b5e874eb7da3ddc199072db2153 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
|
||||
@ -9,10 +9,10 @@ Fixes: https://issues.redhat.com/browse/RHEL-40903
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/in-place/in_place.ml b/in-place/in_place.ml
|
||||
index 1c690a54..a70e812b 100644
|
||||
index 2dc406e2..9d24de78 100644
|
||||
--- a/in-place/in_place.ml
|
||||
+++ b/in-place/in_place.ml
|
||||
@@ -197,6 +197,9 @@ read the man page virt-v2v-in-place(1).
|
||||
@@ -206,6 +206,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;
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 094592e713b0e5c3e012cdd11901b573287d14f4 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 27 Aug 2024 12:36:41 +0100
|
||||
Subject: [PATCH] convert: windows: Online all virtio disks at first boot
|
||||
|
||||
Windows 2022 (and possibly earlier versions back to around 2019) will
|
||||
force offline any non-boot disks which change bus, apparently as a
|
||||
security mitigation. The effect of this is that although the system
|
||||
drive (C:) is present after conversion, other drives may seem to
|
||||
disappear.
|
||||
|
||||
Running a Powershell script to bring all disks online seems risky.
|
||||
The compromise is to bring online only virtio disks at first boot.
|
||||
|
||||
To further reduce risk, we only do this if there are non-system disks
|
||||
(ie. > 1 disks in total), and only if we installed virtio drivers.
|
||||
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-55763
|
||||
Fixes: https://issues.redhat.com/browse/RHEL-55837
|
||||
Related: https://issues.redhat.com/browse/MTV-1299
|
||||
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1662286
|
||||
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
|
||||
Thanks: Martin Necas
|
||||
Acked-by: Martin Necas
|
||||
(cherry picked from commit cb56f6f94dc153051515fc7aa0d9ca646f5e2340)
|
||||
---
|
||||
convert/convert_windows.ml | 39 +++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 38 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
|
||||
index 52ca5bbe..352e1218 100644
|
||||
--- a/convert/convert_windows.ml
|
||||
+++ b/convert/convert_windows.ml
|
||||
@@ -38,7 +38,8 @@ module G = Guestfs
|
||||
* time the Windows VM is booted on KVM.
|
||||
*)
|
||||
|
||||
-let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
|
||||
+let convert (g : G.guestfs) source inspect i_firmware
|
||||
+ block_driver _ static_ips =
|
||||
(*----------------------------------------------------------------------*)
|
||||
(* Inspect the Windows guest. *)
|
||||
|
||||
@@ -272,6 +273,8 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
|
||||
Registry.with_hive_write g inspect.i_windows_software_hive
|
||||
update_software_hive;
|
||||
|
||||
+ configure_online_disks block_driver;
|
||||
+
|
||||
configure_network_interfaces net_driver;
|
||||
|
||||
fix_ntfs_heads ();
|
||||
@@ -668,6 +671,40 @@ let convert (g : G.guestfs) _ inspect i_firmware block_driver _ static_ips =
|
||||
warning (f_"could not find registry key \
|
||||
HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion")
|
||||
|
||||
+ and configure_online_disks block_driver =
|
||||
+ (* If there are > 1 disks, run a script which will force Windows
|
||||
+ * to bring them all online. Windows 2022 will offline non-boot disks
|
||||
+ * where the bus changes as some sort of "security" mitigation.
|
||||
+ * https://issues.redhat.com/browse/RHEL-55837
|
||||
+ * https://issues.redhat.com/browse/MTV-1299
|
||||
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1662286
|
||||
+ *)
|
||||
+ let virtio_installed =
|
||||
+ match block_driver with
|
||||
+ | Inject_virtio_win.Virtio_blk | Virtio_SCSI -> true
|
||||
+ | IDE -> false in
|
||||
+ let more_than_one_disk = List.length source.s_disks > 1 in
|
||||
+
|
||||
+ if virtio_installed && more_than_one_disk then (
|
||||
+ let psh_filename = "online-disks" in
|
||||
+ let psh = ref [] in
|
||||
+ let add = List.push_back psh in
|
||||
+
|
||||
+ add "# Uncomment this line for lots of debug output.";
|
||||
+ add "# Set-PSDebug -Trace 1";
|
||||
+ add "";
|
||||
+ add "Write-Host \"Online all virtio disks\"";
|
||||
+ add "";
|
||||
+ add "Get-Disk | Where { $_.FriendlyName -like '*VirtIO*' } | % {";
|
||||
+ add " Write-Host (' - ' + $_.Number + ': ' + $_.FriendlyName + '(' + [math]::Round($_.Size/1GB,2) + 'GB)')";
|
||||
+ add " $_ | Set-Disk -IsOffline $false";
|
||||
+ add " $_ | Set-Disk -IsReadOnly $false";
|
||||
+ add "}";
|
||||
+
|
||||
+ (* Install the Powershell script to run late at firstboot. *)
|
||||
+ Firstboot.add_firstboot_powershell g inspect.i_root psh_filename !psh
|
||||
+ )
|
||||
+
|
||||
and configure_network_interfaces net_driver =
|
||||
(* If we were asked to force network interfaces to have particular
|
||||
* static IP addresses then it is done here by installing a
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (virt-v2v-2.5.6.tar.gz) = 86cc41042518d1ea62627c6fa0605f42dcc397e7ddc3c549bcdc3f54e3703426c14f8b42e102483afb0fad818ff569e1440042c624e9fecf3d04f14233b7a3f5
|
||||
SHA512 (virt-v2v-2.5.6.tar.gz.sig) = 39d7fcdb88b1abe325b3f3c2e8bda506fb8ecf41d5adb09e7c6bcd84f881cb73a897c1556735c49e420955ae0cc79614c42930495088d8ae6a3bc0cf39ff93f9
|
||||
SHA512 (virt-v2v-2.6.0.tar.gz) = bc7ecf99e66bae057eaf5d7c82ca38ded4aa6ef8732544bc7079f2894c9c79542a415fede02cf8c2cb7e83756683457c705f816b1da57e5ca9565350b9376a73
|
||||
SHA512 (virt-v2v-2.6.0.tar.gz.sig) = 630166caf41d48ac2efca646611248263e58a4e7e644a7606b647911164a39a449ae3916d05248d48e80925f3f9179b1cfb850001b0f3dd30a48c301d62b11a0
|
||||
|
@ -2,12 +2,12 @@
|
||||
%global verify_tarball_signature 1
|
||||
|
||||
# The source directory.
|
||||
%global source_directory 2.5-development
|
||||
%global source_directory 2.6-stable
|
||||
|
||||
Name: virt-v2v
|
||||
Epoch: 1
|
||||
Version: 2.5.6
|
||||
Release: 2%{?dist}
|
||||
Version: 2.6.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Convert a virtual machine to run on KVM
|
||||
|
||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||
@ -27,27 +27,19 @@ Source3: copy-patches.sh
|
||||
# https://github.com/libguestfs/virt-v2v/commits/rhel-10.0
|
||||
|
||||
# Patches.
|
||||
Patch0001: 0001-docs-Note-that-mac-len-field-is-now-optional.patch
|
||||
Patch0002: 0002-convert-More-robust-qemu-ga-installation-change-path.patch
|
||||
Patch0003: 0003-common-mlcustomize-Inject-qemu-ga-blnsvr-into-firstb.patch
|
||||
Patch0004: 0004-docs-Add-a-note-about-removal-of-VMware-Tools-on-Win.patch
|
||||
Patch0005: 0005-Update-common-submodule.patch
|
||||
Patch0006: 0006-Pull-in-a-fix-to-make-Windows-firstboot-more-reliabl.patch
|
||||
Patch0007: 0007-docs-Restate-position-on-removal-of-VMware-Tools.patch
|
||||
Patch0008: 0008-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
|
||||
Patch0009: 0009-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
|
||||
Patch0010: 0010-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
|
||||
Patch0011: 0011-RHEL-Fixes-for-libguestfs-winsupport.patch
|
||||
Patch0012: 0012-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
|
||||
Patch0013: 0013-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
|
||||
Patch0014: 0014-RHEL-Remove-input-from-Xen.patch
|
||||
Patch0015: 0015-RHEL-Remove-o-glance.patch
|
||||
Patch0016: 0016-RHEL-Remove-the-in-place-option.patch
|
||||
Patch0017: 0017-RHEL-tests-Remove-btrfs-test.patch
|
||||
Patch0018: 0018-RHEL-Remove-block-driver-option.patch
|
||||
Patch0019: 0019-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch
|
||||
Patch0020: 0020-RHEL-Add-warning-about-virt-v2v-in-place-not-being-s.patch
|
||||
Patch0021: 0021-convert-windows-Online-all-virtio-disks-at-first-boo.patch
|
||||
Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
|
||||
Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch
|
||||
Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
|
||||
Patch0004: 0004-RHEL-Fixes-for-libguestfs-winsupport.patch
|
||||
Patch0005: 0005-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
|
||||
Patch0006: 0006-RHEL-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-Remove-the-in-place-option.patch
|
||||
Patch0010: 0010-RHEL-tests-Remove-btrfs-test.patch
|
||||
Patch0011: 0011-RHEL-Remove-block-driver-option.patch
|
||||
Patch0012: 0012-RHEL-Remove-o-rhv-o-rhv-upload-and-o-vdsm-modes.patch
|
||||
Patch0013: 0013-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
|
||||
@ -313,9 +305,7 @@ done
|
||||
%{_mandir}/man1/virt-v2v-output-rhv.1*
|
||||
%endif
|
||||
%{_mandir}/man1/virt-v2v-release-notes-1.42.1*
|
||||
%{_mandir}/man1/virt-v2v-release-notes-2.0.1*
|
||||
%{_mandir}/man1/virt-v2v-release-notes-2.2.1*
|
||||
%{_mandir}/man1/virt-v2v-release-notes-2.4.1*
|
||||
%{_mandir}/man1/virt-v2v-release-notes-2.*.1*
|
||||
%{_mandir}/man1/virt-v2v-support.1*
|
||||
|
||||
|
||||
@ -335,6 +325,10 @@ done
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Oct 09 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.6.0-1
|
||||
- Rebase to virt-v2v 2.6.0
|
||||
resolves: RHEL-56814
|
||||
|
||||
* Wed Aug 28 2024 Richard W.M. Jones <rjones@redhat.com> - 1:2.5.6-2
|
||||
- convert: windows: Online all virtio disks at first boot
|
||||
resolves: RHEL-56318
|
||||
|
Loading…
Reference in New Issue
Block a user