Blame SOURCES/0002-RHEL-v2v-Disable-the-qemu-boot-oo-qemu-boot-option-R.patch

7bddab
From b896dab3d8d4226b246e2e90d07235a38b6c8a79 Mon Sep 17 00:00:00 2001
7bddab
From: "Richard W.M. Jones" <rjones@redhat.com>
7bddab
Date: Tue, 30 Sep 2014 10:50:27 +0100
7bddab
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
7bddab
 (RHBZ#1147313).
7bddab
7bddab
This cannot work because there is no Gtk or SDL output mode
7bddab
in RHEL's qemu-kvm.
7bddab
7bddab
In addition you will have to edit the -display option in the
7bddab
qemu script.
7bddab
---
7bddab
 docs/virt-v2v-output-local.pod |  6 ++----
7bddab
 docs/virt-v2v.pod              | 12 ------------
7bddab
 output/output_qemu.ml          |  3 +++
7bddab
 v2v/v2v.ml                     |  2 --
7bddab
 4 files changed, 5 insertions(+), 18 deletions(-)
7bddab
7bddab
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
7bddab
index a5f155cb..3a2e6238 100644
7bddab
--- a/docs/virt-v2v-output-local.pod
7bddab
+++ b/docs/virt-v2v-output-local.pod
7bddab
@@ -9,7 +9,7 @@ or libvirt
7bddab
 
7bddab
  virt-v2v [-i* options] -o local -os DIRECTORY
7bddab
 
7bddab
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
7bddab
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
7bddab
 
7bddab
  virt-v2v [-i* options] -o json -os DIRECTORY
7bddab
                         [-oo json-disks-pattern=PATTERN]
7bddab
@@ -50,12 +50,10 @@ where C<NAME> is the guest name.
7bddab
 
7bddab
 =item B<-o qemu -os> C<DIRECTORY>
7bddab
 
7bddab
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
7bddab
-
7bddab
 This converts the guest to files in C<DIRECTORY>.  Unlike I<-o local>
7bddab
 above, a shell script is created which contains the raw qemu command
7bddab
 you would need to boot the guest.  However the shell script is not
7bddab
-run, I<unless> you also add the I<--qemu-boot> option.
7bddab
+run.
7bddab
 
7bddab
 =item B<-o json -os> C<DIRECTORY>
7bddab
 
7bddab
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
7bddab
index f50d27a0..9b1e44a1 100644
7bddab
--- a/docs/virt-v2v.pod
7bddab
+++ b/docs/virt-v2v.pod
7bddab
@@ -140,11 +140,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
7bddab
 image(s) you do not need to specify the name of the disk image on the
7bddab
 command line.
7bddab
 
7bddab
-To convert a local disk image and immediately boot it in local
7bddab
-qemu, do:
7bddab
-
7bddab
- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot
7bddab
-
7bddab
 =head1 OPTIONS
7bddab
 
7bddab
 =over 4
7bddab
@@ -509,9 +504,6 @@ This is similar to I<-o local>, except that a shell script is written
7bddab
 which you can use to boot the guest in qemu.  The converted disks and
7bddab
 shell script are written to the directory specified by I<-os>.
7bddab
 
7bddab
-When using this output mode, you can also specify the I<-oo qemu-boot>
7bddab
-option which boots the guest under qemu immediately.
7bddab
-
7bddab
 =item B<-o> B<rhev>
7bddab
 
7bddab
 This is the same as I<-o rhv>.
7bddab
@@ -765,10 +757,6 @@ Print information about the source guest and stop.  This option is
7bddab
 useful when you are setting up network and bridge maps.
7bddab
 See L</Networks and bridges>.
7bddab
 
7bddab
-=item B<--qemu-boot>
7bddab
-
7bddab
-This is the same as I<-oo qemu-boot>.
7bddab
-
7bddab
 =item B<-q>
7bddab
 
7bddab
 =item B<--quiet>
7bddab
diff --git a/output/output_qemu.ml b/output/output_qemu.ml
7bddab
index 700de058..3ad98a58 100644
7bddab
--- a/output/output_qemu.ml
7bddab
+++ b/output/output_qemu.ml
7bddab
@@ -63,6 +63,9 @@ module QEMU = struct
7bddab
       ) options.output_options;
7bddab
     let qemu_boot = !qemu_boot in
7bddab
 
7bddab
+    if qemu_boot then
7bddab
+      error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL");
7bddab
+
7bddab
     (* -os must be set to a directory. *)
7bddab
     let output_storage =
7bddab
       match options.output_storage with
7bddab
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
7bddab
index 7bd47c1e..a66fa285 100644
7bddab
--- a/v2v/v2v.ml
7bddab
+++ b/v2v/v2v.ml
7bddab
@@ -277,8 +277,6 @@ let rec main () =
7bddab
       s_"Same as ‘-ip filename’";
7bddab
     [ L"print-source" ], Getopt.Set print_source,
7bddab
       s_"Print source and stop";
7bddab
-    [ L"qemu-boot" ], Getopt.Unit (fun () -> set_output_option_compat "qemu-boot" ""),
7bddab
-      s_"Boot in qemu (-o qemu only)";
7bddab
     [ L"root" ],     Getopt.String ("ask|... ", set_root_choice),
7bddab
       s_"How to choose root filesystem";
7bddab
     [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
7bddab
-- 
7bddab
2.31.1
7bddab