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

c1a9fa
From 610f53a67a0804ee76e9213c503b7bb00dd722b8 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
c1a9fa
index d2a1c270..0be37f5e 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
 
c1a9fa
  virt-v2v [-i* options] -o null
c1a9fa
 
c1a9fa
@@ -47,12 +47,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
 
c1a9fa
 =item B<-o null>
7bddab
 
7bddab
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
c1a9fa
index 4e912b6c..7d0bafff 100644
7bddab
--- a/docs/virt-v2v.pod
7bddab
+++ b/docs/virt-v2v.pod
c1a9fa
@@ -139,11 +139,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
c1a9fa
@@ -487,9 +482,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>.
c1a9fa
@@ -743,10 +735,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
c1a9fa
index 7f2e9284..527d3c5e 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
c1a9fa
index 9790416e..97b4e4ec 100644
7bddab
--- a/v2v/v2v.ml
7bddab
+++ b/v2v/v2v.ml
c1a9fa
@@ -270,8 +270,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"),