Blame SOURCES/0015-RHEL-8-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch

61e9b3
From 7df465dede750140bbc5a2579a5256061af63e03 Mon Sep 17 00:00:00 2001
61e9b3
From: "Richard W.M. Jones" <rjones@redhat.com>
61e9b3
Date: Tue, 30 Sep 2014 10:50:27 +0100
61e9b3
Subject: [PATCH] RHEL 8: v2v: Disable the --qemu-boot option (RHBZ#1147313).
61e9b3
61e9b3
This cannot work because there is no Gtk or SDL output mode
61e9b3
in RHEL 8's qemu-kvm.
61e9b3
61e9b3
In addition you will have to edit the -display option in the
61e9b3
qemu script.
61e9b3
---
61e9b3
 docs/virt-v2v-output-local.pod |  6 ++----
61e9b3
 docs/virt-v2v.pod              | 13 -------------
61e9b3
 v2v/cmdline.ml                 |  3 ++-
61e9b3
 3 files changed, 4 insertions(+), 18 deletions(-)
61e9b3
61e9b3
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
61e9b3
index a5f155cb..3a2e6238 100644
61e9b3
--- a/docs/virt-v2v-output-local.pod
61e9b3
+++ b/docs/virt-v2v-output-local.pod
61e9b3
@@ -9,7 +9,7 @@ or libvirt
61e9b3
 
61e9b3
  virt-v2v [-i* options] -o local -os DIRECTORY
61e9b3
 
61e9b3
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
61e9b3
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
61e9b3
 
61e9b3
  virt-v2v [-i* options] -o json -os DIRECTORY
61e9b3
                         [-oo json-disks-pattern=PATTERN]
61e9b3
@@ -50,12 +50,10 @@ where C<NAME> is the guest name.
61e9b3
 
61e9b3
 =item B<-o qemu -os> C<DIRECTORY>
61e9b3
 
61e9b3
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
61e9b3
-
61e9b3
 This converts the guest to files in C<DIRECTORY>.  Unlike I<-o local>
61e9b3
 above, a shell script is created which contains the raw qemu command
61e9b3
 you would need to boot the guest.  However the shell script is not
61e9b3
-run, I<unless> you also add the I<--qemu-boot> option.
61e9b3
+run.
61e9b3
 
61e9b3
 =item B<-o json -os> C<DIRECTORY>
61e9b3
 
61e9b3
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
61e9b3
index 74934eb4..a19f0a73 100644
61e9b3
--- a/docs/virt-v2v.pod
61e9b3
+++ b/docs/virt-v2v.pod
61e9b3
@@ -144,11 +144,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
61e9b3
 image(s) you do not need to specify the name of the disk image on the
61e9b3
 command line.
61e9b3
 
61e9b3
-To convert a local disk image and immediately boot it in local
61e9b3
-qemu, do:
61e9b3
-
61e9b3
- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot
61e9b3
-
61e9b3
 =head1 OPTIONS
61e9b3
 
61e9b3
 =over 4
61e9b3
@@ -537,9 +532,6 @@ This is similar to I<-o local>, except that a shell script is written
61e9b3
 which you can use to boot the guest in qemu.  The converted disks and
61e9b3
 shell script are written to the directory specified by I<-os>.
61e9b3
 
61e9b3
-When using this output mode, you can also specify the I<--qemu-boot>
61e9b3
-option which boots the guest under qemu immediately.
61e9b3
-
61e9b3
 =item B<-o> B<rhev>
61e9b3
 
61e9b3
 This is the same as I<-o rhv>.
61e9b3
@@ -815,11 +807,6 @@ Print information about the source guest and stop.  This option is
61e9b3
 useful when you are setting up network and bridge maps.
61e9b3
 See L</Networks and bridges>.
61e9b3
 
61e9b3
-=item B<--qemu-boot>
61e9b3
-
61e9b3
-When using I<-o qemu> only, this boots the guest immediately after
61e9b3
-virt-v2v finishes.
61e9b3
-
61e9b3
 =item B<-q>
61e9b3
 
61e9b3
 =item B<--quiet>
61e9b3
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
61e9b3
index 3b74f307..df69e2e0 100644
61e9b3
--- a/v2v/cmdline.ml
61e9b3
+++ b/v2v/cmdline.ml
61e9b3
@@ -284,7 +284,6 @@ let parse_cmdline () =
61e9b3
                                     s_"Estimate size of source and stop";
61e9b3
     [ L"print-source" ], Getopt.Set print_source,
61e9b3
                                     s_"Print source and stop";
61e9b3
-    [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)";
61e9b3
     [ L"root" ],     Getopt.String ("ask|... ", set_root_choice),
61e9b3
                                     s_"How to choose root filesystem";
61e9b3
     [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
61e9b3
@@ -668,6 +667,8 @@ read the man page virt-v2v(1).
61e9b3
         | Some d when not (is_directory d) ->
61e9b3
            error (f_"-os %s: output directory does not exist or is not a directory") d
61e9b3
         | Some d -> d in
61e9b3
+      if qemu_boot then
61e9b3
+        error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL");
61e9b3
       Output_qemu.output_qemu os qemu_boot,
61e9b3
       output_format, output_alloc
61e9b3
 
61e9b3
-- 
61e9b3
2.27.0
61e9b3