Blame SOURCES/0076-v2v-vddk-Switch-to-using-it-vddk-to-specify-VDDK-as-.patch

151578
From f8209cc000c28648efd4d73eeeec7bac3dd7c1dd Mon Sep 17 00:00:00 2001
151578
From: "Richard W.M. Jones" <rjones@redhat.com>
151578
Date: Thu, 7 Dec 2017 14:41:32 +0000
151578
Subject: [PATCH] =?UTF-8?q?v2v:=20vddk:=20Switch=20to=20using=20=E2=80=98-?=
151578
 =?UTF-8?q?it=20vddk=E2=80=99=20to=20specify=20VDDK=20as=20input=20transpo?=
151578
 =?UTF-8?q?rt.?=
151578
MIME-Version: 1.0
151578
Content-Type: text/plain; charset=UTF-8
151578
Content-Transfer-Encoding: 8bit
151578
151578
Previously the presence of the ‘--vddk <libdir>’ option magically
151578
enabled VDDK mode.  However we want to introduce other transports for
151578
VMware conversions so this wasn't a very clean choice.
151578
151578
With this commit you must use ‘-it vddk’ to specify that you want VDDK
151578
as a disk transport.  The previous ‘--vddk <libdir>’ option has been
151578
renamed to ‘--vddk-libdir <libdir>’ to be consistent with the other
151578
passthrough options, and it is no longer required.
151578
151578
A new command line looks like:
151578
151578
  $ export PATH=/path/to/nbdkit:$PATH
151578
  $ virt-v2v \
151578
      -ic 'vpx://root@vcenter.example.com/Datacenter/esxi?no_verify=1' \
151578
|     -it vddk \
151578
|     --vddk-libdir /path/to/vmware-vix-disklib-distrib \
151578
      --vddk-thumbprint xx:xx:xx:... \
151578
      "Windows 2003" \
151578
      -o local -os /var/tmp
151578
151578
where only the two lines marked with ‘|’ have changed.
151578
151578
(cherry picked from commit 6f347b4f802717d4557fdae90c90afa030b8a414)
151578
---
151578
 v2v/cmdline.ml            | 69 +++++++++++++++++++++++++++++------------------
151578
 v2v/input_libvirt.ml      | 37 ++++++++++++-------------
151578
 v2v/input_libvirt.mli     |  8 +++---
151578
 v2v/input_libvirt_vddk.ml | 61 ++++++++++++++++++++++++++++-------------
151578
 v2v/test-v2v-docs.sh      |  2 +-
151578
 v2v/types.ml              |  2 +-
151578
 v2v/types.mli             |  2 +-
151578
 v2v/virt-v2v.pod          | 30 +++++++++++++++------
151578
 8 files changed, 131 insertions(+), 80 deletions(-)
151578
151578
diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
151578
index dfbb776ab..81562d1f5 100644
151578
--- a/v2v/cmdline.ml
151578
+++ b/v2v/cmdline.ml
151578
@@ -56,15 +56,16 @@ let parse_cmdline () =
151578
 
151578
   let input_conn = ref None in
151578
   let input_format = ref None in
151578
+  let input_transport = ref None in
151578
   let in_place = ref false in
151578
   let output_conn = ref None in
151578
   let output_format = ref None in
151578
   let output_name = ref None in
151578
   let output_storage = ref None in
151578
   let password_file = ref None in
151578
-  let vddk = ref None in
151578
   let vddk_config = ref None in
151578
   let vddk_cookie = ref None in
151578
+  let vddk_libdir = ref None in
151578
   let vddk_nfchostport = ref None in
151578
   let vddk_port = ref None in
151578
   let vddk_snapshot = ref None in
151578
@@ -186,6 +187,8 @@ let parse_cmdline () =
151578
                                             s_"Libvirt URI";
151578
     [ M"if" ],       Getopt.String ("format", set_string_option_once "-if" input_format),
151578
                                             s_"Input format (for -i disk)";
151578
+    [ M"it" ],       Getopt.String ("transport", set_string_option_once "-it" input_transport),
151578
+                                    s_"Input transport";
151578
     [ L"in-place" ], Getopt.Set in_place,         "";
151578
     [ L"machine-readable" ], Getopt.Set machine_readable, s_"Make output machine readable";
151578
     [ S 'n'; L"network" ],        Getopt.String ("in:out", add_network),    s_"Map network 'in' to 'out'";
151578
@@ -207,12 +210,12 @@ let parse_cmdline () =
151578
                                             s_"Use password from file";
151578
     [ L"print-source" ], Getopt.Set print_source, s_"Print source and stop";
151578
     [ L"root" ],    Getopt.String ("ask|... ", set_root_choice), s_"How to choose root filesystem";
151578
-    [ L"vddk" ],     Getopt.String ("libpath", set_string_option_once "--vddk" vddk),
151578
-                                            s_"Use nbdkit VDDK plugin";
151578
     [ L"vddk-config" ], Getopt.String ("filename", set_string_option_once "--vddk-config" vddk_config),
151578
                                             s_"Set VDDK config file";
151578
     [ L"vddk-cookie" ], Getopt.String ("cookie", set_string_option_once "--vddk-cookie" vddk_cookie),
151578
                                             s_"Set VDDK cookie";
151578
+    [ L"vddk-libdir" ], Getopt.String ("libdir", set_string_option_once "--vddk-libdir" vddk_libdir),
151578
+                                    s_"Set VDDK library parent directory";
151578
     [ L"vddk-nfchostport" ], Getopt.String ("nfchostport", set_string_option_once "--vddk-nfchostport" vddk_nfchostport),
151578
                                             s_"Set VDDK nfchostport";
151578
     [ L"vddk-port" ], Getopt.String ("port", set_string_option_once "--vddk-port" vddk_port),
151578
@@ -270,6 +273,12 @@ read the man page virt-v2v(1).
151578
   let input_conn = !input_conn in
151578
   let input_format = !input_format in
151578
   let input_mode = !input_mode in
151578
+  let input_transport =
151578
+    match !input_transport with
151578
+    | None -> None
151578
+    | Some "vddk" -> Some `VDDK
151578
+    | Some transport ->
151578
+       error (f_"unknown input transport ‘-it %s’") transport in
151578
   let in_place = !in_place in
151578
   let machine_readable = !machine_readable in
151578
   let network_map = !network_map in
151578
@@ -287,28 +296,15 @@ read the man page virt-v2v(1).
151578
   let qemu_boot = !qemu_boot in
151578
   let root_choice = !root_choice in
151578
   let vddk_options =
151578
-    match !vddk with
151578
-    | Some libdir ->
151578
-      Some { vddk_libdir = libdir;
151578
-             vddk_config = !vddk_config;
151578
-             vddk_cookie = !vddk_cookie;
151578
-             vddk_nfchostport = !vddk_nfchostport;
151578
-             vddk_port = !vddk_port;
151578
-             vddk_snapshot = !vddk_snapshot;
151578
-             vddk_thumbprint = !vddk_thumbprint;
151578
-             vddk_transports = !vddk_transports;
151578
-             vddk_vimapiver = !vddk_vimapiver }
151578
-    | None ->
151578
-      if !vddk_config <> None ||
151578
-         !vddk_cookie <> None ||
151578
-         !vddk_nfchostport <> None ||
151578
-         !vddk_port <> None ||
151578
-         !vddk_snapshot <> None ||
151578
-         !vddk_thumbprint <> None ||
151578
-         !vddk_transports <> None ||
151578
-         !vddk_vimapiver <> None then
151578
-        error (f_"‘--vddk-*’ options should only be used when conversion via the nbdkit VDDK plugin has been enabled, ie. using ‘--vddk’.");
151578
-      None in
151578
+      { vddk_config = !vddk_config;
151578
+        vddk_cookie = !vddk_cookie;
151578
+        vddk_libdir = !vddk_libdir;
151578
+        vddk_nfchostport = !vddk_nfchostport;
151578
+        vddk_port = !vddk_port;
151578
+        vddk_snapshot = !vddk_snapshot;
151578
+        vddk_thumbprint = !vddk_thumbprint;
151578
+        vddk_transports = !vddk_transports;
151578
+        vddk_vimapiver = !vddk_vimapiver } in
151578
   let vdsm_compat = !vdsm_compat in
151578
   let vdsm_image_uuids = List.rev !vdsm_image_uuids in
151578
   let vdsm_vol_uuids = List.rev !vdsm_vol_uuids in
151578
@@ -341,6 +337,26 @@ read the man page virt-v2v(1).
151578
       let password = read_first_line_from_file filename in
151578
       Some password in
151578
 
151578
+  (* Input transport affects whether some parameters should or
151578
+   * should not be used.
151578
+   *)
151578
+  (match input_transport with
151578
+   | None ->
151578
+      if !vddk_config <> None ||
151578
+         !vddk_cookie <> None ||
151578
+         !vddk_libdir <> None ||
151578
+         !vddk_nfchostport <> None ||
151578
+         !vddk_port <> None ||
151578
+         !vddk_snapshot <> None ||
151578
+         !vddk_thumbprint <> None ||
151578
+         !vddk_transports <> None ||
151578
+         !vddk_vimapiver <> None then
151578
+        error (f_"‘--vddk-*’ options should only be used when conversion via the nbdkit VDDK plugin has been enabled, ie. using ‘-it vddk’.")
151578
+   | Some `VDDK ->
151578
+      if !vddk_thumbprint = None then
151578
+        error (f_"‘--vddk-thumbprint’ is required when using ‘-it vddk’.")
151578
+  );
151578
+
151578
   (* Parsing of the argument(s) depends on the input mode. *)
151578
   let input =
151578
     match input_mode with
151578
@@ -363,7 +379,8 @@ read the man page virt-v2v(1).
151578
         | [guest] -> guest
151578
         | _ ->
151578
           error (f_"expecting a libvirt guest name on the command line") in
151578
-      Input_libvirt.input_libvirt vddk_options password input_conn guest
151578
+      Input_libvirt.input_libvirt vddk_options password
151578
+                                  input_conn input_transport guest
151578
 
151578
     | `LibvirtXML ->
151578
       (* -i libvirtxml: Expecting a filename (XML file). *)
151578
diff --git a/v2v/input_libvirt.ml b/v2v/input_libvirt.ml
151578
index f4a8114f0..16006dc0c 100644
151578
--- a/v2v/input_libvirt.ml
151578
+++ b/v2v/input_libvirt.ml
151578
@@ -27,7 +27,7 @@ open Types
151578
 open Utils
151578
 
151578
 (* Choose the right subclass based on the URI. *)
151578
-let input_libvirt vddk_options password libvirt_uri guest =
151578
+let input_libvirt vddk_options password libvirt_uri input_transport guest =
151578
   match libvirt_uri with
151578
   | None ->
151578
     Input_libvirt_other.input_libvirt_other password libvirt_uri guest
151578
@@ -39,29 +39,26 @@ let input_libvirt vddk_options password libvirt_uri guest =
151578
         error (f_"could not parse '-ic %s'.  Original error message was: %s")
151578
           orig_uri msg in
151578
 
151578
-    match server, scheme with
151578
-    | None, _
151578
-    | Some "", _                        (* Not a remote URI. *)
151578
+    match server, scheme, input_transport with
151578
+    | None, _, _
151578
+    | Some "", _, _                     (* Not a remote URI. *)
151578
 
151578
-    | Some _, None                      (* No scheme? *)
151578
-    | Some _, Some "" ->
151578
+    | Some _, None, _                   (* No scheme? *)
151578
+    | Some _, Some "", _ ->
151578
       Input_libvirt_other.input_libvirt_other password libvirt_uri guest
151578
 
151578
-    (* vCenter over https, or
151578
-     * vCenter or ESXi using nbdkit vddk plugin
151578
-     *)
151578
-    | Some server, Some ("esx"|"gsx"|"vpx" as scheme) ->
151578
-       (match vddk_options with
151578
-        | None ->
151578
-           Input_libvirt_vcenter_https.input_libvirt_vcenter_https
151578
-             password libvirt_uri parsed_uri scheme server guest
151578
-        | Some vddk_options ->
151578
-           Input_libvirt_vddk.input_libvirt_vddk vddk_options password
151578
-                                                 libvirt_uri parsed_uri guest
151578
-       )
151578
+    (* vCenter over https. *)
151578
+    | Some server, Some ("esx"|"gsx"|"vpx" as scheme), None ->
151578
+       Input_libvirt_vcenter_https.input_libvirt_vcenter_https
151578
+         password libvirt_uri parsed_uri scheme server guest
151578
+
151578
+    (* vCenter or ESXi using nbdkit vddk plugin *)
151578
+    | Some server, Some ("esx"|"gsx"|"vpx"), Some `VDDK ->
151578
+       Input_libvirt_vddk.input_libvirt_vddk vddk_options password
151578
+                                             libvirt_uri parsed_uri guest
151578
 
151578
     (* Xen over SSH *)
151578
-    | Some server, Some ("xen+ssh" as scheme) ->
151578
+    | Some server, Some ("xen+ssh" as scheme), _ ->
151578
       Input_libvirt_xen_ssh.input_libvirt_xen_ssh
151578
         password libvirt_uri parsed_uri scheme server guest
151578
 
151578
@@ -71,7 +68,7 @@ let input_libvirt vddk_options password libvirt_uri guest =
151578
      *)
151578
 
151578
     (* Unknown remote scheme. *)
151578
-    | Some _, Some _ ->
151578
+    | Some _, Some _, _ ->
151578
       warning (f_"no support for remote libvirt connections to '-ic %s'.  The conversion may fail when it tries to read the source disks.")
151578
         orig_uri;
151578
       Input_libvirt_other.input_libvirt_other password libvirt_uri guest
151578
diff --git a/v2v/input_libvirt.mli b/v2v/input_libvirt.mli
151578
index acf2ca417..eb3e48397 100644
151578
--- a/v2v/input_libvirt.mli
151578
+++ b/v2v/input_libvirt.mli
151578
@@ -18,7 +18,7 @@
151578
 
151578
 (** [-i libvirt] source. *)
151578
 
151578
-val input_libvirt : Types.vddk_options option -> string option -> string option -> string -> Types.input
151578
-(** [input_libvirt vddk_options password libvirt_uri guest] creates
151578
-    and returns a new {!Types.input} object specialized for reading input
151578
-    from libvirt sources. *)
151578
+val input_libvirt : Types.vddk_options -> string option -> string option -> [`VDDK] option -> string -> Types.input
151578
+(** [input_libvirt vddk_options password libvirt_uri input_transport guest]
151578
+    creates and returns a new {!Types.input} object specialized for reading
151578
+    input from libvirt sources. *)
151578
diff --git a/v2v/input_libvirt_vddk.ml b/v2v/input_libvirt_vddk.ml
151578
index d1f2ae360..2f2ac4214 100644
151578
--- a/v2v/input_libvirt_vddk.ml
151578
+++ b/v2v/input_libvirt_vddk.ml
151578
@@ -34,11 +34,19 @@ open Printf
151578
 
151578
 (* Subclass specialized for handling VMware via nbdkit vddk plugin. *)
151578
 class input_libvirt_vddk vddk_options password libvirt_uri parsed_uri guest =
151578
-
151578
   (* The VDDK path. *)
151578
   let libdir = vddk_options.vddk_libdir in
151578
-  (* Compute the LD_LIBRARY_PATH that we must pass to nbdkit. *)
151578
-  let library_path = libdir // sprintf "lib%d" Sys.word_size in
151578
+
151578
+  (* VDDK libraries are located under lib32/ or lib64/ relative to the
151578
+   * libdir.  Note this is unrelated to Linux multilib or multiarch.
151578
+   *)
151578
+  let libNN = sprintf "lib%d" Sys.word_size in
151578
+
151578
+  (* Compute the LD_LIBRARY_PATH that we may have to pass to nbdkit. *)
151578
+  let library_path =
151578
+    match libdir with
151578
+    | None -> None
151578
+    | Some libdir -> Some (libdir // libNN) in
151578
 
151578
   (* Is SELinux enabled and enforcing on the host? *)
151578
   let have_selinux =
151578
@@ -46,18 +54,25 @@ class input_libvirt_vddk vddk_options password libvirt_uri parsed_uri guest =
151578
 
151578
   (* Check that the VDDK path looks reasonable. *)
151578
   let error_unless_vddk_libdir () =
151578
-    if not (is_directory libdir) then
151578
-      error (f_"‘--vddk %s’ does not point to a directory.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") libdir;
151578
+    (match libdir with
151578
+     | None -> ()
151578
+     | Some libdir ->
151578
+        if not (is_directory libdir) then
151578
+          error (f_"‘--vddk-libdir %s’ does not point to a directory.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") libdir
151578
+    );
151578
 
151578
-    if not (is_directory library_path) then
151578
-      error (f_"VDDK library path %s not found or not a directory.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.")
151578
-            library_path
151578
+    (match library_path with
151578
+     | None -> ()
151578
+     | Some library_path ->
151578
+        if not (is_directory library_path) then
151578
+          error (f_"VDDK library path %s not found or not a directory.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") library_path
151578
+    )
151578
   in
151578
 
151578
   (* Check that nbdkit is available and new enough. *)
151578
   let error_unless_nbdkit_working () =
151578
     if 0 <> Sys.command "nbdkit --version >/dev/null" then
151578
-      error (f_"nbdkit is not installed or not working.  It is required to use ‘--vddk’.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.");
151578
+      error (f_"nbdkit is not installed or not working.  It is required to use ‘-it vddk’.  See \"INPUT FROM VDDK\" in the virt-v2v(1) manual.");
151578
 
151578
     (* Check it's a new enough version.  The latest features we
151578
      * require are ‘--exit-with-parent’ and ‘--selinux-label’, both
151578
@@ -73,14 +88,20 @@ class input_libvirt_vddk vddk_options password libvirt_uri parsed_uri guest =
151578
 
151578
   (* Check that the VDDK plugin is installed and working *)
151578
   let error_unless_nbdkit_vddk_working () =
151578
+    let set_ld_library_path =
151578
+      match library_path with
151578
+      | None -> ""
151578
+      | Some library_path ->
151578
+         sprintf "LD_LIBRARY_PATH=%s " (quote library_path) in
151578
+
151578
     let cmd =
151578
-      sprintf "LD_LIBRARY_PATH=%s nbdkit vddk --dump-plugin >/dev/null"
151578
-              (quote library_path) in
151578
+      sprintf "%snbdkit vddk --dump-plugin >/dev/null"
151578
+              set_ld_library_path in
151578
     if Sys.command cmd <> 0 then (
151578
       (* See if we can diagnose why ... *)
151578
       let cmd =
151578
-        sprintf "LD_LIBRARY_PATH=%s LANG=C nbdkit vddk --dump-plugin 2>&1 | grep -sq libvixDiskLib.so"
151578
-                (quote library_path) in
151578
+        sprintf "LANG=C %snbdkit vddk --dump-plugin 2>&1 | grep -sq libvixDiskLib.so"
151578
+                set_ld_library_path in
151578
       let needs_library = Sys.command cmd = 0 in
151578
       if not needs_library then
151578
         error (f_"nbdkit VDDK plugin is not installed or not working.  It is required if you want to use VDDK.
151578
@@ -91,9 +112,9 @@ See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.")
151578
       else
151578
         error (f_"nbdkit VDDK plugin is not installed or not working.  It is required if you want to use VDDK.
151578
 
151578
-It looks like you did not set the right path in the ‘--vddk’ option, or your copy of the VDDK directory is incomplete.  There should be a library called ’%s/libvixDiskLib.so.?’.
151578
+It looks like you did not set the right path in the ‘--vddk-libdir’ option, or your copy of the VDDK directory is incomplete.  There should be a library called ’<libdir>/%s/libvixDiskLib.so.?’.
151578
 
151578
-See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") library_path
151578
+See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") libNN
151578
     )
151578
   in
151578
 
151578
@@ -120,6 +141,7 @@ See also \"INPUT FROM VDDK\" in the virt-v2v(1) manual.") library_path
151578
   let vddk_passthrus =
151578
     [ "config",      (fun { vddk_config }      -> vddk_config);
151578
       "cookie",      (fun { vddk_cookie }      -> vddk_cookie);
151578
+      "libdir",      (fun { vddk_libdir }      -> vddk_libdir);
151578
       "nfchostport", (fun { vddk_nfchostport } -> vddk_nfchostport);
151578
       "port",        (fun { vddk_port }        -> vddk_port);
151578
       "snapshot",    (fun { vddk_snapshot }    -> vddk_snapshot);
151578
@@ -140,9 +162,8 @@ object
151578
             | Some field -> sprintf " --vddk-%s %s" name field
151578
         ) vddk_passthrus
151578
       ) in
151578
-    sprintf "%s --vddk %s%s"
151578
+    sprintf "%s -it vddk %s"
151578
             super#as_options (* superclass prints "-i libvirt etc" *)
151578
-            vddk_options.vddk_libdir
151578
             pt_options
151578
 
151578
   method source () =
151578
@@ -249,7 +270,6 @@ object
151578
       add_arg (sprintf "user=%s" user);
151578
       add_arg password_param;
151578
       add_arg (sprintf "vm=moref=%s" moref);
151578
-      add_arg (sprintf "libdir=%s" libdir);
151578
 
151578
       (* The passthrough parameters. *)
151578
       List.iter (
151578
@@ -299,7 +319,10 @@ object
151578
          let pid = fork () in
151578
          if pid = 0 then (
151578
            (* Child process (nbdkit). *)
151578
-           putenv "LD_LIBRARY_PATH" library_path;
151578
+           (match library_path with
151578
+            | None -> ()
151578
+            | Some x -> putenv "LD_LIBRARY_PATH" x
151578
+           );
151578
            execvp "nbdkit" args
151578
          );
151578
 
151578
diff --git a/v2v/test-v2v-docs.sh b/v2v/test-v2v-docs.sh
151578
index 5e49d5240..c8ca193eb 100755
151578
--- a/v2v/test-v2v-docs.sh
151578
+++ b/v2v/test-v2v-docs.sh
151578
@@ -22,4 +22,4 @@ $TEST_FUNCTIONS
151578
 skip_if_skipped
151578
 
151578
 $top_srcdir/podcheck.pl virt-v2v.pod virt-v2v \
151578
-  --ignore=--debug-overlay,--ic,--if,--in-place,--no-trim,--oa,--oc,--of,--on,--os,--vmtype
151578
+  --ignore=--debug-overlay,--ic,--if,--in-place,--it,--no-trim,--oa,--oc,--of,--on,--os,--vmtype
151578
diff --git a/v2v/types.ml b/v2v/types.ml
151578
index 4f9205aa0..43bd28804 100644
151578
--- a/v2v/types.ml
151578
+++ b/v2v/types.ml
151578
@@ -473,9 +473,9 @@ type root_choice = AskRoot | SingleRoot | FirstRoot | RootDev of string
151578
 type output_allocation = Sparse | Preallocated
151578
 
151578
 type vddk_options = {
151578
-    vddk_libdir : string;
151578
     vddk_config : string option;
151578
     vddk_cookie : string option;
151578
+    vddk_libdir : string option;
151578
     vddk_nfchostport : string option;
151578
     vddk_port : string option;
151578
     vddk_snapshot : string option;
151578
diff --git a/v2v/types.mli b/v2v/types.mli
151578
index 087a03702..fd944bebf 100644
151578
--- a/v2v/types.mli
151578
+++ b/v2v/types.mli
151578
@@ -329,9 +329,9 @@ type output_allocation = Sparse | Preallocated
151578
 (** Type of [-oa] (output allocation) option. *)
151578
 
151578
 type vddk_options = {
151578
-    vddk_libdir : string;
151578
     vddk_config : string option;
151578
     vddk_cookie : string option;
151578
+    vddk_libdir : string option;
151578
     vddk_nfchostport : string option;
151578
     vddk_port : string option;
151578
     vddk_snapshot : string option;
151578
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
151578
index e798ad1e7..7aca22b3c 100644
151578
--- a/v2v/virt-v2v.pod
151578
+++ b/v2v/virt-v2v.pod
151578
@@ -255,6 +255,13 @@ For I<-i disk> only, this specifies the format of the input disk
151578
 image.  For other input methods you should specify the input
151578
 format in the metadata.
151578
 
151578
+=item B<-it> B<vddk>
151578
+
151578
+Use VMware VDDK as a transport to copy the input disks.  See
151578
+L</INPUT FROM VDDK> below.  If you use this parameter then you may
151578
+need to use other I<--vddk*> options to specify how to connect through
151578
+VDDK.
151578
+
151578
 =item B<--keys-from-stdin>
151578
 
151578
 Read key or passphrase parameters from stdin.  The default is
151578
@@ -501,13 +508,20 @@ boot an operating system from the first VirtIO disk.  Specifically,
151578
 F</boot> must be on the first VirtIO disk, and it cannot chainload an
151578
 OS which is not in the first VirtIO disk.
151578
 
151578
-=item B<--vddk> LIBDIR
151578
+=item B<--vddk-libdir> LIBDIR
151578
 
151578
-Enable VDDK input from VMware vCenter or ESXi.  C<LIBDIR> is the top
151578
-directory of the VDDK library.  This directory should I<contain>
151578
+Set the VDDK library directory.  This directory should I<contain>
151578
 subdirectories called F<include>, F<lib64> etc., but do not include
151578
 F<lib64> actually in the parameter.
151578
 
151578
+In most cases this parameter is required when using the I<-it vddk>
151578
+(VDDK) transport.  See L</INPUT FROM VDDK> below for details.
151578
+
151578
+=item B<--vddk-thumbprint> xx:xx:xx:...
151578
+
151578
+Set the thumbprint of the remote VMware server.
151578
+
151578
+This parameter is required when using the I<-it vddk> (VDDK) transport.
151578
 See L</INPUT FROM VDDK> below for details.
151578
 
151578
 =item B<--vddk-config> FILENAME
151578
@@ -520,16 +534,13 @@ See L</INPUT FROM VDDK> below for details.
151578
 
151578
 =item B<--vddk-snapshot> SNAPSHOT-MOREF
151578
 
151578
-=item B<--vddk-thumbprint> xx:xx:xx:...
151578
-
151578
 =item B<--vddk-transports> MODE:MODE:...
151578
 
151578
 =item B<--vddk-vimapiver> APIVER
151578
 
151578
 When using VDDK mode, these options are passed unmodified to the
151578
 L<nbdkit(1)> VDDK plugin.  Please refer to L<nbdkit-vddk-plugin(1)>.
151578
-If I<--vddk> is present, I<--vddk-thumbprint> is also required,
151578
-the rest are optional.
151578
+These are all optional.
151578
 
151578
 =item B<--vdsm-compat=0.10>
151578
 
151578
@@ -1390,6 +1401,8 @@ continuing.
151578
 
151578
 =head2 VDDK: IMPORTING A GUEST
151578
 
151578
+The I<-it vddk> parameter selects VDDK as the input transport for disks.
151578
+
151578
 To import a particular guest from vCenter server or ESXi hypervisor,
151578
 use a command like the following, substituting the URI, guest name and
151578
 SSL thumbprint:
151578
@@ -1397,7 +1410,8 @@ SSL thumbprint:
151578
  $ export PATH=/path/to/nbdkit:$PATH
151578
  $ virt-v2v \
151578
      -ic 'vpx://root@vcenter.example.com/Datacenter/esxi?no_verify=1' \
151578
-     --vddk /path/to/vmware-vix-disklib-distrib \
151578
+     -it vddk \
151578
+     --vddk-libdir /path/to/vmware-vix-disklib-distrib \
151578
      --vddk-thumbprint xx:xx:xx:... \
151578
      "Windows 2003" \
151578
      -o local -os /var/tmp
151578
-- 
151578
2.14.3
151578