Rebase to modular virt-v2v 1.45.91

Add pending upstream patches (v2) for 1961107.
resolves: rhbz#2011713

--

Original commit messages:

prepare dist-git branch for rebase to 1.45.91 by Laszlo

Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Take some spec file mods from "Virt-v2v 2.0 modular test 9." by Rich

Origin: Message-Id: <20211114151337.880321-1-rjones@redhat.com>.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

refresh patch list, %changelog, Release, for 1.45.91 + RHBZ#1961107 v2

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Laszlo Ersek 2021-11-16 14:37:34 +01:00 committed by Richard W.M. Jones
parent bf62f786b9
commit cd77acc433
33 changed files with 2143 additions and 772 deletions

View File

@ -0,0 +1,33 @@
From 271f1950fb7d9bac5fd7f5b4c6485df8ae764e68 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
(RHBZ#1147313).
RHEL does not have qemu-system-x86_64 (etc), and in addition the
qemu binary is located in /usr/libexec. Encode the path to this
binary directly in the script.
Note that we don't support people running qemu directly like this.
It's just for quick testing of converted VMs, and to help us with
support cases.
---
output/output.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/output.ml b/output/output.ml
index 9c2d8853bfef..92b035259b0f 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1413,7 +1413,7 @@ and qemu_finalize dir source inspect target_meta
* module deals with shell and qemu comma quoting.
*)
let cmd = Qemuopts.create () in
- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch);
+ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm";
let flag = Qemuopts.flag cmd
and arg = Qemuopts.arg cmd
--
2.19.1.3.g30247aa5d201

View File

@ -1,123 +0,0 @@
From 4d5509a98823cc0b8930678716b862adbd2c0b81 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 6 Aug 2021 13:01:28 +0100
Subject: [PATCH 01/12] Revert "v2v: Remove -o rhv-upload -oa preallocated"
This reverts commit 18084f90d9dd9092831cb3487039328981796291.
---
v2v/cmdline.ml | 2 +-
v2v/output_rhv_upload.ml | 22 ++++++++++++++++++++--
v2v/output_rhv_upload.mli | 7 ++++---
v2v/rhv-upload-transfer.py | 1 +
4 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index 79d943df..5e7c01f8 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -699,7 +699,7 @@ read the man page virt-v2v(1).
| Some os -> os in
if qemu_boot then
error_option_cannot_be_used_in_output_mode "rhv-upload" "--qemu-boot";
- Output_rhv_upload.output_rhv_upload output_conn
+ Output_rhv_upload.output_rhv_upload output_alloc output_conn
output_password os
rhv_options,
output_format, output_alloc
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 6a632eaa..50baa595 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -146,11 +146,22 @@ let error_unless_nbdkit_compiled_with_selinux config =
error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.")
)
+(* Output sparse must be sparse. We may be able to
+ * lift this limitation in future, but it requires changes on the
+ * RHV side. See TODO file for details. XXX
+ *)
+let error_current_limitation required_param =
+ error (f_"rhv-upload: currently you must use %s. This restriction will be loosened in a future version.") required_param
+
+let error_unless_output_alloc_sparse output_alloc =
+ if output_alloc <> Sparse then
+ error_current_limitation "-oa sparse"
+
let json_optstring = function
| Some s -> JSON.String s
| None -> JSON.Null
-class output_rhv_upload output_conn
+class output_rhv_upload output_alloc output_conn
output_password output_storage
rhv_options =
(* Create a temporary directory which will be deleted on exit. *)
@@ -189,6 +200,9 @@ class output_rhv_upload output_conn
"output_conn", JSON.String output_conn;
"output_password", JSON.String output_password;
"output_storage", JSON.String output_storage;
+ "output_sparse", JSON.Bool (match output_alloc with
+ | Sparse -> true
+ | Preallocated -> false);
"rhv_cafile", json_optstring rhv_options.rhv_cafile;
"rhv_cluster",
JSON.String (Option.default "Default" rhv_options.rhv_cluster);
@@ -257,6 +271,7 @@ object
error_unless_nbdkit_min_version config;
error_unless_nbdkit_python_plugin_working plugin_script;
error_unless_nbdkit_compiled_with_selinux config;
+ error_unless_output_alloc_sparse output_alloc;
(* Python code prechecks. *)
let json_params = match rhv_options.rhv_disk_uuids with
@@ -282,6 +297,9 @@ object
method as_options =
"-o rhv-upload" ^
+ (match output_alloc with
+ | Sparse -> "" (* default, don't need to print it *)
+ | Preallocated -> " -oa preallocated") ^
sprintf " -oc %s -op %s -os %s"
output_conn output_password output_storage
@@ -449,7 +467,7 @@ object
(* Create the metadata. *)
let ovf =
Create_ovf.create_ovf source inspect target_meta targets
- Sparse sd_uuid disk_uuids vol_uuids vm_uuid
+ output_alloc sd_uuid disk_uuids vol_uuids vm_uuid
OVirt in
let ovf = DOM.doc_to_string ovf in
diff --git a/v2v/output_rhv_upload.mli b/v2v/output_rhv_upload.mli
index 01507dff..eb85a57d 100644
--- a/v2v/output_rhv_upload.mli
+++ b/v2v/output_rhv_upload.mli
@@ -25,8 +25,9 @@ val print_output_options : unit -> unit
val parse_output_options : (string * string) list -> rhv_options
(** Print and parse rhv-upload -oo options. *)
-val output_rhv_upload : string -> string -> string -> rhv_options ->
- Types.output
-(** [output_rhv_upload output_conn output_password output_storage rhv_options]
+val output_rhv_upload : Types.output_allocation -> string -> string ->
+ string -> rhv_options -> Types.output
+(** [output_rhv_upload output_alloc output_conn output_password output_storage
+ rhv_options]
creates and returns a new {!Types.output} object specialized for writing
output to oVirt or RHV directly via RHV APIs. *)
diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py
index cf4f8807..5aebcd1d 100644
--- a/v2v/rhv-upload-transfer.py
+++ b/v2v/rhv-upload-transfer.py
@@ -111,6 +111,7 @@ def create_disk(connection):
# size, based on qemu-img measure of the overlay.
initial_size=params['disk_size'],
provisioned_size=params['disk_size'],
+ # XXX Ignores params['output_sparse'].
# Handling this properly will be complex, see:
# https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html
sparse=True,
--
2.31.1

View File

@ -1,7 +1,7 @@
From bb55b78b68e6e8039734eb1d7af22b455f8fbdc2 Mon Sep 17 00:00:00 2001
From 19d1100a7b944babdf1e3ba4fae170d31802ad59 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 04/12] RHEL: v2v: Disable the --qemu-boot option
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
(RHBZ#1147313).
This cannot work because there is no Gtk or SDL output mode
@ -10,13 +10,41 @@ in RHEL's qemu-kvm.
In addition you will have to edit the -display option in the
qemu script.
---
output/output.ml | 3 +++
v2v/v2v.ml | 2 --
docs/virt-v2v-output-local.pod | 6 ++----
docs/virt-v2v.pod | 13 -------------
v2v/cmdline.ml | 3 ++-
3 files changed, 4 insertions(+), 18 deletions(-)
docs/virt-v2v.pod | 12 ------------
4 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index 92b035259b0f..1414a5214a8a 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1346,6 +1346,9 @@ and qemu_parse_options cmdline =
) cmdline.output_options;
let qemu_boot = !qemu_boot in
+ if qemu_boot then
+ error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL");
+
(* -os must be set to a directory. *)
let output_storage =
match cmdline.output_storage with
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index a88e0509bf10..1104295c0a1e 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -218,8 +218,6 @@ let rec main () =
s_"Same as -ip filename";
[ L"print-source" ], Getopt.Set print_source,
s_"Print source and stop";
- [ L"qemu-boot" ], Getopt.Unit (fun () -> add_o_option "-oo" "qemu-boot"),
- s_"Boot in qemu (-o qemu only)";
[ L"root" ], Getopt.String ("ask|... ", add_conv_option "--root"),
s_"How to choose root filesystem";
[ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
index a5f155cb..3a2e6238 100644
index a5f155cbc4a4..3a2e62389604 100644
--- a/docs/virt-v2v-output-local.pod
+++ b/docs/virt-v2v-output-local.pod
@@ -9,7 +9,7 @@ or libvirt
@ -43,7 +71,7 @@ index a5f155cb..3a2e6238 100644
=item B<-o json -os> C<DIRECTORY>
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index bdf4d716..83f6fd4d 100644
index b25d678d7bd0..0a47b6114047 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -141,11 +141,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
@ -53,54 +81,32 @@ index bdf4d716..83f6fd4d 100644
-To convert a local disk image and immediately boot it in local
-qemu, do:
-
- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot
- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot
-
=head1 OPTIONS
=over 4
@@ -528,9 +523,6 @@ This is similar to I<-o local>, except that a shell script is written
@@ -511,9 +506,6 @@ This is similar to I<-o local>, except that a shell script is written
which you can use to boot the guest in qemu. The converted disks and
shell script are written to the directory specified by I<-os>.
-When using this output mode, you can also specify the I<--qemu-boot>
-When using this output mode, you can also specify the I<-oo qemu-boot>
-option which boots the guest under qemu immediately.
-
=item B<-o> B<rhev>
This is the same as I<-o rhv>.
@@ -775,11 +767,6 @@ Print information about the source guest and stop. This option is
@@ -769,10 +761,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>.
-=item B<--qemu-boot>
-
-When using I<-o qemu> only, this boots the guest immediately after
-virt-v2v finishes.
-This is the same as I<-oo qemu-boot>.
-
=item B<-q>
=item B<--quiet>
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index 5e7c01f8..ac10ec31 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -276,7 +276,6 @@ let parse_cmdline () =
s_"Same as -ip filename";
[ L"print-source" ], Getopt.Set print_source,
s_"Print source and stop";
- [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)";
[ L"root" ], Getopt.String ("ask|... ", set_root_choice),
s_"How to choose root filesystem";
[ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
@@ -652,6 +651,8 @@ read the man page virt-v2v(1).
| Some d when not (is_directory d) ->
error (f_"-os %s: output directory does not exist or is not a directory") d
| Some d -> d in
+ if qemu_boot then
+ error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL");
Output_qemu.output_qemu os qemu_boot,
output_format, output_alloc
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -1,90 +0,0 @@
From abe3c7539b6221e8ab3cc35ee3d58b1aa06bbef4 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 14 May 2018 10:16:58 +0100
Subject: [PATCH 02/12] RHEL: v2v: rhv-upload: Remove restriction on -oa
sparse.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681
and the v2v-devel private thread "Do we already support migration using FC?"
---
docs/virt-v2v-output-rhv.pod | 8 +-------
v2v/output_rhv_upload.ml | 10 +---------
v2v/rhv-upload-transfer.py | 4 +---
3 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/docs/virt-v2v-output-rhv.pod b/docs/virt-v2v-output-rhv.pod
index dc6b2c0a..7b8fdc0f 100644
--- a/docs/virt-v2v-output-rhv.pod
+++ b/docs/virt-v2v-output-rhv.pod
@@ -5,7 +5,7 @@ virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV
=head1 SYNOPSIS
virt-v2v [-i* options] -o rhv-upload [-oc ENGINE_URL] -os STORAGE
- [-op PASSWORD] [-of raw]
+ [-op PASSWORD]
[-oo rhv-cafile=FILE]
[-oo rhv-cluster=CLUSTER]
[-oo rhv-direct]
@@ -79,12 +79,6 @@ username is not specified then virt-v2v defaults to using
C<admin@internal> which is the typical superuser account for oVirt
instances.
-=item I<-of raw>
-
-Currently you must use I<-of raw> and you cannot use I<-oa preallocated>.
-
-These restrictions will be loosened in a future version.
-
=item I<-op> F<password-file>
A file containing a password to be used when connecting to the oVirt
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 50baa595..be5e9851 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -146,17 +146,10 @@ let error_unless_nbdkit_compiled_with_selinux config =
error (f_"nbdkit was compiled without SELinux support. You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.")
)
-(* Output sparse must be sparse. We may be able to
- * lift this limitation in future, but it requires changes on the
- * RHV side. See TODO file for details. XXX
- *)
+(* Output format must be raw. *)
let error_current_limitation required_param =
error (f_"rhv-upload: currently you must use %s. This restriction will be loosened in a future version.") required_param
-let error_unless_output_alloc_sparse output_alloc =
- if output_alloc <> Sparse then
- error_current_limitation "-oa sparse"
-
let json_optstring = function
| Some s -> JSON.String s
| None -> JSON.Null
@@ -271,7 +264,6 @@ object
error_unless_nbdkit_min_version config;
error_unless_nbdkit_python_plugin_working plugin_script;
error_unless_nbdkit_compiled_with_selinux config;
- error_unless_output_alloc_sparse output_alloc;
(* Python code prechecks. *)
let json_params = match rhv_options.rhv_disk_uuids with
diff --git a/v2v/rhv-upload-transfer.py b/v2v/rhv-upload-transfer.py
index 5aebcd1d..f38cd9c0 100644
--- a/v2v/rhv-upload-transfer.py
+++ b/v2v/rhv-upload-transfer.py
@@ -111,10 +111,8 @@ def create_disk(connection):
# size, based on qemu-img measure of the overlay.
initial_size=params['disk_size'],
provisioned_size=params['disk_size'],
- # XXX Ignores params['output_sparse'].
- # Handling this properly will be complex, see:
# https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html
- sparse=True,
+ sparse=params['output_sparse'],
storage_domains=[
types.StorageDomain(
name=params['output_storage'],
--
2.31.1

View File

@ -1,17 +1,17 @@
From 49385571ce5967f8d9a102e935f201ee9c22326d Mon Sep 17 00:00:00 2001
From c8e24e2471e44965671ab059d0d3ac9e9f5492f6 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 05/12] RHEL: Fix list of supported sound cards to match RHEL
qemu (RHBZ#1176493).
Subject: [PATCH] RHEL: Fix list of supported sound cards to match RHEL qemu
(RHBZ#1176493).
---
v2v/utils.ml | 5 +++--
lib/utils.ml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/v2v/utils.ml b/v2v/utils.ml
index 7136e4be..a6c359f0 100644
--- a/v2v/utils.ml
+++ b/v2v/utils.ml
diff --git a/lib/utils.ml b/lib/utils.ml
index 1eac3f3f71c8..a478fc330e25 100644
--- a/lib/utils.ml
+++ b/lib/utils.ml
@@ -59,13 +59,14 @@ let kvm_arch = function
(* Does qemu support the given sound card? *)
let qemu_supports_sound_card = function
@ -30,5 +30,5 @@ index 7136e4be..a6c359f0 100644
(* Find the UEFI firmware. *)
let find_uefi_firmware guest_arch =
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -1,33 +0,0 @@
From 0839ba57487b73cfb684ea495280db5d946f667a 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 03/12] RHEL: v2v: Select correct qemu binary for -o qemu mode
(RHBZ#1147313).
RHEL does not have qemu-system-x86_64 (etc), and in addition the
qemu binary is located in /usr/libexec. Encode the path to this
binary directly in the script.
Note that we don't support people running qemu directly like this.
It's just for quick testing of converted VMs, and to help us with
support cases.
---
v2v/output_qemu.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml
index 12c56836..7391eda0 100644
--- a/v2v/output_qemu.ml
+++ b/v2v/output_qemu.ml
@@ -79,7 +79,7 @@ object
* module deals with shell and qemu comma quoting.
*)
let cmd = Qemuopts.create () in
- Qemuopts.set_binary_by_arch cmd (Some guestcaps.gcaps_arch);
+ Qemuopts.set_binary cmd "/usr/libexec/qemu-kvm";
let flag = Qemuopts.flag cmd
and arg = Qemuopts.arg cmd
--
2.31.1

View File

@ -1,17 +1,44 @@
From db2150a5d790c35fb23c6d9d6b29e602482ce555 Mon Sep 17 00:00:00 2001
From d27f9d534f23f7a00a562f52901e102eacc78108 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 06/12] RHEL: Fix tests for libguestfs-winsupport.
Subject: [PATCH] RHEL: Fixes for libguestfs-winsupport.
It doesn't let us use guestfish for arbitrary Windows edits.
In tests we cannot use guestfish for arbitrary Windows edits.
In virt-v2v helpers we must set the program name to virt-v2v.
---
convert/convert.ml | 1 +
convert/windows_virtio.ml | 1 +
test-data/phony-guests/make-windows-img.sh | 1 +
tests/test-v2v-virtio-win-iso.sh | 8 +++++++-
tests/test-v2v-windows-conversion.sh | 8 +++++++-
3 files changed, 15 insertions(+), 2 deletions(-)
5 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/convert/convert.ml b/convert/convert.ml
index 2fc618420d06..2ca132d020c9 100644
--- a/convert/convert.ml
+++ b/convert/convert.ml
@@ -190,6 +190,7 @@ helper-v2v-convert V2VDIR
message (f_"Opening the source");
let g = open_guestfs ~identifier:"v2v" () in
+ g#set_program "virt-v2v";
g#set_memsize (g#get_memsize () * 2);
(* 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/convert/windows_virtio.ml b/convert/windows_virtio.ml
index 08db4ad6995c..25b455281bd2 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -297,6 +297,7 @@ and copy_from_virtio_win g inspect srcdir destdir filter missing =
let g2 =
try
let g2 = open_guestfs ~identifier:"virtio_win" () in
+ g#set_program "virt-v2v";
g2#add_drive_opts virtio_win ~readonly:true;
g2#launch ();
g2
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 30908a918c11..73cf5144e97d 100755
--- a/test-data/phony-guests/make-windows-img.sh
+++ b/test-data/phony-guests/make-windows-img.sh
@@ -37,6 +37,7 @@ fi
@ -23,7 +50,7 @@ index 30908a91..73cf5144 100755
run
diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh
index 69f6f414..b9b806fb 100755
index 69f6f414c252..b9b806fbc493 100755
--- a/tests/test-v2v-virtio-win-iso.sh
+++ b/tests/test-v2v-virtio-win-iso.sh
@@ -82,6 +82,12 @@ mktest ()
@ -47,7 +74,7 @@ index 69f6f414..b9b806fb 100755
+guestfish --ro -a "$d/windows-sda" < "$script" > "$response"
diff -u "$expected" "$response"
diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh
index aeab9a48..4b422c5b 100755
index aeab9a48b507..4b422c5bc9d8 100755
--- a/tests/test-v2v-windows-conversion.sh
+++ b/tests/test-v2v-windows-conversion.sh
@@ -76,6 +76,12 @@ mktest ()
@ -73,5 +100,5 @@ index aeab9a48..4b422c5b 100755
# We also update the Registry several times, for firstboot, and (ONLY
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,26 @@
From 14233352bd3f91a2fd7a0e4de82d04904182bf73 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)
The SDL output mode is not supported in RHEL's qemu-kvm.
---
input/input.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/input/input.ml b/input/input.ml
index c7ae8c5d96ce..c93de9381bff 100644
--- a/input/input.ml
+++ b/input/input.ml
@@ -270,7 +270,7 @@ and disk_source cmdline args =
s_features = [ "acpi"; "apic"; "pae" ];
s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *)
s_display =
- Some { s_display_type = Window; s_keymap = None; s_password = None;
+ Some { s_display_type = VNC; s_keymap = None; s_password = None;
s_listen = LNoListen; s_port = None };
s_video = None;
s_sound = None;
--
2.19.1.3.g30247aa5d201

View File

@ -1,7 +1,7 @@
From aa5cf3ba5d10400ee6d6c63dd77c711b6fdec116 Mon Sep 17 00:00:00 2001
From b80358bef6bfbccb452ade8b072281d21b6780f2 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 8 Mar 2017 11:03:40 +0100
Subject: [PATCH 09/12] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203)
Subject: [PATCH] RHEL: v2v: do not mention SUSE Xen hosts (RHBZ#1430203)
They are not supported in RHEL.
---
@ -9,7 +9,7 @@ They are not supported in RHEL.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/virt-v2v-input-xen.pod b/docs/virt-v2v-input-xen.pod
index cd3210bf..e9f336a9 100644
index cd3210bf67a0..e9f336a9b766 100644
--- a/docs/virt-v2v-input-xen.pod
+++ b/docs/virt-v2v-input-xen.pod
@@ -12,7 +12,7 @@ virt-v2v-input-xen - Using virt-v2v to convert guests from Xen
@ -22,5 +22,5 @@ index cd3210bf..e9f336a9 100644
=head1 INPUT FROM XEN
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -1,14 +1,14 @@
From ccaae02ef3f081b544eca82f3652ca50ac5566a9 Mon Sep 17 00:00:00 2001
From 1a8fe5bfa0ba3ed014d53f79fdbe844e41bc0889 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Tue, 26 Mar 2019 09:42:25 +0100
Subject: [PATCH 10/12] RHEL: point to KB for supported v2v hypervisors/guests
Subject: [PATCH] RHEL: point to KB for supported v2v hypervisors/guests
---
docs/virt-v2v-support.pod | 104 ++------------------------------------
1 file changed, 4 insertions(+), 100 deletions(-)
diff --git a/docs/virt-v2v-support.pod b/docs/virt-v2v-support.pod
index 9815f51f..1ffc0f9d 100644
index 9815f51f25ad..1ffc0f9d8270 100644
--- a/docs/virt-v2v-support.pod
+++ b/docs/virt-v2v-support.pod
@@ -8,106 +8,10 @@ systems and guests in virt-v2v
@ -123,5 +123,5 @@ index 9815f51f..1ffc0f9d 100644
=head2 Guest firmware
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -1,288 +0,0 @@
From 3b69cfa365c7b014ca81b09e857ab294cff04914 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 14 Jan 2016 11:53:42 -0500
Subject: [PATCH 07/12] RHEL: v2v: Disable the virt-v2v --in-place option.
This disables the virt-v2v --in-place option which we do not
wish to support in RHEL.
(See commit d0069559a939e47e5f29973ed9a69a13f0b58301).
---
docs/test-v2v-docs.sh | 1 +
docs/virt-v2v.pod | 50 +----------------
tests/Makefile.am | 2 -
tests/test-v2v-in-place.sh | 108 -------------------------------------
v2v/cmdline.ml | 8 +--
5 files changed, 8 insertions(+), 161 deletions(-)
delete mode 100755 tests/test-v2v-in-place.sh
diff --git a/docs/test-v2v-docs.sh b/docs/test-v2v-docs.sh
index 465df26f..ae1a6c68 100755
--- a/docs/test-v2v-docs.sh
+++ b/docs/test-v2v-docs.sh
@@ -30,6 +30,7 @@ $srcdir/../podcheck.pl virt-v2v.pod virt-v2v \
--debug-overlay,\
--ic,\
--if,\
+--in-place,\
--io,\
--ip,\
--it,\
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 83f6fd4d..719a95b5 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM
[-o mode] [other -o* options]
[guest|filename]
- virt-v2v --in-place
- [-i mode] [other -i* options]
- [guest|filename]
-
=head1 DESCRIPTION
Virt-v2v converts a single guest from a foreign hypervisor to run on
@@ -39,9 +35,6 @@ these sides of virt-v2v are documented separately in this manual.
Virt-v2v normally copies from the input to the output, called "copying
mode". In this case the source guest is always left unchanged.
-In-place conversion (I<--in-place>) only uses the I<-i*> options and
-modifies the source guest in-place. (See L</In-place conversion>
-below.)
=head2 Other virt-v2v topics
@@ -292,20 +285,6 @@ For I<-i disk> only, this specifies the format of the input disk
image. For other input methods you should specify the input
format in the metadata.
-=item B<--in-place>
-
-Do not create an output virtual machine in the target hypervisor.
-Instead, adjust the guest OS in the source VM to run in the input
-hypervisor.
-
-This mode is meant for integration with other toolsets, which take the
-responsibility of converting the VM configuration, providing for
-rollback in case of errors, transforming the storage, etc.
-
-See L</In-place conversion> below.
-
-Conflicts with all I<-o *> options.
-
=item B<-io> OPTION=VALUE
Set input option(s) related to the current input mode or transport.
@@ -1298,8 +1277,8 @@ have at least 100 available inodes.
=head3 Minimum free space check in the host
You must have sufficient free space in the host directory used to
-store large temporary overlays (except in I<--in-place> mode). To
-find out which directory this is, use:
+store large temporary overlays. To find out
+which directory this is, use:
$ df -h "`guestfish get-cachedir`"
Filesystem Size Used Avail Use% Mounted on
@@ -1437,31 +1416,6 @@ that instead.
</devices>
</domain>
-=head2 In-place conversion
-
-It is also possible to use virt-v2v in scenarios where a foreign VM
-has already been imported into a KVM-based hypervisor, but still needs
-adjustments in the guest to make it run in the new virtual hardware.
-
-In that case it is assumed that a third-party tool has created the
-target VM in the supported KVM-based hypervisor based on the source VM
-configuration and contents, but using virtual devices more appropriate
-for KVM (e.g. virtio storage and network, etc.).
-
-Then, to make the guest OS boot and run in the changed environment,
-one can use:
-
- virt-v2v -ic qemu:///system converted_vm --in-place
-
-Virt-v2v will analyze the configuration of C<converted_vm> in the
-C<qemu:///system> libvirt instance, and apply various fixups to the
-guest OS configuration to make it match the VM configuration. This
-may include installing virtio drivers, configuring the bootloader, the
-mountpoints, the network interfaces, and so on.
-
-Should an error occur during the operation, virt-v2v exits with an
-error code leaving the VM in an undefined state.
-
=head2 Machine readable output
The I<--machine-readable> option can be used to make the output more
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 41d38d30..9bbd86d6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -77,7 +77,6 @@ TESTS = \
test-v2v-floppy.sh \
test-v2v-i-disk.sh \
test-v2v-i-ova.sh \
- test-v2v-in-place.sh \
test-v2v-mac.sh \
test-v2v-machine-readable.sh \
test-v2v-networks-and-bridges.sh \
@@ -226,7 +225,6 @@ EXTRA_DIST += \
test-v2v-i-vmx-3.vmx \
test-v2v-i-vmx-4.vmx \
test-v2v-i-vmx-5.vmx \
- test-v2v-in-place.sh \
test-v2v-it-vddk-io-query.sh \
test-v2v-machine-readable.sh \
test-v2v-mac-expected.xml \
diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh
deleted file mode 100755
index 9da8fa63..00000000
--- a/tests/test-v2v-in-place.sh
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash -
-# libguestfs virt-v2v test script
-# Copyright (C) 2014 Red Hat Inc.
-# Copyright (C) 2015 Parallels IP Holdings GmbH.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Test --in-place.
-
-unset CDPATH
-export LANG=C
-set -e
-
-source ./functions.sh
-set -e
-set -x
-
-skip_if_skipped
-requires test -f ../test-data/phony-guests/windows.img
-
-img_base="$abs_top_builddir/test-data/phony-guests/windows.img"
-
-export VIRT_TOOLS_DATA_DIR="$srcdir/../test-data/fake-virt-tools"
-export VIRTIO_WIN="$srcdir/../test-data/fake-virtio-win"
-
-d=$PWD/test-v2v-in-place.d
-rm -rf $d
-cleanup_fn rm -r $d
-mkdir $d
-
-img="$d/test.qcow2"
-rm -f $img
-qemu-img create -f qcow2 -b $img_base -o compat=1.1,backing_fmt=raw $img
-md5="$(do_md5 $img_base)"
-
-libvirt_xml="$d/test.xml"
-rm -f $libvirt_xml
-n=windows-overlay
-cat > $libvirt_xml <<EOF
-<node>
- <domain type='test'>
- <name>$n</name>
- <memory>1048576</memory>
- <os>
- <type>hvm</type>
- <boot dev='hd'/>
- </os>
- <devices>
- <disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
- <source file='$img'/>
- <target dev='vda' bus='virtio'/>
- </disk>
- </devices>
- </domain>
-</node>
-EOF
-
-$VG virt-v2v --debug-gc -i libvirt -ic "test://$libvirt_xml" $n --in-place
-
-# Test that the drivers have been copied over into the guest
-script="$d/test.fish"
-expected="$d/expected"
-response="$d/response"
-
-mktest ()
-{
- local cmd="$1" exp="$2"
-
- echo "echo '$cmd'" >> "$script"
- echo "$cmd" >> "$expected"
-
- echo "$cmd" >> "$script"
- echo "$exp" >> "$expected"
-}
-
-:> "$script"
-:> "$expected"
-
-firstboot_dir="/Program Files/Guestfs/Firstboot"
-mktest "is-dir \"$firstboot_dir\"" true
-mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
-mktest "is-dir \"$firstboot_dir/scripts\"" true
-virtio_dir="/Windows/Drivers/VirtIO"
-mktest "is-dir \"$virtio_dir\"" true
-for drv in netkvm qxl vioscsi viostor; do
- for sfx in cat inf sys; do
- mktest "is-file \"$virtio_dir/$drv.$sfx\"" true
- done
-done
-
-guestfish --ro -a "$img" -i < "$script" > "$response"
-diff -u "$expected" "$response"
-
-# Test the base image remained untouched
-test "$md5" = "$(do_md5 $img_base)"
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index ac10ec31..01314580 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -246,8 +246,7 @@ let parse_cmdline () =
s_"Use password from file to connect to input hypervisor";
[ M"it" ], Getopt.String ("transport", set_string_option_once "-it" input_transport),
s_"Input transport";
- [ L"in-place" ], Getopt.Set in_place,
- s_"Only tune the guest in the input VM";
+ [ L"in-place" ], Getopt.Set in_place, Getopt.hidden_option_description;
[ L"mac" ], Getopt.String ("mac:network|bridge|ip:out", add_mac),
s_"Map NIC to network or bridge or assign static IP";
[ S 'n'; L"network" ], Getopt.String ("in:out", add_network),
@@ -386,7 +385,6 @@ read the man page virt-v2v(1).
pr "vddk\n";
pr "colours-option\n";
pr "vdsm-compat-option\n";
- pr "in-place\n";
pr "io/oo\n";
pr "mac-option\n";
pr "bandwidth-option\n";
@@ -556,6 +554,10 @@ read the man page virt-v2v(1).
error (f_"only -it ssh can be used here") in
Input_vmx.input_vmx input_password input_transport arg in
+ (* Prevent use of --in-place option in RHEL. *)
+ if in_place then
+ error (f_"--in-place cannot be used in RHEL");
+
(* Common error message. *)
let error_option_cannot_be_used_in_output_mode mode opt =
error (f_"-o %s: %s option cannot be used in this output mode") mode opt
--
2.31.1

View File

@ -1,19 +1,32 @@
From 7edb403ee54153c64205915c0bd1d177c0094ee0 Mon Sep 17 00:00:00 2001
From 8408ebda3022fa323ed7408c4f05b63d976ef2f7 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 11/12] RHEL 9: Disable -o glance
Subject: [PATCH] RHEL 9: Disable -o glance
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1977539
---
output/output.ml | 3 +-
docs/virt-v2v-output-openstack.pod | 56 ++----------------------------
docs/virt-v2v.pod | 22 ------------
docs/virt-v2v.pod | 20 -----------
tests/test-v2v-o-glance.sh | 3 ++
v2v/cmdline.ml | 3 --
v2v/output_glance.ml | 2 +-
5 files changed, 6 insertions(+), 80 deletions(-)
4 files changed, 7 insertions(+), 75 deletions(-)
diff --git a/output/output.ml b/output/output.ml
index 1414a5214a8a..69768ff1fd23 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -75,7 +75,8 @@ let rec main () =
error (f_"%s option used more than once on the command line") "-om";
match mode with
| "disk" -> output_mode := Some `Disk
- | "glance" -> output_mode := Some `Glance
+ | "glance" ->
+ error(f_"-o glance option has been removed from RHEL 9")
| "json" -> output_mode := Some `Json
| "libvirt" -> output_mode := Some `Libvirt
| "null" -> output_mode := Some `Null
diff --git a/docs/virt-v2v-output-openstack.pod b/docs/virt-v2v-output-openstack.pod
index f5a3abad..1ab356e8 100644
index f5a3abaddd4b..1ab356e85fb2 100644
--- a/docs/virt-v2v-output-openstack.pod
+++ b/docs/virt-v2v-output-openstack.pod
@@ -10,13 +10,10 @@ virt-v2v-output-openstack - Using virt-v2v to convert guests to OpenStack
@ -100,16 +113,10 @@ index f5a3abad..1ab356e8 100644
=head1 AUTHOR
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
index 719a95b5..2f4fe86c 100644
index 0a47b6114047..c70bfef59ddf 100644
--- a/docs/virt-v2v.pod
+++ b/docs/virt-v2v.pod
@@ -422,20 +422,10 @@ interested in looking at the metadata.
This option is not compatible with I<-o libvirt> since it would create
a faulty guest (one with no disks).
-This option is not compatible with I<-o glance> for technical reasons.
-
=item B<-o> B<disk>
@@ -432,14 +432,6 @@ See L</Networks and bridges> below.
This is the same as I<-o local>.
@ -124,7 +131,7 @@ index 719a95b5..2f4fe86c 100644
=item B<-o> B<json>
Set the output method to I<json>.
@@ -1148,11 +1138,6 @@ and output methods may use disk space, as outlined in the table below.
@@ -1163,11 +1155,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>).
@ -136,7 +143,7 @@ index 719a95b5..2f4fe86c 100644
=item I<-o local>
=item I<-o qemu>
@@ -1337,13 +1322,6 @@ instance.
@@ -1352,13 +1339,6 @@ 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.
@ -151,7 +158,7 @@ index 719a95b5..2f4fe86c 100644
This normally requires root. See the next section.
diff --git a/tests/test-v2v-o-glance.sh b/tests/test-v2v-o-glance.sh
index c0db9115..074b5e16 100755
index c0db911593a3..074b5e167e56 100755
--- a/tests/test-v2v-o-glance.sh
+++ b/tests/test-v2v-o-glance.sh
@@ -20,6 +20,9 @@
@ -164,37 +171,6 @@ index c0db9115..074b5e16 100755
source ./functions.sh
set -e
set -x
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index 01314580..e6c86b6f 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -170,7 +170,6 @@ let parse_cmdline () =
if !output_mode <> `Not_set then
error (f_"%s option used more than once on the command line") "-o";
match mode with
- | "glance" -> output_mode := `Glance
| "libvirt" -> output_mode := `Libvirt
| "disk" | "local" -> output_mode := `Local
| "json" -> output_mode := `JSON
@@ -323,8 +322,6 @@ let parse_cmdline () =
virt-v2v -i disk disk.img -o local -os /var/tmp
- virt-v2v -i disk disk.img -o glance
-
There is a companion front-end called \"virt-p2v\" which comes as an
ISO or CD image that can be booted on physical machines.
diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml
index 8c5426b9..3fce4e7a 100644
--- a/v2v/output_glance.ml
+++ b/v2v/output_glance.ml
@@ -100,4 +100,4 @@ object
end
let output_glance = new output_glance
-let () = Modules_list.register_output_module "glance"
+(* let () = Modules_list.register_output_module "glance" *)
--
2.31.1
2.19.1.3.g30247aa5d201

View File

@ -1,26 +0,0 @@
From e57a5dafc00b3b5737824977aad0feb0ec497a1f 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 08/12] RHEL: v2v: -i disk: force VNC as display (RHBZ#1372671)
The SDL output mode is not supported in RHEL's qemu-kvm.
---
v2v/input_disk.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml
index b3acb5f6..5b39dbe2 100644
--- a/v2v/input_disk.ml
+++ b/v2v/input_disk.ml
@@ -88,7 +88,7 @@ class input_disk input_format disk = object
s_features = [ "acpi"; "apic"; "pae" ];
s_firmware = UnknownFirmware; (* causes virt-v2v to autodetect *)
s_display =
- Some { s_display_type = Window; s_keymap = None; s_password = None;
+ Some { s_display_type = VNC; s_keymap = None; s_password = None;
s_listen = LNoListen; s_port = None };
s_video = None;
s_sound = None;
--
2.31.1

View File

@ -0,0 +1,120 @@
From 85497c16781e9f8faf70d57f9a0f898d9d69059b Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 21 Oct 2021 17:43:20 +0200
Subject: [PATCH] lib/types: introduce "Standard_VGA" constructor for
"guestcaps_video_type"
In order to replace QXL with Standard_VGA in small steps, bisectably,
first just introduce the Standard_VGA constructor.
Extend the string_of_video function at once ("stdvga"). The value returned
by this function is only used for debug logging (indirectly, via the
string_of_guestcaps function).
The virt-v2v build flags turn "non-exhaustive pattern matching" warnings
into errors. Match the new "Standard_VGA" constructor with a constant
false assertion wherever an expression of type "guestcaps_video_type" is
matched, in order to make this patch bisectable. These assertions will be
gradually replaced with actual logic in the rest of this patch set.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/types.mli | 2 +-
lib/types.ml | 3 ++-
output/create_json.ml | 1 +
output/create_libvirt_xml.ml | 1 +
output/openstack_image_properties.ml | 1 +
output/output.ml | 6 +++++-
6 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index 3aab1ea7e4f2..3a2ba9fecf9a 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -284,7 +284,7 @@ type guestcaps = {
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = QXL | Cirrus
+and guestcaps_video_type = Standard_VGA | QXL | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt
val string_of_guestcaps : guestcaps -> string
diff --git a/lib/types.ml b/lib/types.ml
index aeb7d71ae0a3..e7fc8b38787c 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -424,7 +424,7 @@ type guestcaps = {
}
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = QXL | Cirrus
+and guestcaps_video_type = Standard_VGA | QXL | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt
let string_of_block_type = function
@@ -435,6 +435,7 @@ let string_of_net_type = function
| E1000 -> "e1000"
| RTL8139 -> "rtl8139"
let string_of_video = function
+ | Standard_VGA -> "stdvga"
| QXL -> "qxl"
| Cirrus -> "cirrus"
let string_of_machine = function
diff --git a/output/create_json.ml b/output/create_json.ml
index 211cd5d648c0..3cadf6b43378 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -203,6 +203,7 @@ let create_json_metadata source inspect
| RTL8139 -> "rtl8139" in
let video =
match guestcaps.gcaps_video with
+ | Standard_VGA -> assert false
| QXL -> "qxl"
| Cirrus -> "cirrus" in
let machine =
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index 64f1b0888cd6..ec1cd455ef13 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -421,6 +421,7 @@ let create_libvirt_xml ?pool source inspect
let video =
let video_model =
match guestcaps.gcaps_video with
+ | Standard_VGA -> assert false
| QXL -> e "model" [ "type", "qxl"; "ram", "65536" ] []
| Cirrus -> e "model" [ "type", "cirrus"; "vram", "9216" ] [] in
append_attr ("heads", "1") video_model;
diff --git a/output/openstack_image_properties.ml b/output/openstack_image_properties.ml
index bca0766e28c1..72f3e9d9261d 100644
--- a/output/openstack_image_properties.ml
+++ b/output/openstack_image_properties.ml
@@ -43,6 +43,7 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
| RTL8139 -> "rtl8139");
"hw_video_model",
(match guestcaps.gcaps_video with
+ | Standard_VGA -> assert false
| QXL -> "qxl"
| Cirrus -> "cirrus");
"hw_machine_type",
diff --git a/output/output.ml b/output/output.ml
index 69768ff1fd23..d223313022a6 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1543,7 +1543,11 @@ and qemu_finalize dir source inspect target_meta
"addr=127.0.0.1"]
);
arg "-vga"
- (match guestcaps.gcaps_video with Cirrus -> "cirrus" | QXL -> "qxl")
+ (match guestcaps.gcaps_video with
+ | Standard_VGA -> assert false
+ | Cirrus -> "cirrus"
+ | QXL -> "qxl"
+ )
);
(* Add a sound card. *)
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,57 @@
From 04c5edf5220cdf5fcc0e741a2fde9d2bf1850480 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 27 Oct 2021 13:13:18 +0200
Subject: [PATCH] output: handle Standard_VGA in the libvirt XML and QEMU
cmdline formats
Libvirt domain XML fragment (with the default video RAM size made
explicit):
<video>
<model type='vga' vram='16384' heads='1'/>
</video>
Example QEMU cmdline option:
-vga std
References:
- https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/#VGA
- https://libvirt.org/formatdomain.html#video-devices
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
output/create_libvirt_xml.ml | 2 +-
output/output.ml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index ec1cd455ef13..623755de7212 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -421,7 +421,7 @@ let create_libvirt_xml ?pool source inspect
let video =
let video_model =
match guestcaps.gcaps_video with
- | Standard_VGA -> assert false
+ | Standard_VGA -> e "model" [ "type", "vga"; "vram", "16384" ] []
| QXL -> e "model" [ "type", "qxl"; "ram", "65536" ] []
| Cirrus -> e "model" [ "type", "cirrus"; "vram", "9216" ] [] in
append_attr ("heads", "1") video_model;
diff --git a/output/output.ml b/output/output.ml
index d223313022a6..239d3810a395 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1544,7 +1544,7 @@ and qemu_finalize dir source inspect target_meta
);
arg "-vga"
(match guestcaps.gcaps_video with
- | Standard_VGA -> assert false
+ | Standard_VGA -> "std"
| Cirrus -> "cirrus"
| QXL -> "qxl"
)
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,35 @@
From ebd756f60017f6618045fc524fc16422d649a77e Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 13:34:34 +0100
Subject: [PATCH] output: handle Standard_VGA in the OpenStack format
Convert the Standard_VGA value of "guestcaps.gcaps_video" to the string
"vga", in the OpenStack image properties.
Reference:
https://docs.openstack.org/glance/xena/admin/useful-image-properties.html
Cc: Kashyap Chamarthy <kchamart@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
---
output/openstack_image_properties.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/openstack_image_properties.ml b/output/openstack_image_properties.ml
index 72f3e9d9261d..9d466ecfbf0f 100644
--- a/output/openstack_image_properties.ml
+++ b/output/openstack_image_properties.ml
@@ -43,7 +43,7 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
| RTL8139 -> "rtl8139");
"hw_video_model",
(match guestcaps.gcaps_video with
- | Standard_VGA -> assert false
+ | Standard_VGA -> "vga"
| QXL -> "qxl"
| Cirrus -> "cirrus");
"hw_machine_type",
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,35 @@
From c7e1f50197f6f3961c9650cc36ba885981bab149 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 13:54:37 +0100
Subject: [PATCH] output: handle Standard_VGA in the JSON format
The JSON output mode was added in commit fba6a498d472 ("v2v: add -o json
output mode", 2019-04-01). The format that it uses is by convention (aka
"ad-hoc"); not governed by any public specification. Map the Standard_VGA
value of "guestcaps.gcaps_video" to the "vga" string, as this is (a)
straightforward and (b) consistent with the OpenStack and libvirt device
model names.
Cc: Fabian Deutsch <fdeutsch@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
output/create_json.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/create_json.ml b/output/create_json.ml
index 3cadf6b43378..ac044630a0c6 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -203,7 +203,7 @@ let create_json_metadata source inspect
| RTL8139 -> "rtl8139" in
let video =
match guestcaps.gcaps_video with
- | Standard_VGA -> assert false
+ | Standard_VGA -> "vga"
| QXL -> "qxl"
| Cirrus -> "cirrus" in
let machine =
--
2.19.1.3.g30247aa5d201

View File

@ -1,80 +0,0 @@
From 5581ad03910a3b0d198176453c92ad714343697d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 18 Aug 2021 11:00:12 +0100
Subject: [PATCH 12/12] v2v: windows: Do not fix NTFS heads in Windows Vista
and later
Setting/adjusting the number of drive heads in the NTFS header is only
necessary for ancient versions of Windows. Modern versions ignore
this. In addition this operation broke when we added BitLocker
support. Only do this for ancient Windows 2000/XP and skip it for
everything else.
Reported-by: Ming Xie
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1994984
(cherry picked from commit 0a394c5c2f802098c9e481b4bacee7821e5dd0ae)
---
v2v/convert_windows.ml | 44 ++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 52e45599..1ed1d59e 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -710,30 +710,32 @@ if errorlevel 3010 exit /b 0
however, as this is specific to Windows 2003 it lists location
0x1A as unused.
*)
- let rootpart = inspect.i_root in
+ if inspect.i_major_version < 6 (* is Windows 2000/XP *) then (
+ let rootpart = inspect.i_root in
- (* Ignore if the rootpart is something like /dev/sda. RHBZ#1276540. *)
- if not (g#is_whole_device rootpart) then (
- (* Check that the root device contains NTFS magic. *)
- let magic = g#pread_device rootpart 8 3L in
- if magic = "NTFS " then (
- (* Get the size of the whole disk containing the root partition. *)
- let rootdev = g#part_to_dev rootpart in (* eg. /dev/sda *)
- let size = g#blockdev_getsize64 rootdev in
+ (* Ignore if the rootpart is something like /dev/sda. RHBZ#1276540. *)
+ if not (g#is_whole_device rootpart) then (
+ (* Check that the root device contains NTFS magic. *)
+ let magic = g#pread_device rootpart 8 3L in
+ if magic = "NTFS " then (
+ (* Get the size of the whole disk containing the root partition. *)
+ let rootdev = g#part_to_dev rootpart in (* eg. /dev/sda *)
+ let size = g#blockdev_getsize64 rootdev in
- let heads = (* refer to the table above *)
- if size < 2114445312L then 0x40
- else if size < 4228374780L then 0x80
- else 0xff in
+ let heads = (* refer to the table above *)
+ if size < 2114445312L then 0x40
+ else if size < 4228374780L then 0x80
+ else 0xff in
- (* Update NTFS's idea of the number of heads. This is an
- * unsigned 16 bit little-endian integer, offset 0x1a from the
- * beginning of the partition.
- *)
- let b = Bytes.create 2 in
- Bytes.unsafe_set b 0 (Char.chr heads);
- Bytes.unsafe_set b 1 '\000';
- ignore (g#pwrite_device rootpart (Bytes.to_string b) 0x1a_L)
+ (* Update NTFS's idea of the number of heads. This is an
+ * unsigned 16 bit little-endian integer, offset 0x1a from the
+ * beginning of the partition.
+ *)
+ let b = Bytes.create 2 in
+ Bytes.unsafe_set b 0 (Char.chr heads);
+ Bytes.unsafe_set b 1 '\000';
+ ignore (g#pwrite_device rootpart (Bytes.to_string b) 0x1a_L)
+ )
)
)
--
2.31.1

View File

@ -0,0 +1,71 @@
From f738c4e8ffe23e08ef126eddf0268916ecdfe584 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Tue, 9 Nov 2021 10:39:18 +0100
Subject: [PATCH] convert_linux: flip target display to Standard_VGA
Policy change: pick Standard_VGA over QXL for the video type in the output
(Linux) domain, always.
For Standard_VGA, use the "modesetting" X.org driver.
(In a Fedora 34 guest using standard VGA video, and having no explicit
X.org config file, the X.org server logs the following (excerpt):
> Markers: (--) probed, (**) from config file, (==) default setting,
> (++) from command line, (!!) notice, (II) informational,
> (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
> (==) Matched modesetting as autoconfigured driver 0
> (==) Matched fbdev as autoconfigured driver 1
> (==) Matched vesa as autoconfigured driver 2
> (II) LoadModule: "modesetting"
> (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
> (II) LoadModule: "fbdev"
> (II) Loading /usr/lib64/xorg/modules/drivers/fbdev_drv.so
> (II) LoadModule: "vesa"
> (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so
> (II) Loading sub module "fbdevhw"
> (II) LoadModule: "fbdevhw"
> (II) Loading /usr/lib64/xorg/modules/libfbdevhw.so
> (II) UnloadModule: "fbdev"
> (II) Unloading fbdev
> (II) UnloadSubModule: "fbdevhw"
> (II) Unloading fbdevhw
> (II) UnloadModule: "vesa"
> (II) Unloading vesa
This tells us that the standard VGA device model is driven by the
"modesetting" driver.)
Cc: Gerd Hoffmann <kraxel@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
convert/convert_linux.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index 41bc4218e948..f0213f06eec2 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -148,7 +148,7 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
let guestcaps = {
gcaps_block_bus = block_type;
gcaps_net_bus = net_type;
- gcaps_video = QXL;
+ gcaps_video = Standard_VGA;
gcaps_virtio_rng = kernel.ki_supports_virtio_rng;
gcaps_virtio_balloon = kernel.ki_supports_virtio_balloon;
gcaps_isa_pvpanic = kernel.ki_supports_isa_pvpanic;
@@ -819,7 +819,7 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
true
and configure_display_driver () =
- let video_driver = "qxl" in
+ let video_driver = "modesetting" in
let updated = ref false in
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,80 @@
From 6fad666b1821a7c957a3f1761f95319052075c0b Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Tue, 9 Nov 2021 11:02:57 +0100
Subject: [PATCH] convert/windows_virtio: flip target display to Standard_VGA
Policy change: pick Standard_VGA over either QXL or Cirrus for the video
type in the output (Windows) domain, always.
If the subject Windows version is entirely unsupported by
"virtio-win.iso", continue warning the user, as IDE and RTL8139 are still
considered inferior to virtio-blk and virtio-net, respectively.
No warning is needed when only the QXL driver is missing for the subject
Windows version, as Standard_VGA is not worse than QXL.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
convert/windows_virtio.ml | 18 ++----------------
tests/test-v2v-i-ova.xml | 2 +-
2 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml
index 25b455281bd2..02ef4a2cbca3 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -53,7 +53,7 @@ let rec install_drivers ((g, _) as reg) inspect =
warning (f_"there are no virtio drivers available for this version of Windows (%d.%d %s %s). virt-v2v looks for drivers in %s\n\nThe guest will be configured to use slower emulated devices.")
inspect.i_major_version inspect.i_minor_version inspect.i_arch
inspect.i_product_variant virtio_win;
- (IDE, RTL8139, Cirrus, false, false, false, false)
+ (IDE, RTL8139, Standard_VGA, false, false, false, false)
)
else (
(* Can we install the block driver? *)
@@ -103,27 +103,13 @@ let rec install_drivers ((g, _) as reg) inspect =
else
Virtio_net in
- (* Can we install the QXL driver? *)
- let video : guestcaps_video_type =
- let has_qxl =
- g#exists (driverdir // "qxl.inf") ||
- g#exists (driverdir // "qxldod.inf") in
- if not has_qxl then (
- warning (f_"there is no QXL driver for this version of Windows (%d.%d %s). virt-v2v looks for this driver in %s\n\nThe guest will be configured to use a basic VGA display driver.")
- inspect.i_major_version inspect.i_minor_version
- inspect.i_arch virtio_win;
- Cirrus
- )
- else
- QXL in
-
(* Did we install the miscellaneous drivers? *)
let virtio_rng_supported = g#exists (driverdir // "viorng.inf") in
let virtio_ballon_supported = g#exists (driverdir // "balloon.inf") in
let isa_pvpanic_supported = g#exists (driverdir // "pvpanic.inf") in
let virtio_socket_supported = g#exists (driverdir // "viosock.inf") in
- (block, net, video,
+ (block, net, Standard_VGA,
virtio_rng_supported, virtio_ballon_supported, isa_pvpanic_supported, virtio_socket_supported)
)
diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml
index 30f52f557d9f..d7383905fdc0 100644
--- a/tests/test-v2v-i-ova.xml
+++ b/tests/test-v2v-i-ova.xml
@@ -39,7 +39,7 @@
<model type='virtio'/>
</interface>
<video>
- <model type='qxl' ram='65536' heads='1'/>
+ <model type='vga' vram='16384' heads='1'/>
</video>
<graphics type='vnc' autoport='yes' port='-1'/>
<rng model='virtio'>
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,53 @@
From 06398e53b2d642f54d73f6e0a1262d71afbb2ad4 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 13 Nov 2021 22:35:18 +0100
Subject: [PATCH] lib/create_ovf: fix "qxl_resourcetype" misnomer
The OVF resource types 32768 and 20 have nothing to do with QXL (or with
any other video controller); they stand for the *monitor* resource type.
Rename the "qxl_resourcetype" variable to "monitor_resourcetype".
Also document the ovirt-engine bugzilla for which resource type 32768 had
been introduced to ovirt-engine (RHBZ#1534644).
References:
- ovirt-engine commit 4dc21c0fcf3b ("core: align hardware resource type
with ovf specification", 2018-02-14)
- [Libguestfs] specifying a standard VGA video controller in OVF for oVirt
https://listman.redhat.com/archives/libguestfs/2021-November/msg00149.html
Fixes: 5d078f1f324bc121f3aa29cb87768ffa69385b6f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/create_ovf.ml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml
index 3991b66dd95d..8c8ef43a42cd 100644
--- a/lib/create_ovf.ml
+++ b/lib/create_ovf.ml
@@ -679,14 +679,15 @@ let rec create_ovf source inspect
* See RHBZ#1213701 and RHBZ#1211231 for the reasoning
* behind that.
*)
- let qxl_resourcetype =
+ let monitor_resourcetype =
match ovf_flavour with
- | OVirt -> 32768 (* RHBZ#1598715 *)
+ | OVirt -> 32768 (* RHBZ#1598715, RHBZ#1534644 *)
| RHVExportStorageDomain -> 20 in
e "Item" [] [
e "rasd:Caption" [] [PCData "Graphical Controller"];
e "rasd:InstanceId" [] [PCData (uuidgen ())];
- e "rasd:ResourceType" [] [PCData (string_of_int qxl_resourcetype)];
+ e "rasd:ResourceType" []
+ [PCData (string_of_int monitor_resourcetype)];
e "Type" [] [PCData "video"];
e "rasd:VirtualQuantity" [] [PCData "1"];
e "rasd:Device" [] [PCData "qxl"];
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,99 @@
From 47a7121267a900c132b2cdf7024cfc99e8e46c70 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 13 Nov 2021 22:49:43 +0100
Subject: [PATCH] lib/create_ovf: place a standard VGA video device in the OVF
xml
As of ovirt-engine commit daca2ca6cd91, ovirt-engine ignores
<rasd:Device>qxl</rasd:Device>
entirely. That's mainly because
- the "rasd" namespace prefix selects the
"http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
namespace, and
- that namespace does not define a Device element.
Consequently, ovirt-engine picks the QXL device based on factors that are
unrelated to <rasd:Device>qxl</rasd:Device>, even now.
However, ovirt-engine does adhere to the plain <Device> element. Change
the element from <rasd:Device> to <Device>, and change its contents from
"qxl" to "vga", which ovirt-engine also recognizes already.
References:
- https://listman.redhat.com/archives/libguestfs/2021-November/msg00149.html
- https://bugzilla.redhat.com/show_bug.cgi?id=1976607#c3
- https://bugzilla.redhat.com/show_bug.cgi?id=1976607#c4
- https://listman.redhat.com/archives/libguestfs/2021-November/msg00218.html
Cc: Arik Hadas <ahadas@redhat.com>
Cc: Liran Rotenberg <lrotenbe@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/create_ovf.ml | 11 +++++++----
tests/test-v2v-o-rhv.ovf.expected | 2 +-
tests/test-v2v-o-vdsm-options.ovf.expected | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/create_ovf.ml b/lib/create_ovf.ml
index 8c8ef43a42cd..698a804fb394 100644
--- a/lib/create_ovf.ml
+++ b/lib/create_ovf.ml
@@ -675,9 +675,12 @@ let rec create_ovf source inspect
e "rasd:UsbPolicy" [] [PCData "Disabled"];
];
- (* We always add a qxl device when outputting to RHV.
- * See RHBZ#1213701 and RHBZ#1211231 for the reasoning
- * behind that.
+ (* We always add a standard VGA-compatible video controller when
+ * outputting to RHV. See RHBZ#1213701 and RHBZ#1211231 for the
+ * reasoning behind that. The device model used to be QXL previously,
+ * but only the unaccelerated standard VGA framebuffer is needed; so
+ * the (simpler) standard VGA device itself suffices. Refer to
+ * RHBZ#1961107.
*)
let monitor_resourcetype =
match ovf_flavour with
@@ -690,7 +693,7 @@ let rec create_ovf source inspect
[PCData (string_of_int monitor_resourcetype)];
e "Type" [] [PCData "video"];
e "rasd:VirtualQuantity" [] [PCData "1"];
- e "rasd:Device" [] [PCData "qxl"];
+ e "Device" [] [PCData "vga"];
]
];
diff --git a/tests/test-v2v-o-rhv.ovf.expected b/tests/test-v2v-o-rhv.ovf.expected
index f8aa07c45d4c..795c48f878d4 100644
--- a/tests/test-v2v-o-rhv.ovf.expected
+++ b/tests/test-v2v-o-rhv.ovf.expected
@@ -60,7 +60,7 @@
<rasd:ResourceType>20</rasd:ResourceType>
<Type>video</Type>
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
- <rasd:Device>qxl</rasd:Device>
+ <Device>vga</Device>
</Item>
<Item>
<rasd:Caption>RNG Device</rasd:Caption>
diff --git a/tests/test-v2v-o-vdsm-options.ovf.expected b/tests/test-v2v-o-vdsm-options.ovf.expected
index f861071c08c3..ddeb5b1cf50f 100644
--- a/tests/test-v2v-o-vdsm-options.ovf.expected
+++ b/tests/test-v2v-o-vdsm-options.ovf.expected
@@ -60,7 +60,7 @@
<rasd:ResourceType>32768</rasd:ResourceType>
<Type>video</Type>
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
- <rasd:Device>qxl</rasd:Device>
+ <Device>vga</Device>
</Item>
<Item>
<rasd:Caption>RNG Device</rasd:Caption>
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,105 @@
From 87855ca34c8ff2dba9b49018c126ea40570a81cb Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Tue, 9 Nov 2021 11:24:26 +0100
Subject: [PATCH] lib/types: remove "QXL" constructor for
"guestcaps_video_type"
Removing the "QXL" constructor only needs the obvious fixup in the various
pattern matches.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/types.mli | 2 +-
lib/types.ml | 3 +--
output/create_json.ml | 1 -
output/create_libvirt_xml.ml | 1 -
output/openstack_image_properties.ml | 1 -
output/output.ml | 1 -
6 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index 3a2ba9fecf9a..a3eef963acb2 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -284,7 +284,7 @@ type guestcaps = {
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA | QXL | Cirrus
+and guestcaps_video_type = Standard_VGA | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt
val string_of_guestcaps : guestcaps -> string
diff --git a/lib/types.ml b/lib/types.ml
index e7fc8b38787c..864ab8b689ed 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -424,7 +424,7 @@ type guestcaps = {
}
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA | QXL | Cirrus
+and guestcaps_video_type = Standard_VGA | Cirrus
and guestcaps_machine = I440FX | Q35 | Virt
let string_of_block_type = function
@@ -436,7 +436,6 @@ let string_of_net_type = function
| RTL8139 -> "rtl8139"
let string_of_video = function
| Standard_VGA -> "stdvga"
- | QXL -> "qxl"
| Cirrus -> "cirrus"
let string_of_machine = function
| I440FX -> "i440fx"
diff --git a/output/create_json.ml b/output/create_json.ml
index ac044630a0c6..add4d886a636 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -204,7 +204,6 @@ let create_json_metadata source inspect
let video =
match guestcaps.gcaps_video with
| Standard_VGA -> "vga"
- | QXL -> "qxl"
| Cirrus -> "cirrus" in
let machine =
match guestcaps.gcaps_machine with
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index 623755de7212..9cf872861110 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -422,7 +422,6 @@ let create_libvirt_xml ?pool source inspect
let video_model =
match guestcaps.gcaps_video with
| Standard_VGA -> e "model" [ "type", "vga"; "vram", "16384" ] []
- | QXL -> e "model" [ "type", "qxl"; "ram", "65536" ] []
| Cirrus -> e "model" [ "type", "cirrus"; "vram", "9216" ] [] in
append_attr ("heads", "1") video_model;
e "video" [] [ video_model ] in
diff --git a/output/openstack_image_properties.ml b/output/openstack_image_properties.ml
index 9d466ecfbf0f..2d62efa1a3dc 100644
--- a/output/openstack_image_properties.ml
+++ b/output/openstack_image_properties.ml
@@ -44,7 +44,6 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
"hw_video_model",
(match guestcaps.gcaps_video with
| Standard_VGA -> "vga"
- | QXL -> "qxl"
| Cirrus -> "cirrus");
"hw_machine_type",
(match guestcaps.gcaps_machine with
diff --git a/output/output.ml b/output/output.ml
index 239d3810a395..db4841d55d0b 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1546,7 +1546,6 @@ and qemu_finalize dir source inspect target_meta
(match guestcaps.gcaps_video with
| Standard_VGA -> "std"
| Cirrus -> "cirrus"
- | QXL -> "qxl"
)
);
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,309 @@
From 3a24ebd59a5cba8caf92dcbb4345258e584e8dad Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Mon, 1 Nov 2021 17:08:17 +0100
Subject: [PATCH] tests: remove the fake Windows guest drivers for the QXL
device
The QXL drivers no longer matter when converting Windows guests; remove
the fake images and their references from the test suite.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
test-data/fake-virtio-win/Makefile.am | 16 ----------------
.../drivers/amd64/Win2008R2/qxl.inf | 2 --
.../fake-virtio-win/drivers/amd64/Win7/qxl.inf | 2 --
.../fake-virtio-win/drivers/i386/Win7/qxl.inf | 2 --
.../fake-virtio-win/drivers/i386/WinXP/qxl.inf | 2 --
v2v/v2v_unit_tests.ml | 16 ----------------
.../drivers/amd64/Win2008R2/qxl.cat | 1 -
.../drivers/amd64/Win2008R2/qxl.sys | 1 -
.../drivers/amd64/Win2008R2/qxldd.dll | 1 -
.../fake-virtio-win/drivers/amd64/Win7/qxl.cat | 1 -
.../fake-virtio-win/drivers/amd64/Win7/qxl.sys | 1 -
.../fake-virtio-win/drivers/amd64/Win7/qxldd.dll | 1 -
.../fake-virtio-win/drivers/i386/Win7/qxl.cat | 1 -
.../fake-virtio-win/drivers/i386/Win7/qxl.sys | 1 -
.../fake-virtio-win/drivers/i386/Win7/qxldd.dll | 1 -
.../fake-virtio-win/drivers/i386/WinXP/qxl.cat | 1 -
.../fake-virtio-win/drivers/i386/WinXP/qxl.sys | 1 -
.../fake-virtio-win/drivers/i386/WinXP/qxldd.dll | 1 -
tests/test-v2v-in-place.sh | 2 +-
tests/test-v2v-windows-conversion.sh | 2 +-
20 files changed, 2 insertions(+), 54 deletions(-)
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf
delete mode 100644 test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf
delete mode 100644 test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys
delete mode 100644 test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll
delete mode 100644 test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat
delete mode 100644 test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys
delete mode 100644 test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll
delete mode 100644 test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat
delete mode 100644 test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys
delete mode 100644 test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll
diff --git a/test-data/fake-virtio-win/Makefile.am b/test-data/fake-virtio-win/Makefile.am
index 55b91a95a5e5..60c2d8245db9 100644
--- a/test-data/fake-virtio-win/Makefile.am
+++ b/test-data/fake-virtio-win/Makefile.am
@@ -38,10 +38,6 @@ drivers = \
drivers/amd64/Win2008R2/netkvm.cat \
drivers/amd64/Win2008R2/netkvm.inf \
drivers/amd64/Win2008R2/netkvm.sys \
- drivers/amd64/Win2008R2/qxl.cat \
- drivers/amd64/Win2008R2/qxldd.dll \
- drivers/amd64/Win2008R2/qxl.inf \
- drivers/amd64/Win2008R2/qxl.sys \
drivers/amd64/Win2008R2/vioscsi.cat \
drivers/amd64/Win2008R2/vioscsi.inf \
drivers/amd64/Win2008R2/vioscsi.sys \
@@ -75,10 +71,6 @@ drivers = \
drivers/amd64/Win7/netkvm.cat \
drivers/amd64/Win7/netkvm.inf \
drivers/amd64/Win7/netkvm.sys \
- drivers/amd64/Win7/qxl.cat \
- drivers/amd64/Win7/qxldd.dll \
- drivers/amd64/Win7/qxl.inf \
- drivers/amd64/Win7/qxl.sys \
drivers/amd64/Win7/vioscsi.cat \
drivers/amd64/Win7/vioscsi.inf \
drivers/amd64/Win7/vioscsi.sys \
@@ -121,10 +113,6 @@ drivers = \
drivers/i386/Win7/netkvm.cat \
drivers/i386/Win7/netkvm.inf \
drivers/i386/Win7/netkvm.sys \
- drivers/i386/Win7/qxl.cat \
- drivers/i386/Win7/qxldd.dll \
- drivers/i386/Win7/qxl.inf \
- drivers/i386/Win7/qxl.sys \
drivers/i386/Win7/vioscsi.cat \
drivers/i386/Win7/vioscsi.inf \
drivers/i386/Win7/vioscsi.sys \
@@ -152,10 +140,6 @@ drivers = \
drivers/i386/WinXP/netkvm.cat \
drivers/i386/WinXP/netkvm.inf \
drivers/i386/WinXP/netkvm.sys \
- drivers/i386/WinXP/qxl.cat \
- drivers/i386/WinXP/qxldd.dll \
- drivers/i386/WinXP/qxl.inf \
- drivers/i386/WinXP/qxl.sys \
drivers/i386/WinXP/viostor.cat \
drivers/i386/WinXP/viostor.inf \
drivers/i386/WinXP/viostor.sys
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf
deleted file mode 100644
index 67e3fab0f3a7..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Version]
-DriverVer = 10/29/2013,6.1.0.10020
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf
deleted file mode 100644
index 3310167e395f..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Version]
-DriverVer = 07/17/2013,6.1.0.10018
diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf
deleted file mode 100644
index 3310167e395f..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Version]
-DriverVer = 07/17/2013,6.1.0.10018
diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf
deleted file mode 100644
index d1fe96b24e79..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-[Version]
-DriverVer = 07/17/2013,5.1.0.10018
diff --git a/v2v/v2v_unit_tests.ml b/v2v/v2v_unit_tests.ml
index 584c5bb7b395..889f7998cf3b 100644
--- a/v2v/v2v_unit_tests.ml
+++ b/v2v/v2v_unit_tests.ml
@@ -603,15 +603,11 @@ let test_virtio_iso_path_matches_guest_os ctx =
"drivers/i386/Win2008/vioscsi.inf", Some win2k8_32;
"drivers/i386/Win7/viostor.inf", Some win7_32;
"drivers/i386/Win7/viostor.sys", Some win7_32;
- "drivers/i386/Win7/qxldd.dll", Some win7_32;
- "drivers/i386/Win7/qxl.sys", Some win7_32;
"drivers/i386/Win7/vioscsi.cat", Some win7_32;
"drivers/i386/Win7/netkvm.inf", Some win7_32;
"drivers/i386/Win7/netkvm.sys", Some win7_32;
"drivers/i386/Win7/viostor.cat", Some win7_32;
- "drivers/i386/Win7/qxl.inf", Some win7_32;
"drivers/i386/Win7/vioscsi.sys", Some win7_32;
- "drivers/i386/Win7/qxl.cat", Some win7_32;
"drivers/i386/Win7/netkvm.cat", Some win7_32;
"drivers/i386/Win7/vioscsi.inf", Some win7_32;
"drivers/i386/Win2003/viostor.inf", Some win2k3_32;
@@ -631,13 +627,9 @@ let test_virtio_iso_path_matches_guest_os ctx =
"drivers/i386/Win8/vioscsi.inf", Some win8_32;
"drivers/i386/WinXP/viostor.inf", Some winxp_32;
"drivers/i386/WinXP/viostor.sys", Some winxp_32;
- "drivers/i386/WinXP/qxldd.dll", Some winxp_32;
- "drivers/i386/WinXP/qxl.sys", Some winxp_32;
"drivers/i386/WinXP/netkvm.inf", Some winxp_32;
"drivers/i386/WinXP/netkvm.sys", Some winxp_32;
"drivers/i386/WinXP/viostor.cat", Some winxp_32;
- "drivers/i386/WinXP/qxl.inf", Some winxp_32;
- "drivers/i386/WinXP/qxl.cat", Some winxp_32;
"drivers/i386/WinXP/netkvm.cat", Some winxp_32;
"drivers/amd64/Win8.1/viostor.inf", Some win8_1_64;
"drivers/amd64/Win8.1/viostor.sys", Some win8_1_64;
@@ -659,15 +651,11 @@ let test_virtio_iso_path_matches_guest_os ctx =
"drivers/amd64/Win2008/vioscsi.inf", Some win2k8_64;
"drivers/amd64/Win7/viostor.inf", Some win7_64;
"drivers/amd64/Win7/viostor.sys", Some win7_64;
- "drivers/amd64/Win7/qxldd.dll", Some win7_64;
- "drivers/amd64/Win7/qxl.sys", Some win7_64;
"drivers/amd64/Win7/vioscsi.cat", Some win7_64;
"drivers/amd64/Win7/netkvm.inf", Some win7_64;
"drivers/amd64/Win7/netkvm.sys", Some win7_64;
"drivers/amd64/Win7/viostor.cat", Some win7_64;
- "drivers/amd64/Win7/qxl.inf", Some win7_64;
"drivers/amd64/Win7/vioscsi.sys", Some win7_64;
- "drivers/amd64/Win7/qxl.cat", Some win7_64;
"drivers/amd64/Win7/netkvm.cat", Some win7_64;
"drivers/amd64/Win7/vioscsi.inf", Some win7_64;
"drivers/amd64/Win2003/viostor.inf", Some win2k3_64;
@@ -696,15 +684,11 @@ let test_virtio_iso_path_matches_guest_os ctx =
"drivers/amd64/Win2012/vioscsi.inf", Some win2k12_64;
"drivers/amd64/Win2008R2/viostor.inf", Some win2k8r2_64;
"drivers/amd64/Win2008R2/viostor.sys", Some win2k8r2_64;
- "drivers/amd64/Win2008R2/qxldd.dll", Some win2k8r2_64;
- "drivers/amd64/Win2008R2/qxl.sys", Some win2k8r2_64;
"drivers/amd64/Win2008R2/vioscsi.cat", Some win2k8r2_64;
"drivers/amd64/Win2008R2/netkvm.inf", Some win2k8r2_64;
"drivers/amd64/Win2008R2/netkvm.sys", Some win2k8r2_64;
"drivers/amd64/Win2008R2/viostor.cat", Some win2k8r2_64;
- "drivers/amd64/Win2008R2/qxl.inf", Some win2k8r2_64;
"drivers/amd64/Win2008R2/vioscsi.sys", Some win2k8r2_64;
- "drivers/amd64/Win2008R2/qxl.cat", Some win2k8r2_64;
"drivers/amd64/Win2008R2/netkvm.cat", Some win2k8r2_64;
"drivers/amd64/Win2008R2/vioscsi.inf", Some win2k8r2_64;
"drivers/amd64/Win2012R2/viostor.inf", Some win2k12r2_64;
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.cat
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxl.sys
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll b/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win2008R2/qxldd.dll
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.cat
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys b/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxl.sys
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll b/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/amd64/Win7/qxldd.dll
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.cat
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys b/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/Win7/qxl.sys
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll b/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/Win7/qxldd.dll
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.cat
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys b/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxl.sys
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll b/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll
deleted file mode 100644
index acbc962012bc..000000000000
--- a/test-data/fake-virtio-win/drivers/i386/WinXP/qxldd.dll
+++ /dev/null
@@ -1 +0,0 @@
-fake
diff --git a/tests/test-v2v-in-place.sh b/tests/test-v2v-in-place.sh
index 9da8fa63a99b..c5fee2f9f591 100755
--- a/tests/test-v2v-in-place.sh
+++ b/tests/test-v2v-in-place.sh
@@ -95,7 +95,7 @@ mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
mktest "is-dir \"$firstboot_dir/scripts\"" true
virtio_dir="/Windows/Drivers/VirtIO"
mktest "is-dir \"$virtio_dir\"" true
-for drv in netkvm qxl vioscsi viostor; do
+for drv in netkvm vioscsi viostor; do
for sfx in cat inf sys; do
mktest "is-file \"$virtio_dir/$drv.$sfx\"" true
done
diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh
index 4b422c5bc9d8..1ff41f6a7c89 100755
--- a/tests/test-v2v-windows-conversion.sh
+++ b/tests/test-v2v-windows-conversion.sh
@@ -88,7 +88,7 @@ mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
mktest "is-dir \"$firstboot_dir/scripts\"" true
virtio_dir="/Windows/Drivers/VirtIO"
mktest "is-dir \"$virtio_dir\"" true
-for drv in netkvm qxl vioscsi viostor; do
+for drv in netkvm vioscsi viostor; do
for sfx in cat inf sys; do
mktest "is-file \"$virtio_dir/$drv.$sfx\"" true
done
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,63 @@
From cbf2353693f7fd0a58e344ea562f5afbaf89d9a7 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Mon, 1 Nov 2021 17:36:37 +0100
Subject: [PATCH] tests: remove the remaining QXL references (for completeness)
Just for completeness' sake, change the display device from QXL to
standard VGA in:
- test-data/phony-guests/guests.xml.in
- tests/test-v2v-print-source.xml.in
This removes the last QXL occurrences in the source files.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
test-data/phony-guests/guests.xml.in | 2 +-
tests/test-v2v-print-source.expected | 2 +-
tests/test-v2v-print-source.xml.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test-data/phony-guests/guests.xml.in b/test-data/phony-guests/guests.xml.in
index 4139d04f689f..9f64c35cd80f 100644
--- a/test-data/phony-guests/guests.xml.in
+++ b/test-data/phony-guests/guests.xml.in
@@ -299,7 +299,7 @@
<model type='virtio'/>
</interface>
<video>
- <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'/>
</video>
</devices>
</domain>
diff --git a/tests/test-v2v-print-source.expected b/tests/test-v2v-print-source.expected
index afed30b5c46d..cfeade1c012d 100644
--- a/tests/test-v2v-print-source.expected
+++ b/tests/test-v2v-print-source.expected
@@ -9,7 +9,7 @@ hypervisor type: kvm
CPU features: acpi,apic,pae
firmware: unknown
display:
- video: qxl
+ video: vga
sound:
disks:
0 [virtio-blk]
diff --git a/tests/test-v2v-print-source.xml.in b/tests/test-v2v-print-source.xml.in
index 2f83fc73cb8a..d018d5fbcd27 100644
--- a/tests/test-v2v-print-source.xml.in
+++ b/tests/test-v2v-print-source.xml.in
@@ -27,7 +27,7 @@
<model type='virtio'/>
</interface>
<video>
- <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
+ <model type='vga' vram='16384' heads='1'/>
</video>
</devices>
</domain>
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,112 @@
From 5bea354c53ed6bd185295bad9a66bad930f2f766 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 17:41:23 +0100
Subject: [PATCH] lib/types: remove "Cirrus" constructor for
"guestcaps_video_type"
At this point, virt-v2v only recognizes, but never creates, the "Cirrus"
value of "guestcaps_video_type". Remove "Cirrus", and simplify the
affected pattern matches.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/types.mli | 2 +-
lib/types.ml | 3 +--
output/create_json.ml | 3 +--
output/create_libvirt_xml.ml | 3 +--
output/openstack_image_properties.ml | 3 +--
output/output.ml | 1 -
6 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index a3eef963acb2..8d48c300ec17 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -284,7 +284,7 @@ type guestcaps = {
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA | Cirrus
+and guestcaps_video_type = Standard_VGA
and guestcaps_machine = I440FX | Q35 | Virt
val string_of_guestcaps : guestcaps -> string
diff --git a/lib/types.ml b/lib/types.ml
index 864ab8b689ed..37696ebbabdd 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -424,7 +424,7 @@ type guestcaps = {
}
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA | Cirrus
+and guestcaps_video_type = Standard_VGA
and guestcaps_machine = I440FX | Q35 | Virt
let string_of_block_type = function
@@ -436,7 +436,6 @@ let string_of_net_type = function
| RTL8139 -> "rtl8139"
let string_of_video = function
| Standard_VGA -> "stdvga"
- | Cirrus -> "cirrus"
let string_of_machine = function
| I440FX -> "i440fx"
| Q35 -> "q35"
diff --git a/output/create_json.ml b/output/create_json.ml
index add4d886a636..3f6a734c9f8e 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -203,8 +203,7 @@ let create_json_metadata source inspect
| RTL8139 -> "rtl8139" in
let video =
match guestcaps.gcaps_video with
- | Standard_VGA -> "vga"
- | Cirrus -> "cirrus" in
+ | Standard_VGA -> "vga" in
let machine =
match guestcaps.gcaps_machine with
| I440FX -> "i440fx"
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index 9cf872861110..041643969c23 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -421,8 +421,7 @@ let create_libvirt_xml ?pool source inspect
let video =
let video_model =
match guestcaps.gcaps_video with
- | Standard_VGA -> e "model" [ "type", "vga"; "vram", "16384" ] []
- | Cirrus -> e "model" [ "type", "cirrus"; "vram", "9216" ] [] in
+ | Standard_VGA -> e "model" [ "type", "vga"; "vram", "16384" ] [] in
append_attr ("heads", "1") video_model;
e "video" [] [ video_model ] in
List.push_back devices video;
diff --git a/output/openstack_image_properties.ml b/output/openstack_image_properties.ml
index 2d62efa1a3dc..0a7d366967b6 100644
--- a/output/openstack_image_properties.ml
+++ b/output/openstack_image_properties.ml
@@ -43,8 +43,7 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
| RTL8139 -> "rtl8139");
"hw_video_model",
(match guestcaps.gcaps_video with
- | Standard_VGA -> "vga"
- | Cirrus -> "cirrus");
+ | Standard_VGA -> "vga");
"hw_machine_type",
(match guestcaps.gcaps_machine with
| I440FX -> "pc"
diff --git a/output/output.ml b/output/output.ml
index db4841d55d0b..0de1c2ebb4ba 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1545,7 +1545,6 @@ and qemu_finalize dir source inspect target_meta
arg "-vga"
(match guestcaps.gcaps_video with
| Standard_VGA -> "std"
- | Cirrus -> "cirrus"
)
);
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,39 @@
From 7af0c7d13829de3424be223290be4c3ae68fcd56 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 18:15:17 +0100
Subject: [PATCH] convert/windows_virtio: fix documentation of
"install_drivers" return type
When the "virtio_socket_supported" component was added to the
"install_drivers" return tuple, the documentation was not updated. Do it
now.
Fixes: 05f780c16f0135c657615520c2245b42de1efc3e
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
convert/windows_virtio.mli | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/convert/windows_virtio.mli b/convert/windows_virtio.mli
index 4e24625a4edf..b314d01da6cb 100644
--- a/convert/windows_virtio.mli
+++ b/convert/windows_virtio.mli
@@ -30,10 +30,10 @@ val install_drivers
function is called.
This returns the tuple [(block_driver, net_driver, video_driver,
- virtio_rng_supported, virtio_ballon_supported, isa_pvpanic_supported)]
- reflecting what devices are now required by the guest, either
- virtio devices if we managed to install those, or legacy devices
- if we didn't. *)
+ virtio_rng_supported, virtio_ballon_supported, isa_pvpanic_supported,
+ virtio_socket_supported)] reflecting what devices are now required by the
+ guest, either virtio devices if we managed to install those, or legacy
+ devices if we didn't. *)
val install_linux_tools : Guestfs.guestfs -> Types.inspect -> unit
(** installs QEMU Guest Agent on Linux guest OS from the driver directory or
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,246 @@
From 7295b564d62b15751ff9ef2191339422294027e3 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 18:22:33 +0100
Subject: [PATCH] lib/types: remove "guestcaps_video_type"
The "guestcaps_video_type" variant type now has a single (non-parametric)
constructor (namely "Standard_VGA"). Replace all uses of this type /
constructor with (simpler) constant expressions, wherever values are
necessary. Remove "guestcaps_video_type" from dependent types, where it
effectively no longer carries any information. (The "string_of_video"
function is only used for debugging, via "string_of_guestcaps", in
"do_convert" [convert/convert.ml]).
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
convert/windows_virtio.mli | 11 +++++------
lib/types.mli | 11 ++++-------
convert/convert_linux.ml | 1 -
convert/convert_windows.ml | 2 --
convert/windows_virtio.ml | 4 ++--
lib/types.ml | 6 ------
output/create_json.ml | 4 +---
output/create_libvirt_xml.ml | 3 +--
output/openstack_image_properties.ml | 4 +---
output/output.ml | 5 +----
10 files changed, 15 insertions(+), 36 deletions(-)
diff --git a/convert/windows_virtio.mli b/convert/windows_virtio.mli
index b314d01da6cb..53603d240553 100644
--- a/convert/windows_virtio.mli
+++ b/convert/windows_virtio.mli
@@ -20,7 +20,7 @@
val install_drivers
: Registry.t -> Types.inspect ->
- Types.guestcaps_block_type * Types.guestcaps_net_type * Types.guestcaps_video_type * bool * bool * bool * bool
+ Types.guestcaps_block_type * Types.guestcaps_net_type * bool * bool * bool * bool
(** [install_drivers reg inspect]
installs virtio drivers from the driver directory or driver
ISO into the guest driver directory and updates the registry
@@ -29,11 +29,10 @@ val install_drivers
[reg] is the system hive which is open for writes when this
function is called.
- This returns the tuple [(block_driver, net_driver, video_driver,
- virtio_rng_supported, virtio_ballon_supported, isa_pvpanic_supported,
- virtio_socket_supported)] reflecting what devices are now required by the
- guest, either virtio devices if we managed to install those, or legacy
- devices if we didn't. *)
+ This returns the tuple [(block_driver, net_driver, virtio_rng_supported,
+ virtio_ballon_supported, isa_pvpanic_supported, virtio_socket_supported)]
+ reflecting what devices are now required by the guest, either virtio
+ devices if we managed to install those, or legacy devices if we didn't. *)
val install_linux_tools : Guestfs.guestfs -> Types.inspect -> unit
(** installs QEMU Guest Agent on Linux guest OS from the driver directory or
diff --git a/lib/types.mli b/lib/types.mli
index 8d48c300ec17..e0ef222e0455 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -265,12 +265,10 @@ type target_nics = source_nic list
type guestcaps = {
gcaps_block_bus : guestcaps_block_type;
gcaps_net_bus : guestcaps_net_type;
- gcaps_video : guestcaps_video_type;
- (** Best block device, network device and video device guest can
- access. These are determined during conversion by inspecting the
- guest (and in some cases conversion can actually enhance these by
- installing drivers). Thus this is not known until after
- conversion. *)
+ (** Best block device and network device guest can access. These are
+ determined during conversion by inspecting the guest (and in some cases
+ conversion can actually enhance these by installing drivers). Thus this
+ is not known until after conversion. *)
gcaps_virtio_rng : bool; (** Guest supports virtio-rng. *)
gcaps_virtio_balloon : bool; (** Guest supports virtio balloon. *)
@@ -284,7 +282,6 @@ type guestcaps = {
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA
and guestcaps_machine = I440FX | Q35 | Virt
val string_of_guestcaps : guestcaps -> string
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
index f0213f06eec2..8dc648169dcb 100644
--- a/convert/convert_linux.ml
+++ b/convert/convert_linux.ml
@@ -148,7 +148,6 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
let guestcaps = {
gcaps_block_bus = block_type;
gcaps_net_bus = net_type;
- gcaps_video = Standard_VGA;
gcaps_virtio_rng = kernel.ki_supports_virtio_rng;
gcaps_virtio_balloon = kernel.ki_supports_virtio_balloon;
gcaps_isa_pvpanic = kernel.ki_supports_isa_pvpanic;
diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index 1a653b88e7fa..0ebffb156633 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -211,7 +211,6 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
(* Open the system hive for writes and update it. *)
let block_driver,
net_driver,
- video_driver,
virtio_rng_supported,
virtio_ballon_supported,
isa_pvpanic_supported,
@@ -253,7 +252,6 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
let guestcaps = {
gcaps_block_bus = block_driver;
gcaps_net_bus = net_driver;
- gcaps_video = video_driver;
gcaps_virtio_rng = virtio_rng_supported;
gcaps_virtio_balloon = virtio_ballon_supported;
gcaps_isa_pvpanic = isa_pvpanic_supported;
diff --git a/convert/windows_virtio.ml b/convert/windows_virtio.ml
index 02ef4a2cbca3..b3a35a0ad0c8 100644
--- a/convert/windows_virtio.ml
+++ b/convert/windows_virtio.ml
@@ -53,7 +53,7 @@ let rec install_drivers ((g, _) as reg) inspect =
warning (f_"there are no virtio drivers available for this version of Windows (%d.%d %s %s). virt-v2v looks for drivers in %s\n\nThe guest will be configured to use slower emulated devices.")
inspect.i_major_version inspect.i_minor_version inspect.i_arch
inspect.i_product_variant virtio_win;
- (IDE, RTL8139, Standard_VGA, false, false, false, false)
+ (IDE, RTL8139, false, false, false, false)
)
else (
(* Can we install the block driver? *)
@@ -109,7 +109,7 @@ let rec install_drivers ((g, _) as reg) inspect =
let isa_pvpanic_supported = g#exists (driverdir // "pvpanic.inf") in
let virtio_socket_supported = g#exists (driverdir // "viosock.inf") in
- (block, net, Standard_VGA,
+ (block, net,
virtio_rng_supported, virtio_ballon_supported, isa_pvpanic_supported, virtio_socket_supported)
)
diff --git a/lib/types.ml b/lib/types.ml
index 37696ebbabdd..acca0d989b91 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -413,7 +413,6 @@ type target_nics = source_nic list
type guestcaps = {
gcaps_block_bus : guestcaps_block_type;
gcaps_net_bus : guestcaps_net_type;
- gcaps_video : guestcaps_video_type;
gcaps_virtio_rng : bool;
gcaps_virtio_balloon : bool;
gcaps_isa_pvpanic : bool;
@@ -424,7 +423,6 @@ type guestcaps = {
}
and guestcaps_block_type = Virtio_blk | IDE
and guestcaps_net_type = Virtio_net | E1000 | RTL8139
-and guestcaps_video_type = Standard_VGA
and guestcaps_machine = I440FX | Q35 | Virt
let string_of_block_type = function
@@ -434,8 +432,6 @@ let string_of_net_type = function
| Virtio_net -> "virtio-net"
| E1000 -> "e1000"
| RTL8139 -> "rtl8139"
-let string_of_video = function
- | Standard_VGA -> "stdvga"
let string_of_machine = function
| I440FX -> "i440fx"
| Q35 -> "q35"
@@ -445,13 +441,11 @@ let string_of_guestcaps gcaps =
sprintf "\
gcaps_block_bus = %s
gcaps_net_bus = %s
-gcaps_video = %s
gcaps_machine = %s
gcaps_arch = %s
gcaps_acpi = %b
" (string_of_block_type gcaps.gcaps_block_bus)
(string_of_net_type gcaps.gcaps_net_bus)
- (string_of_video gcaps.gcaps_video)
(string_of_machine gcaps.gcaps_machine)
gcaps.gcaps_arch
gcaps.gcaps_acpi
diff --git a/output/create_json.ml b/output/create_json.ml
index 3f6a734c9f8e..b48902b7d221 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -201,9 +201,7 @@ let create_json_metadata source inspect
| Virtio_net -> "virtio-net"
| E1000 -> "e1000"
| RTL8139 -> "rtl8139" in
- let video =
- match guestcaps.gcaps_video with
- | Standard_VGA -> "vga" in
+ let video = "vga" in
let machine =
match guestcaps.gcaps_machine with
| I440FX -> "i440fx"
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
index 041643969c23..9413cc0bf884 100644
--- a/output/create_libvirt_xml.ml
+++ b/output/create_libvirt_xml.ml
@@ -420,8 +420,7 @@ let create_libvirt_xml ?pool source inspect
*)
let video =
let video_model =
- match guestcaps.gcaps_video with
- | Standard_VGA -> e "model" [ "type", "vga"; "vram", "16384" ] [] in
+ e "model" [ "type", "vga"; "vram", "16384" ] [] in
append_attr ("heads", "1") video_model;
e "video" [] [ video_model ] in
List.push_back devices video;
diff --git a/output/openstack_image_properties.ml b/output/openstack_image_properties.ml
index 0a7d366967b6..c75d72fe6942 100644
--- a/output/openstack_image_properties.ml
+++ b/output/openstack_image_properties.ml
@@ -41,9 +41,7 @@ let create source inspect { target_buses; guestcaps; target_firmware } =
| Virtio_net -> "virtio"
| E1000 -> "e1000"
| RTL8139 -> "rtl8139");
- "hw_video_model",
- (match guestcaps.gcaps_video with
- | Standard_VGA -> "vga");
+ "hw_video_model", "vga";
"hw_machine_type",
(match guestcaps.gcaps_machine with
| I440FX -> "pc"
diff --git a/output/output.ml b/output/output.ml
index 0de1c2ebb4ba..1d0a9f9bb0b3 100644
--- a/output/output.ml
+++ b/output/output.ml
@@ -1542,10 +1542,7 @@ and qemu_finalize dir source inspect target_meta
| Some p -> p);
"addr=127.0.0.1"]
);
- arg "-vga"
- (match guestcaps.gcaps_video with
- | Standard_VGA -> "std"
- )
+ arg "-vga" "std"
);
(* Add a sound card. *)
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,131 @@
From 357a425635ebd1cf7fdf79fc60c75cecf9cd01ac Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 13 Nov 2021 13:29:34 +0100
Subject: [PATCH] lib/types: replace "source_video" type with plain "string"
The "source_video" union type is basically a string, with a distinguished
constructor for the "cirrus" device model ("Source_Cirrus"). However, this
distinction has been useless since commit 255722cbf39a ("v2v: Modular
virt-v2v", 2021-09-07); now "Source_Cirrus" isn't treated specially.
Replace the "source_video" type with just "string".
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/types.mli | 8 +-------
input/parse_domain_from_vmx.ml | 2 +-
input/parse_libvirt_xml.ml | 4 +---
lib/types.ml | 15 ++-------------
4 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index e0ef222e0455..65efbcc03fec 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -70,7 +70,7 @@ type source = {
s_features : string list; (** Machine features. *)
s_firmware : source_firmware; (** Firmware (BIOS or EFI). *)
s_display : source_display option; (** Guest display. *)
- s_video : source_video option; (** Video adapter. *)
+ s_video : string option; (** Video adapter. *)
s_sound : source_sound option; (** Sound card. *)
s_disks : source_disk list; (** Source disks. *)
s_removables : source_removable list; (** CDROMs etc. *)
@@ -145,10 +145,6 @@ and s_display_listen =
| LSocket of string option (** Listen Unix domain socket. *)
| LNone (** <listen type='none'> *)
-(** Video adapter model. *)
-and source_video = Source_other_video of string |
- Source_Cirrus
-
and source_sound = {
s_sound_model : source_sound_model; (** Sound model. *)
}
@@ -169,8 +165,6 @@ val nic_model_of_string : string -> s_nic_model
val string_of_vnet_type : vnet_type -> string
val string_of_source_sound_model : source_sound_model -> string
val source_sound_model_of_string : string -> source_sound_model option
-val string_of_source_video : source_video -> string
-val source_video_of_string : string -> source_video
val string_of_source_cpu_topology : source_cpu_topology -> string
val string_of_source_hypervisor : source_hypervisor -> string
diff --git a/input/parse_domain_from_vmx.ml b/input/parse_domain_from_vmx.ml
index 4f8beb04a8be..650ddbb7bac1 100644
--- a/input/parse_domain_from_vmx.ml
+++ b/input/parse_domain_from_vmx.ml
@@ -415,7 +415,7 @@ let parse_domain_from_vmx vmx_source =
let video =
if Parse_vmx.namespace_present vmx ["svga"] then
(* We could also parse svga.vramSize. *)
- Some (Source_other_video "vmvga")
+ Some "vmvga"
else
None in
diff --git a/input/parse_libvirt_xml.ml b/input/parse_libvirt_xml.ml
index c53b8001ca77..835649939d22 100644
--- a/input/parse_libvirt_xml.ml
+++ b/input/parse_libvirt_xml.ml
@@ -193,9 +193,7 @@ let parse_libvirt_xml ?conn xml =
let node = Xml.xpathobj_node obj 0 in
Xml.xpathctx_set_current_context xpathctx node;
- match xpath_string "model/@type" with
- | None -> None
- | Some model -> Some (source_video_of_string model)
+ xpath_string "model/@type"
) in
(* Sound card. *)
diff --git a/lib/types.ml b/lib/types.ml
index acca0d989b91..9629bab50d4e 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -36,7 +36,7 @@ type source = {
s_features : string list;
s_firmware : source_firmware;
s_display : source_display option;
- s_video : source_video option;
+ s_video : string option;
s_sound : source_sound option;
s_disks : source_disk list;
s_removables : source_removable list;
@@ -89,9 +89,6 @@ and s_display_listen =
| LSocket of string option
| LNone
-and source_video = Source_other_video of string |
- Source_Cirrus
-
and source_sound = {
s_sound_model : source_sound_model;
}
@@ -141,7 +138,7 @@ NICs:
| Some display -> string_of_source_display display)
(match s.s_video with
| None -> ""
- | Some video -> string_of_source_video video)
+ | Some video -> video)
(match s.s_sound with
| None -> ""
| Some sound -> string_of_source_sound sound)
@@ -259,14 +256,6 @@ and string_of_source_display { s_display_type = typ;
| LNone -> " listening on private fd"
)
-and string_of_source_video = function
- | Source_Cirrus -> "cirrus"
- | Source_other_video video -> video
-
-and source_video_of_string = function
- | "cirrus" -> Source_Cirrus
- | video -> Source_other_video video
-
and string_of_source_sound { s_sound_model = model } =
string_of_source_sound_model model
--
2.19.1.3.g30247aa5d201

View File

@ -0,0 +1,353 @@
From be006c01cf7c8571c3f1535d321fda576ea04687 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Sat, 13 Nov 2021 22:13:53 +0100
Subject: [PATCH] lib/types: remove the "source.s_video" field
Since commit 255722cbf39a ("v2v: Modular virt-v2v", 2021-09-07), the only
use of the "source.s_video" field has been its logging via
"string_of_source", for the "--print-source" debugging option. Given that
the source video controller is available in the source domain description
anyway (that's where "source.s_video" is parsed from), simplify the debug
log code by removing "source.s_video".
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
lib/types.mli | 1 -
input/input.ml | 2 --
input/parse_domain_from_vmx.ml | 8 --------
input/parse_libvirt_xml.ml | 14 --------------
lib/types.ml | 5 -----
tests/test-v2v-i-ova-formats.expected | 1 -
tests/test-v2v-i-ova-gz.expected | 1 -
tests/test-v2v-i-ova-snapshots.expected | 1 -
tests/test-v2v-i-ova-snapshots.expected2 | 1 -
tests/test-v2v-i-ova-subfolders.expected | 1 -
tests/test-v2v-i-ova-subfolders.expected2 | 1 -
tests/test-v2v-i-ova-tar.expected | 1 -
tests/test-v2v-i-ova-tar.expected2 | 1 -
tests/test-v2v-i-ova-two-disks.expected | 1 -
tests/test-v2v-i-ova-two-disks.expected2 | 1 -
tests/test-v2v-i-vmx-1.expected | 1 -
tests/test-v2v-i-vmx-2.expected | 1 -
tests/test-v2v-i-vmx-3.expected | 1 -
tests/test-v2v-i-vmx-4.expected | 1 -
tests/test-v2v-i-vmx-5.expected | 1 -
tests/test-v2v-print-source.expected | 1 -
21 files changed, 46 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index 65efbcc03fec..02913c0cb4a1 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -70,7 +70,6 @@ type source = {
s_features : string list; (** Machine features. *)
s_firmware : source_firmware; (** Firmware (BIOS or EFI). *)
s_display : source_display option; (** Guest display. *)
- s_video : string option; (** Video adapter. *)
s_sound : source_sound option; (** Sound card. *)
s_disks : source_disk list; (** Source disks. *)
s_removables : source_removable list; (** CDROMs etc. *)
diff --git a/input/input.ml b/input/input.ml
index c93de9381bff..9707b2d7e021 100644
--- a/input/input.ml
+++ b/input/input.ml
@@ -272,7 +272,6 @@ and disk_source cmdline args =
s_display =
Some { s_display_type = VNC; s_keymap = None; s_password = None;
s_listen = LNoListen; s_port = None };
- s_video = None;
s_sound = None;
s_disks = s_disks;
s_removables = [];
@@ -596,7 +595,6 @@ and ova_source _ args =
s_features = []; (* XXX *)
s_firmware = firmware;
s_display = None; (* XXX *)
- s_video = None;
s_sound = None;
s_disks = s_disks;
s_removables = removables;
diff --git a/input/parse_domain_from_vmx.ml b/input/parse_domain_from_vmx.ml
index 650ddbb7bac1..d797e94ccfc4 100644
--- a/input/parse_domain_from_vmx.ml
+++ b/input/parse_domain_from_vmx.ml
@@ -412,13 +412,6 @@ let parse_domain_from_vmx vmx_source =
warning (f_"unknown firmware value '%s', assuming BIOS") fw;
BIOS in
- let video =
- if Parse_vmx.namespace_present vmx ["svga"] then
- (* We could also parse svga.vramSize. *)
- Some "vmvga"
- else
- None in
-
let sound =
match Parse_vmx.get_string vmx ["sound"; "virtualDev"] with
| Some "sb16" -> Some { s_sound_model = SB16 }
@@ -445,7 +438,6 @@ let parse_domain_from_vmx vmx_source =
s_features = [];
s_firmware = firmware;
s_display = None;
- s_video = video;
s_sound = sound;
s_disks = List.map fst disks;
s_removables = removables;
diff --git a/input/parse_libvirt_xml.ml b/input/parse_libvirt_xml.ml
index 835649939d22..1e98ce1a8694 100644
--- a/input/parse_libvirt_xml.ml
+++ b/input/parse_libvirt_xml.ml
@@ -183,19 +183,6 @@ let parse_libvirt_xml ?conn xml =
None
) in
- (* Video adapter. *)
- let video =
- let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/video" in
- let nr_nodes = Xml.xpathobj_nr_nodes obj in
- if nr_nodes < 1 then None
- else (
- (* Ignore everything except the first <video> device. *)
- let node = Xml.xpathobj_node obj 0 in
-
- Xml.xpathctx_set_current_context xpathctx node;
- xpath_string "model/@type"
- ) in
-
(* Sound card. *)
let sound =
let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/sound" in
@@ -512,7 +499,6 @@ let parse_libvirt_xml ?conn xml =
s_features = features;
s_firmware = firmware;
s_display = display;
- s_video = video;
s_sound = sound;
s_disks = s_disks;
s_removables = removables;
diff --git a/lib/types.ml b/lib/types.ml
index 9629bab50d4e..894391baecaa 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -36,7 +36,6 @@ type source = {
s_features : string list;
s_firmware : source_firmware;
s_display : source_display option;
- s_video : string option;
s_sound : source_sound option;
s_disks : source_disk list;
s_removables : source_removable list;
@@ -112,7 +111,6 @@ hypervisor type: %s
CPU features: %s
firmware: %s
display: %s
- video: %s
sound: %s
disks:
%s
@@ -136,9 +134,6 @@ NICs:
(match s.s_display with
| None -> ""
| Some display -> string_of_source_display display)
- (match s.s_video with
- | None -> ""
- | Some video -> video)
(match s.s_sound with
| None -> ""
| Some sound -> string_of_source_sound sound)
diff --git a/tests/test-v2v-i-ova-formats.expected b/tests/test-v2v-i-ova-formats.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-formats.expected
+++ b/tests/test-v2v-i-ova-formats.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-gz.expected b/tests/test-v2v-i-ova-gz.expected
index 9ff6ea59ca70..3e7474591f0e 100644
--- a/tests/test-v2v-i-ova-gz.expected
+++ b/tests/test-v2v-i-ova-gz.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-snapshots.expected b/tests/test-v2v-i-ova-snapshots.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-snapshots.expected
+++ b/tests/test-v2v-i-ova-snapshots.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-snapshots.expected2 b/tests/test-v2v-i-ova-snapshots.expected2
index 58e98594046f..dd4525ff9c42 100644
--- a/tests/test-v2v-i-ova-snapshots.expected2
+++ b/tests/test-v2v-i-ova-snapshots.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x, "size": 12288, "file": { "driver": "file", "filename": "test-snapshots.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-subfolders.expected b/tests/test-v2v-i-ova-subfolders.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-subfolders.expected
+++ b/tests/test-v2v-i-ova-subfolders.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-subfolders.expected2 b/tests/test-v2v-i-ova-subfolders.expected2
index e0dd1937d6f6..7b6c544fcc04 100644
--- a/tests/test-v2v-i-ova-subfolders.expected2
+++ b/tests/test-v2v-i-ova-subfolders.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x, "size": 10240, "file": { "driver": "file", "filename": "test.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-tar.expected b/tests/test-v2v-i-ova-tar.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-tar.expected
+++ b/tests/test-v2v-i-ova-tar.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-tar.expected2 b/tests/test-v2v-i-ova-tar.expected2
index 1fa120b9970d..77bc60cf7d05 100644
--- a/tests/test-v2v-i-ova-tar.expected2
+++ b/tests/test-v2v-i-ova-tar.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x, "size": 10240, "file": { "driver": "file", "filename": "test-tar.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-two-disks.expected b/tests/test-v2v-i-ova-two-disks.expected
index bf03c3e865ad..93a97b16f6f4 100644
--- a/tests/test-v2v-i-ova-two-disks.expected
+++ b/tests/test-v2v-i-ova-two-disks.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-two-disks.expected2 b/tests/test-v2v-i-ova-two-disks.expected2
index 92728ab6a782..7c716ccd87c7 100644
--- a/tests/test-v2v-i-ova-two-disks.expected2
+++ b/tests/test-v2v-i-ova-two-disks.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x, "size": 10240, "file": { "driver": "file", "filename": "test.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-vmx-1.expected b/tests/test-v2v-i-vmx-1.expected
index e614e760e2be..bca99c48c5cb 100644
--- a/tests/test-v2v-i-vmx-1.expected
+++ b/tests/test-v2v-i-vmx-1.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-2.expected b/tests/test-v2v-i-vmx-2.expected
index 4ecc6b63db0e..e56777c8509d 100644
--- a/tests/test-v2v-i-vmx-2.expected
+++ b/tests/test-v2v-i-vmx-2.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-3.expected b/tests/test-v2v-i-vmx-3.expected
index afa549da9945..47e4d25eb53a 100644
--- a/tests/test-v2v-i-vmx-3.expected
+++ b/tests/test-v2v-i-vmx-3.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-4.expected b/tests/test-v2v-i-vmx-4.expected
index 919db78a25ac..dd7312945b69 100644
--- a/tests/test-v2v-i-vmx-4.expected
+++ b/tests/test-v2v-i-vmx-4.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-5.expected b/tests/test-v2v-i-vmx-5.expected
index 85a37ca00f74..cfddcda73b9a 100644
--- a/tests/test-v2v-i-vmx-5.expected
+++ b/tests/test-v2v-i-vmx-5.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-print-source.expected b/tests/test-v2v-print-source.expected
index cfeade1c012d..73473f9df877 100644
--- a/tests/test-v2v-print-source.expected
+++ b/tests/test-v2v-print-source.expected
@@ -9,7 +9,6 @@ hypervisor type: kvm
CPU features: acpi,apic,pae
firmware: unknown
display:
- video: vga
sound:
disks:
0 [virtio-blk]
--
2.19.1.3.g30247aa5d201

View File

@ -14,7 +14,7 @@ if [ ! -f virt-v2v.spec ]; then
exit 1
fi
git_checkout=$HOME/d/virt-v2v-rhel-$rhel_version
git_checkout=$HOME/src/v2v/virt-v2v
if [ ! -d $git_checkout ]; then
echo "$0: $git_checkout does not exist"
echo "This script is only for use by the maintainer when preparing a"

View File

@ -1,2 +1,2 @@
SHA512 (virt-v2v-1.45.3.tar.gz) = 24606acb039e630d8cbe4befe232bf9f3e8a2064e931d9064adc59704d34b67269933e2b24cb9f996c31b8c16b4e4f2ebdd7f40c9d29bb0f4a9f3df98d8edf34
SHA512 (virt-v2v-1.45.3.tar.gz.sig) = efbeb0b925b403e6973936a89125b169c7522fc5073a0b8978326de861819a3b8756e219a381e3eac3ee40d97cc16919286a797557e6391e301a0871b38628e7
SHA512 (virt-v2v-1.45.91.tar.gz) = 41b1897b2e491dadce890623bb94e149c2921662f140c25281ad7c60f324438718cf05b61b6b8b56010e1245e45b1843cde3535307d02e269ee60ee4aa125cf8
SHA512 (virt-v2v-1.45.91.tar.gz.sig) = 60c97207f8e8ec61b14a52aa8b1e6080fd9f5a0e795d62eff46b214249d8f6ee41e101b586fdb7c3a2a49c5a2a42f7d4dc55a292d5143f7e57527490bf8fcd42

View File

@ -14,8 +14,8 @@
Name: virt-v2v
Epoch: 1
Version: 1.45.3
Release: 3%{?dist}
Version: 1.45.91
Release: 1%{?dist}
Summary: Convert a virtual machine to run on KVM
License: GPLv2+
@ -50,20 +50,34 @@ ExclusiveArch: x86_64
# Downstream (RHEL-only) patches.
%if 0%{?rhel}
Patch9001: 0001-Revert-v2v-Remove-o-rhv-upload-oa-preallocated.patch
Patch9002: 0002-RHEL-v2v-rhv-upload-Remove-restriction-on-oa-sparse.patch
Patch9003: 0003-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-.patch
Patch9004: 0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch
Patch9005: 0005-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL.patch
Patch9006: 0006-RHEL-Fix-tests-for-libguestfs-winsupport.patch
Patch9007: 0007-RHEL-v2v-Disable-the-virt-v2v-in-place-option.patch
Patch9008: 0008-RHEL-v2v-i-disk-force-VNC-as-display-RHBZ-1372671.patch
Patch9009: 0009-RHEL-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch9010: 0010-RHEL-point-to-KB-for-supported-v2v-hypervisors-guest.patch
Patch9011: 0011-RHEL-9-Disable-o-glance.patch
Patch9012: 0012-v2v-windows-Do-not-fix-NTFS-heads-in-Windows-Vista-a.patch
Patch0001: 0001-RHEL-v2v-Select-correct-qemu-binary-for-o-qemu-mode-RHBZ-1147313.patch
Patch0002: 0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-RHBZ-1147313.patch
Patch0003: 0003-RHEL-Fix-list-of-supported-sound-cards-to-match-RHEL-qemu-RHBZ-1176493.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-v2v-do-not-mention-SUSE-Xen-hosts-RHBZ-1430203.patch
Patch0007: 0007-RHEL-point-to-KB-for-supported-v2v-hypervisors-guests.patch
Patch0008: 0008-RHEL-9-Disable-o-glance.patch
%endif
# Pending upstream patches, for RHBZ#1961107.
Patch0009: 0009-lib-types-introduce-Standard_VGA-constructor-for-guestcaps_video_type.patch
Patch0010: 0010-output-handle-Standard_VGA-in-the-libvirt-XML-and-QEMU-cmdline-formats.patch
Patch0011: 0011-output-handle-Standard_VGA-in-the-OpenStack-format.patch
Patch0012: 0012-output-handle-Standard_VGA-in-the-JSON-format.patch
Patch0013: 0013-convert_linux-flip-target-display-to-Standard_VGA.patch
Patch0014: 0014-convert-windows_virtio-flip-target-display-to-Standard_VGA.patch
Patch0015: 0015-lib-create_ovf-fix-qxl_resourcetype-misnomer.patch
Patch0016: 0016-lib-create_ovf-place-a-standard-VGA-video-device-in-the-OVF-xml.patch
Patch0017: 0017-lib-types-remove-QXL-constructor-for-guestcaps_video_type.patch
Patch0018: 0018-tests-remove-the-fake-Windows-guest-drivers-for-the-QXL-device.patch
Patch0019: 0019-tests-remove-the-remaining-QXL-references-for-completeness.patch
Patch0020: 0020-lib-types-remove-Cirrus-constructor-for-guestcaps_video_type.patch
Patch0021: 0021-convert-windows_virtio-fix-documentation-of-install_drivers-return-type.patch
Patch0022: 0022-lib-types-remove-guestcaps_video_type.patch
Patch0023: 0023-lib-types-replace-source_video-type-with-plain-string.patch
Patch0024: 0024-lib-types-remove-the-source.s_video-field.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif
@ -72,16 +86,17 @@ BuildRequires: make
BuildRequires: /usr/bin/pod2man
BuildRequires: gcc
BuildRequires: ocaml >= 4.01
BuildRequires: libguestfs-devel >= 1:1.42
BuildRequires: libguestfs-devel >= 1:1.42
BuildRequires: augeas-devel
BuildRequires: bash-completion
BuildRequires: file-devel
BuildRequires: gettext-devel
BuildRequires: jansson-devel
BuildRequires: libnbd-devel
BuildRequires: libosinfo-devel
BuildRequires: libvirt-devel
BuildRequires: libvirt-daemon-kvm
BuildRequires: libvirt-devel
BuildRequires: libxml2-devel
BuildRequires: pcre-devel
BuildRequires: perl(Sys::Guestfs)
@ -91,6 +106,7 @@ BuildRequires: xorriso
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-libguestfs-devel
BuildRequires: ocaml-libnbd-devel
BuildRequires: ocaml-fileutils-devel
BuildRequires: ocaml-gettext-devel
%if !0%{?rhel}
@ -118,7 +134,7 @@ Requires: gawk
Requires: gzip
Requires: unzip
Requires: curl
Requires: /usr/bin/virsh
Requires: %{_bindir}/virsh
# Ensure the UEFI firmware is available, to properly convert
# EFI guests (RHBZ#1429643).
@ -129,14 +145,25 @@ Requires: edk2-ovmf
Requires: edk2-aarch64
%endif
# Needed for -it vddk, and -o rhv-upload.
Requires: nbdkit
Requires: libnbd >= 1.8.2-2.el9
Requires: %{_bindir}/qemu-nbd
Requires: %{_bindir}/nbdcopy
Requires: %{_bindir}/nbdinfo
Requires: nbdkit-server >= 1.26.5-1.el9
Requires: nbdkit-curl-plugin
Requires: nbdkit-file-plugin
Requires: nbdkit-nbd-plugin
Requires: nbdkit-null-plugin
Requires: nbdkit-python-plugin
Requires: nbdkit-ssh-plugin
%ifarch x86_64
Requires: nbdkit-vddk-plugin
%endif
Requires: nbdkit-cacheextents-filter
Requires: nbdkit-cow-filter >= 1.26.5-1.el9
Requires: nbdkit-rate-filter
Requires: nbdkit-readahead-filter
Requires: nbdkit-retry-filter
# For rhsrvany.exe, used to install firstboot scripts in Windows guests.
Requires: mingw32-srvany >= 1.0-13
@ -259,6 +286,9 @@ popd
%files -f %{name}.lang
%license COPYING
%doc README
%{_bindir}/helper-v2v-convert
%{_bindir}/helper-v2v-input
%{_bindir}/helper-v2v-output
%{_bindir}/virt-v2v
%{_mandir}/man1/virt-v2v.1*
%{_mandir}/man1/virt-v2v-hacking.1*
@ -288,6 +318,11 @@ popd
%changelog
* Wed Nov 24 2021 Laszlo Ersek <lersek@redhat.com> - 1:1.45.91-1
- Rebase to upstream 1.45.91.
- Add pending upstream patches (v2) for 1961107.
resolves: rhbz#2011713
* Wed Aug 18 2021 Richard W.M. Jones <rjones@redhat.com> - 1:1.45.3-3
- Fix conversion of Windows BitLocker guests
resolves: rhbz#1994984