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

fda521
From b896dab3d8d4226b246e2e90d07235a38b6c8a79 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 ++----
3156cb
 docs/virt-v2v.pod              | 12 ------------
3156cb
 output/output_qemu.ml          |  3 +++
3156cb
 v2v/v2v.ml                     |  2 --
3156cb
 4 files changed, 5 insertions(+), 18 deletions(-)
c232e6
c232e6
diff --git a/docs/virt-v2v-output-local.pod b/docs/virt-v2v-output-local.pod
c232e6
index a5f155cb..3a2e6238 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
 
c232e6
  virt-v2v [-i* options] -o json -os DIRECTORY
c232e6
                         [-oo json-disks-pattern=PATTERN]
c232e6
@@ -50,12 +50,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
 
c232e6
 =item B<-o json -os> C<DIRECTORY>
c232e6
 
c232e6
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
fda521
index f50d27a0..9b1e44a1 100644
c232e6
--- a/docs/virt-v2v.pod
c232e6
+++ b/docs/virt-v2v.pod
fda521
@@ -140,11 +140,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
fda521
@@ -509,9 +504,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>.
fda521
@@ -765,10 +757,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
fda521
index 700de058..3ad98a58 100644
3156cb
--- a/output/output_qemu.ml
3156cb
+++ b/output/output_qemu.ml
fda521
@@ -63,6 +63,9 @@ module QEMU = struct
fda521
       ) options.output_options;
fda521
     let 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
fda521
index 7bd47c1e..a66fa285 100644
3156cb
--- a/v2v/v2v.ml
3156cb
+++ b/v2v/v2v.ml
3156cb
@@ -277,8 +277,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"),
c232e6
-- 
c232e6
2.31.1
c232e6