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

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