On Mon, Apr 06, 2020 at 10:48:35AM -0500, Eric Blake wrote:
Side note:
...
>+ (* Although glance can slurp in a stream from stdin,
unfortunately
>+ * 'qemu-img convert' cannot write to a stream (although I guess
>+ * it could be implemented at least for raw). Therefore we have
>+ * to write to a temporary file. XXX
>+ *)
>+ List.map (fun (_, ov) -> TargetFile (cachedir // ov.ov_sd)) overlays
I know this was just code motion, but does the nbdkit streaming
plugin help here?
As Pino said in the other answer, -o glance is obsolete.
In more direct answer to your question, the streaming plugin doesn't
help. There are two problems:
(1) It only works if ‘qemu-img convert’ guarantees to write from start
to end without ever going backwards. I don't think this is true even
for raw.
(2) Because Glance’s sparseness support is broken, it's generally
recommended that you use virt-v2v to convert the format to qcow2 when
writing to Glance. (Virt-v2v gives you a "free" format conversion
because under the hood we use ‘qemu-img convert’ to do the copy.)
However qcow2 certainly cannot be written linearly unless Kevin has
performed a miracle.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/