[Libguestfs] [PATCH v2 1/2] v2v: vddk: Switch to using ‘-it vddk’ to specify VDDK as input transport.
Pino Toscano
ptoscano at redhat.com
Fri Dec 8 16:55:08 UTC 2017
On Friday, 8 December 2017 17:02:29 CET Richard W.M. Jones wrote:
> Previously the presence of the ‘--vddk <libdir>’ option magically
> enabled VDDK mode. However we want to introduce other transports for
> VMware conversions so this wasn't a very clean choice.
>
> With this commit you must use ‘-it vddk’ to specify that you want VDDK
> as a disk transport. The previous ‘--vddk <libdir>’ option has been
> renamed to ‘--vddk-libdir <libdir>’ to be consistent with the other
> passthrough options, and it is no longer required.
>
> A new command line looks like:
>
> $ export PATH=/path/to/nbdkit:$PATH
> $ virt-v2v \
> -ic 'vpx://root@vcenter.example.com/Datacenter/esxi?no_verify=1' \
> | -it vddk \
> | --vddk-libdir /path/to/vmware-vix-disklib-distrib \
> --vddk-thumbprint xx:xx:xx:... \
> "Windows 2003" \
> -o local -os /var/tmp
>
> where only the two lines marked with ‘|’ have changed.
> ---
> [...]
> @@ -286,6 +289,12 @@ read the man page virt-v2v(1).
> let input_conn = !input_conn in
> let input_format = !input_format in
> let input_mode = !input_mode in
> + let input_transport =
> + match !input_transport with
> + | None -> None
> + | Some "vddk" -> Some `VDDK
> + | Some transport ->
> + error (f_"unknown input transport ‘-it %s’") transport in
Another option could be to switch from a polymorphic variant to a
simple type, e.g.:
type input_transport =
| None
| VDDK of vddk_options
| SSH
So it will remove the extra vddk_options parameters in most functions
where input_transport is passed, and easily support more options for
future transports.
The rest of the changes seem fine.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20171208/0a4eb6d6/attachment.sig>
More information about the Libguestfs
mailing list