mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

5ce0c7
From 4190aec225ec3bf4d1e39fbde89131d4c8a6a9a7 Mon Sep 17 00:00:00 2001
46b2f6
From: "Richard W.M. Jones" <rjones@redhat.com>
46b2f6
Date: Tue, 30 Sep 2014 10:50:27 +0100
46b2f6
Subject: [PATCH] RHEL 8: v2v: Disable the --qemu-boot option (RHBZ#1147313).
46b2f6
46b2f6
This cannot work because there is no Gtk or SDL output mode
46b2f6
in RHEL 8's qemu-kvm.
46b2f6
46b2f6
In addition you will have to edit the -display option in the
46b2f6
qemu script.
46b2f6
---
46b2f6
 v2v/cmdline.ml                |  3 ++-
46b2f6
 v2v/virt-v2v-output-local.pod |  6 ++----
46b2f6
 v2v/virt-v2v.pod              | 13 -------------
46b2f6
 3 files changed, 4 insertions(+), 18 deletions(-)
46b2f6
46b2f6
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
46b2f6
index 686631271..e3578ddcb 100644
46b2f6
--- a/v2v/cmdline.ml
46b2f6
+++ b/v2v/cmdline.ml
46b2f6
@@ -262,7 +262,6 @@ let parse_cmdline () =
46b2f6
                                     s_"Estimate size of source and stop";
46b2f6
     [ L"print-source" ], Getopt.Set print_source,
46b2f6
                                     s_"Print source and stop";
46b2f6
-    [ L"qemu-boot" ], Getopt.Set qemu_boot, s_"Boot in qemu (-o qemu only)";
46b2f6
     [ L"root" ],     Getopt.String ("ask|... ", set_root_choice),
46b2f6
                                     s_"How to choose root filesystem";
46b2f6
     [ L"vddk-config" ], Getopt.String ("filename", set_input_option_compat "vddk-config"),
46b2f6
@@ -640,6 +639,8 @@ read the man page virt-v2v(1).
46b2f6
         | Some d when not (is_directory d) ->
46b2f6
            error (f_"-os %s: output directory does not exist or is not a directory") d
46b2f6
         | Some d -> d in
46b2f6
+      if qemu_boot then
46b2f6
+        error (f_"-o qemu: the --qemu-boot option cannot be used in RHEL");
46b2f6
       Output_qemu.output_qemu os qemu_boot,
46b2f6
       output_format, output_alloc
46b2f6
 
46b2f6
diff --git a/v2v/virt-v2v-output-local.pod b/v2v/virt-v2v-output-local.pod
46b2f6
index 7c397c0a4..09a11a7b0 100644
46b2f6
--- a/v2v/virt-v2v-output-local.pod
46b2f6
+++ b/v2v/virt-v2v-output-local.pod
46b2f6
@@ -9,7 +9,7 @@ or libvirt
46b2f6
 
46b2f6
  virt-v2v [-i* options] -o local -os DIRECTORY
46b2f6
 
46b2f6
- virt-v2v [-i* options] -o qemu -os DIRECTORY [--qemu-boot]
46b2f6
+ virt-v2v [-i* options] -o qemu -os DIRECTORY
46b2f6
 
46b2f6
  virt-v2v [-i* options] -o json -os DIRECTORY
46b2f6
                         [-oo json-disks-pattern=PATTERN]
46b2f6
@@ -50,12 +50,10 @@ where C<NAME> is the guest name.
46b2f6
 
46b2f6
 =item B<-o qemu -os> C<DIRECTORY>
46b2f6
 
46b2f6
-=item B<-o qemu -os> C<DIRECTORY> B<--qemu-boot>
46b2f6
-
46b2f6
 This converts the guest to files in C<DIRECTORY>.  Unlike I<-o local>
46b2f6
 above, a shell script is created which contains the raw qemu command
46b2f6
 you would need to boot the guest.  However the shell script is not
46b2f6
-run, I<unless> you also add the I<--qemu-boot> option.
46b2f6
+run.
46b2f6
 
46b2f6
 =item B<-o json -os> C<DIRECTORY>
46b2f6
 
46b2f6
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
46b2f6
index 25041d0ec..bd606592b 100644
46b2f6
--- a/v2v/virt-v2v.pod
46b2f6
+++ b/v2v/virt-v2v.pod
46b2f6
@@ -142,11 +142,6 @@ Since F<guest-domain.xml> contains the path(s) to the guest disk
46b2f6
 image(s) you do not need to specify the name of the disk image on the
46b2f6
 command line.
46b2f6
 
46b2f6
-To convert a local disk image and immediately boot it in local
46b2f6
-qemu, do:
46b2f6
-
46b2f6
- virt-v2v -i disk disk.img -o qemu -os /var/tmp --qemu-boot
46b2f6
-
46b2f6
 =head1 OPTIONS
46b2f6
 
46b2f6
 =over 4
46b2f6
@@ -510,9 +505,6 @@ This is similar to I<-o local>, except that a shell script is written
46b2f6
 which you can use to boot the guest in qemu.  The converted disks and
46b2f6
 shell script are written to the directory specified by I<-os>.
46b2f6
 
46b2f6
-When using this output mode, you can also specify the I<--qemu-boot>
46b2f6
-option which boots the guest under qemu immediately.
46b2f6
-
46b2f6
 =item B<-o> B<rhev>
46b2f6
 
46b2f6
 This is the same as I<-o rhv>.
46b2f6
@@ -788,11 +780,6 @@ Print information about the source guest and stop.  This option is
46b2f6
 useful when you are setting up network and bridge maps.
46b2f6
 See L</Networks and bridges>.
46b2f6
 
46b2f6
-=item B<--qemu-boot>
46b2f6
-
46b2f6
-When using I<-o qemu> only, this boots the guest immediately after
46b2f6
-virt-v2v finishes.
46b2f6
-
46b2f6
 =item B<-q>
46b2f6
 
46b2f6
 =item B<--quiet>
46b2f6
-- 
5ce0c7
2.18.4
46b2f6