Blob Blame History Raw
From c7c14141d1c985dbba8749f9209b78d96200c2b3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Dec 2021 11:56:05 +0000
Subject: [PATCH] RHEL: Remove the --in-place option

This disables the virt-v2v --in-place option which we do not
wish to support in RHEL.
---
 docs/virt-v2v.pod | 49 -----------------------------------------------
 v2v/v2v.ml        |  8 --------
 2 files changed, 57 deletions(-)

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