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

3156cb
From 1c1eb51b4f7e9d5f1e2aef7d695181a14fbd0a7d 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
3156cb
index 3d0e00a3..04f3efd2 100644
c232e6
--- a/docs/virt-v2v.pod
c232e6
+++ b/docs/virt-v2v.pod
c232e6
@@ -141,11 +141,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
3156cb
@@ -510,9 +505,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>.
3156cb
@@ -768,10 +760,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
3156cb
index c4265703..822e4c72 100644
3156cb
--- a/output/output_qemu.ml
3156cb
+++ b/output/output_qemu.ml
3156cb
@@ -52,6 +52,9 @@ and qemu_parse_options options =
3156cb
     ) options.output_options;
3156cb
   let qemu_boot = !qemu_boot in
3156cb
 
3156cb
+  if qemu_boot then
3156cb
+    error (f_"-o qemu: the -oo qemu-boot option cannot be used in RHEL");
3156cb
+
3156cb
   (* -os must be set to a directory. *)
3156cb
   let output_storage =
3156cb
     match options.output_storage with
3156cb
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
3156cb
index 47e6e937..503dfb55 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