Blame SOURCES/0004-RHEL-v2v-Disable-the-qemu-boot-option-RHBZ-1147313.patch

c232e6
From bb55b78b68e6e8039734eb1d7af22b455f8fbdc2 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
c232e6
Subject: [PATCH 04/12] RHEL: v2v: Disable the --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 ++----
c232e6
 docs/virt-v2v.pod              | 13 -------------
c232e6
 v2v/cmdline.ml                 |  3 ++-
c232e6
 3 files changed, 4 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
c232e6
index bdf4d716..83f6fd4d 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
-
c232e6
- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot
c232e6
-
c232e6
 =head1 OPTIONS
c232e6
 
c232e6
 =over 4
c232e6
@@ -528,9 +523,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
 
c232e6
-When using this output mode, you can also specify the I<--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>.
c232e6
@@ -775,11 +767,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
-
c232e6
-When using I<-o qemu> only, this boots the guest immediately after
c232e6
-virt-v2v finishes.
c232e6
-
c232e6
 =item B<-q>
c232e6
 
c232e6
 =item B<--quiet>
c232e6
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
c232e6
index 5e7c01f8..ac10ec31 100644
c232e6
--- a/v2v/cmdline.ml
c232e6
+++ b/v2v/cmdline.ml
c232e6
@@ -276,7 +276,6 @@ let parse_cmdline () =
c232e6
                                     s_"Same as ‘-ip filename’";
c232e6
     [ L"print-source" ], Getopt.Set print_source,
c232e6
                                     s_"Print source and stop";
c232e6
-    [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)";
c232e6
     [ L"root" ],     Getopt.String ("ask|... ", set_root_choice),
c232e6
                                     s_"How to choose root filesystem";
c232e6
     [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
c232e6
@@ -652,6 +651,8 @@ read the man page virt-v2v(1).
c232e6
         | Some d when not (is_directory d) ->
c232e6
            error (f_"-os %s: output directory does not exist or is not a directory") d
c232e6
         | Some d -> d in
c232e6
+      if qemu_boot then
c232e6
+        error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL");
c232e6
       Output_qemu.output_qemu os qemu_boot,
c232e6
       output_format, output_alloc
c232e6
 
c232e6
-- 
c232e6
2.31.1
c232e6