Blame SOURCES/0009-RHEL-Remove-the-in-place-option.patch

7bddab
From c7c14141d1c985dbba8749f9209b78d96200c2b3 Mon Sep 17 00:00:00 2001
7bddab
From: "Richard W.M. Jones" <rjones@redhat.com>
7bddab
Date: Thu, 2 Dec 2021 11:56:05 +0000
7bddab
Subject: [PATCH] RHEL: Remove the --in-place option
7bddab
7bddab
This disables the virt-v2v --in-place option which we do not
7bddab
wish to support in RHEL.
7bddab
---
7bddab
 docs/virt-v2v.pod | 49 -----------------------------------------------
7bddab
 v2v/v2v.ml        |  8 --------
7bddab
 2 files changed, 57 deletions(-)
7bddab
7bddab
diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod
7bddab
index a1e00db8..a3fc3dc8 100644
7bddab
--- a/docs/virt-v2v.pod
7bddab
+++ b/docs/virt-v2v.pod
7bddab
@@ -8,10 +8,6 @@ virt-v2v - Convert a guest to use KVM
7bddab
           [-o mode] [other -o* options]
7bddab
           [guest|filename]
7bddab
 
7bddab
- virt-v2v --in-place
7bddab
-          [-i mode] [other -i* options]
7bddab
-          [guest|filename]
7bddab
-
7bddab
 =head1 DESCRIPTION
7bddab
 
7bddab
 Virt-v2v converts a single guest from a foreign hypervisor to run on
7bddab
@@ -37,12 +33,6 @@ The input and output sides of virt-v2v are separate and unrelated.
7bddab
 Virt-v2v can read from any input and write to any output.  Therefore
7bddab
 these sides of virt-v2v are documented separately in this manual.
7bddab
 
7bddab
-Virt-v2v normally copies from the input to the output, called "copying
7bddab
-mode".  In this case the source guest is always left unchanged.
7bddab
-In-place conversion (I<--in-place>) only uses the I<-i*> options and
7bddab
-modifies the source guest in-place.  (See L</In-place conversion>
7bddab
-below.)
7bddab
-
7bddab
 =head2 Other virt-v2v topics
7bddab
 
7bddab
 L<virt-v2v-support(1)> — Supported hypervisors, virtualization
7bddab
@@ -289,20 +279,6 @@ For I<-i disk> only, this specifies the format of the input disk
7bddab
 image.  For other input methods you should specify the input
7bddab
 format in the metadata.
7bddab
 
7bddab
-=item B<--in-place>
7bddab
-
7bddab
-Do not create an output virtual machine in the target hypervisor.
7bddab
-Instead, adjust the guest OS in the source VM to run in the input
7bddab
-hypervisor.
7bddab
-
7bddab
-This mode is meant for integration with other toolsets, which take the
7bddab
-responsibility of converting the VM configuration, providing for
7bddab
-rollback in case of errors, transforming the storage, etc.
7bddab
-
7bddab
-See L</In-place conversion> below.
7bddab
-
7bddab
-Conflicts with all I<-o *> options.
7bddab
-
7bddab
 =item B<-io> OPTION=VALUE
7bddab
 
7bddab
 Set input option(s) related to the current input mode or transport.
7bddab
@@ -1417,31 +1393,6 @@ that instead.
7bddab
    </devices>
7bddab
  </domain>
7bddab
 
7bddab
-=head2 In-place conversion
7bddab
-
7bddab
-It is also possible to use virt-v2v in scenarios where a foreign VM
7bddab
-has already been imported into a KVM-based hypervisor, but still needs
7bddab
-adjustments in the guest to make it run in the new virtual hardware.
7bddab
-
7bddab
-In that case it is assumed that a third-party tool has created the
7bddab
-target VM in the supported KVM-based hypervisor based on the source VM
7bddab
-configuration and contents, but using virtual devices more appropriate
7bddab
-for KVM (e.g. virtio storage and network, etc.).
7bddab
-
7bddab
-Then, to make the guest OS boot and run in the changed environment,
7bddab
-one can use:
7bddab
-
7bddab
- virt-v2v -ic qemu:///system converted_vm --in-place
7bddab
-
7bddab
-Virt-v2v will analyze the configuration of C<converted_vm> in the
7bddab
-C<qemu:///system> libvirt instance, and apply various fixups to the
7bddab
-guest OS configuration to make it match the VM configuration.  This
7bddab
-may include installing virtio drivers, configuring the bootloader, the
7bddab
-mountpoints, the network interfaces, and so on.
7bddab
-
7bddab
-Should an error occur during the operation, virt-v2v exits with an
7bddab
-error code leaving the VM in an undefined state.
7bddab
-
7bddab
 =head2 Machine readable output
7bddab
 
7bddab
 The I<--machine-readable> option can be used to make the output more
7bddab
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
7bddab
index c9ddce36..6859a02c 100644
7bddab
--- a/v2v/v2v.ml
7bddab
+++ b/v2v/v2v.ml
7bddab
@@ -183,7 +183,6 @@ let rec main () =
7bddab
   let output_storage = ref None in
7bddab
 
7bddab
   (* Other options that we handle here. *)
7bddab
-  let in_place = ref false in
7bddab
   let print_source = ref false in
7bddab
 
7bddab
   let input_mode = ref `Not_set in
7bddab
@@ -248,8 +247,6 @@ let rec main () =
7bddab
                                     s_"Use password from file to connect to input hypervisor";
7bddab
     [ M"it" ],       Getopt.String ("transport", set_string_option_once "-it" input_transport),
7bddab
                                     s_"Input transport";
7bddab
-    [ L"in-place" ], Getopt.Set in_place,
7bddab
-      s_"Only tune the guest in the input VM";
7bddab
     [ L"mac" ],      Getopt.String ("mac:network|bridge|ip:out", add_mac),
7bddab
       s_"Map NIC to network or bridge or assign static IP";
7bddab
     [ S 'n'; L"network" ], Getopt.String ("in:out", add_network),
7bddab
@@ -347,7 +344,6 @@ read the man page virt-v2v(1).
7bddab
 
7bddab
   (* Dereference the arguments. *)
7bddab
   let args = List.rev !args in
7bddab
-  let in_place = !in_place in
7bddab
   let input_conn = !input_conn in
7bddab
   let input_mode = !input_mode in
7bddab
   let input_transport =
7bddab
@@ -367,9 +363,6 @@ read the man page virt-v2v(1).
7bddab
   let root_choice = !root_choice in
7bddab
   let static_ips = !static_ips in
7bddab
 
7bddab
-  (* --in-place isn't implemented yet - TODO *)
7bddab
-  if in_place then error "XXX --in-place option is not implemented yet";
7bddab
-
7bddab
   (* No arguments and machine-readable mode?  Print out some facts
7bddab
    * about what this binary supports.
7bddab
    *)
7bddab
@@ -383,7 +376,6 @@ read the man page virt-v2v(1).
7bddab
       pr "vddk\n";
7bddab
       pr "colours-option\n";
7bddab
       pr "vdsm-compat-option\n";
7bddab
-      pr "in-place\n";
7bddab
       pr "io/oo\n";
7bddab
       pr "mac-option\n";
7bddab
       pr "bandwidth-option\n";
7bddab
-- 
7bddab
2.31.1
7bddab