[Libguestfs] [PATCH] rhv-upload: Support qcow2 disks

Richard W.M. Jones rjones at redhat.com
Mon Nov 25 09:15:40 UTC 2019


On Wed, Nov 20, 2019 at 03:06:55AM +0200, Nir Soffer wrote:
> diff --git a/v2v/v2v.ml b/v2v/v2v.ml
> index 03590c9e..58bb06c3 100644
> --- a/v2v/v2v.ml
> +++ b/v2v/v2v.ml
> @@ -739,7 +739,9 @@ and copy_targets cmdline targets input output =
>            | TargetURI uri -> uri in
>          [ "qemu-img"; "convert" ] @
>          (if not (quiet ()) then [ "-p" ] else []) @
> -        [ "-n"; "-f"; "qcow2"; "-O"; t.target_format ] @
> +        (* XXX When using NBD we must use raw format, not the target_format
> +        * which is the disk format. commpressed format will also not work. *)
> +        [ "-n"; "-f"; "qcow2"; "-O"; "raw" ] @

This is going to break all the other output modes.

You probably want to define a new method output#override_output_format
(see v2v.ml:get_target_formats and types.mli).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list