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

b85204
From cf636bf489fd5a58f451c9da045cbcb856330bd7 Mon Sep 17 00:00:00 2001
c232e6
From: "Richard W.M. Jones" <rjones@redhat.com>
c232e6
Date: Tue, 30 Sep 2014 10:50:27 +0100
3156cb
Subject: [PATCH] RHEL: v2v: Disable the --qemu-boot / -oo qemu-boot option
c232e6
 (RHBZ#1147313).
c232e6
c232e6
This cannot work because there is no Gtk or SDL output mode
c232e6
in RHEL's qemu-kvm.
c232e6
c232e6
In addition you will have to edit the -display option in the
c232e6
qemu script.
c232e6
---
c232e6
 docs/virt-v2v-output-local.pod |  6 ++----
b85204
 docs/virt-v2v.pod              | 17 -----------------
3156cb
 output/output_qemu.ml          |  3 +++
3156cb
 v2v/v2v.ml                     |  2 --
b85204
 4 files changed, 5 insertions(+), 23 deletions(-)
c232e6
c232e6
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
696189
index d2a1c270..0be37f5e 100644
c232e6
--- a/docs/virt-v2v-output-local.pod
c232e6
+++ b/docs/virt-v2v-output-local.pod
c232e6
@@ -9,7 +9,7 @@ or libvirt
c232e6
 
c232e6
  virt-v2v [-i* options] -o local -os DIRECTORY
c232e6
 
c232e6
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
c232e6
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
c232e6
 
696189
  virt-v2v [-i* options] -o null
696189
 
696189
@@ -47,12 +47,10 @@ where C<NAME> is the guest name.
c232e6
 
c232e6
 =item B<-o qemu -os> C<DIRECTORY>
c232e6
 
c232e6
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
c232e6
-
c232e6
 This converts the guest to files in C<DIRECTORY>.  Unlike I<-o local>
c232e6
 above, a shell script is created which contains the raw qemu command
c232e6
 you would need to boot the guest.  However the shell script is not
c232e6
-run, I<unless> you also add the I<--qemu-boot> option.
c232e6
+run.
c232e6
 
696189
 =item B<-o null>
c232e6
 
c232e6
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
b85204
index b458607d..6cfe9e44 100644
c232e6
--- a/docs/virt-v2v.pod
c232e6
+++ b/docs/virt-v2v.pod
b85204
@@ -144,11 +144,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
c232e6
 image(s) you do not need to specify the name of the disk image on the
c232e6
 command line.
c232e6
 
c232e6
-To convert a local disk image and immediately boot it in local
c232e6
-qemu, do:
c232e6
-
3156cb
- virt-v2v -i disk disk.img -o qemu -os /var/tmp -oo qemu-boot
c232e6
-
c232e6
 =head1 OPTIONS
c232e6
 
c232e6
 =over 4
b85204
@@ -507,9 +502,6 @@ This is similar to I<-o local>, except that a shell script is written
c232e6
 which you can use to boot the guest in qemu.  The converted disks and
c232e6
 shell script are written to the directory specified by I<-os>.
c232e6
 
3156cb
-When using this output mode, you can also specify the I<-oo qemu-boot>
c232e6
-option which boots the guest under qemu immediately.
c232e6
-
c232e6
 =item B<-o> B<rhev>
c232e6
 
c232e6
 This is the same as I<-o rhv>.
b85204
@@ -588,11 +580,6 @@ For I<-o openstack> (L<virt-v2v-output-openstack(1)>) only, set a guest ID
b85204
 which is saved on each Cinder volume in the C<virt_v2v_guest_id>
b85204
 volume property.
b85204
 
b85204
-=item B<-oo qemu-boot>
b85204
-
b85204
-When using I<-o qemu> only, this boots the guest immediately after
b85204
-virt-v2v finishes.
b85204
-
b85204
 =item B<-oo verify-server-certificate>
b85204
 
b85204
 =item B<-oo verify-server-certificate=>C<true|false>
b85204
@@ -763,10 +750,6 @@ Print information about the source guest and stop.  This option is
c232e6
 useful when you are setting up network and bridge maps.
c232e6
 See L</Networks and bridges>.
c232e6
 
c232e6
-=item B<--qemu-boot>
c232e6
-
3156cb
-This is the same as I<-oo qemu-boot>.
c232e6
-
c232e6
 =item B<-q>
c232e6
 
c232e6
 =item B<--quiet>
3156cb
diff --git a/output/output_qemu.ml b/output/output_qemu.ml
b85204
index 3a57a009..4be9b650 100644
3156cb
--- a/output/output_qemu.ml
3156cb
+++ b/output/output_qemu.ml
b85204
@@ -65,6 +65,9 @@ module QEMU = struct
b85204
     let compressed = !compressed
b85204
     and qemu_boot = !qemu_boot in
3156cb
 
fda521
+    if qemu_boot then
fda521
+      error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL");
3156cb
+
fda521
     (* -os must be set to a directory. *)
fda521
     let output_storage =
fda521
       match options.output_storage with
3156cb
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
b85204
index 7a01eab5..dc747804 100644
3156cb
--- a/v2v/v2v.ml
3156cb
+++ b/v2v/v2v.ml
b85204
@@ -272,8 +272,6 @@ let rec main () =
3156cb
       s_"Same as ‘-ip filename’";
c232e6
     [ L"print-source" ], Getopt.Set print_source,
3156cb
       s_"Print source and stop";
3156cb
-    [ L"qemu-boot" ], Getopt.Unit (fun () -> set_output_option_compat "qemu-boot" ""),
3156cb
-      s_"Boot in qemu (-o qemu only)";
c232e6
     [ L"root" ],     Getopt.String ("ask|... ", set_root_choice),
3156cb
       s_"How to choose root filesystem";
c232e6
     [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),