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

1359b8
From b638c2083ee9af57d036859e8a807ad56e9e9361 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 ++----
c659c5
 docs/virt-v2v.pod              | 17 -----------------
7bddab
 output/output_qemu.ml          |  3 +++
7bddab
 v2v/v2v.ml                     |  2 --
c659c5
 4 files changed, 5 insertions(+), 23 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
c659c5
index b458607d..6cfe9e44 100644
7bddab
--- a/docs/virt-v2v.pod
7bddab
+++ b/docs/virt-v2v.pod
c659c5
@@ -144,11 +144,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
c659c5
@@ -507,9 +502,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>.
c659c5
@@ -588,11 +580,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
c659c5
 which is saved on each Cinder volume in the C<virt_v2v_guest_id>
c659c5
 volume property.
c659c5
 
c659c5
-=item B<-oo qemu-boot>
c659c5
-
c659c5
-When using I<-o qemu> only, this boots the guest immediately after
c659c5
-virt-v2v finishes.
c659c5
-
c659c5
 =item B<-oo verify-server-certificate>
c659c5
 
c659c5
 =item B<-oo verify-server-certificate=>C<true|false>
c659c5
@@ -763,10 +750,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
c659c5
index 3a57a009..4be9b650 100644
7bddab
--- a/output/output_qemu.ml
7bddab
+++ b/output/output_qemu.ml
c659c5
@@ -65,6 +65,9 @@ module QEMU = struct
c659c5
     let compressed = !compressed
c659c5
     and 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
c659c5
index 7a01eab5..dc747804 100644
7bddab
--- a/v2v/v2v.ml
7bddab
+++ b/v2v/v2v.ml
c659c5
@@ -272,8 +272,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"),