
On Wed, May 30, 2018 at 12:11:21AM +0300, Nir Soffer wrote:
Exporting images or ova files:
image in any format -> qemu-img -> [qcow2 byte stream] -> imageio http server -> http client
You can do this with nbdkit + plugin, it's exactly what we do today for virt-v2v: https://github.com/libguestfs/libguestfs/blob/master/v2v/rhv-upload-plugin.p...
Importing images or ova files:
http client -> imageio http server -> [qcow2 byte stream] -> qemu-img -> image in any format
Also could be done with nbdkit + plugin, basically the reverse of the above.
If you can create a tar file that reserves space for the image file without actually writing it, a possible workaround today would be using the offset/size runtime options of the raw driver to convert directly into a region inside the tar archive.
What are the offset/size runtime options? I cannot find anything about them in man qemu-img.
See: https://github.com/libguestfs/libguestfs/blob/dd162d2cd56a2ecf4bcd40a7f46394... But in any case you can just use the nbdkit tar plugin which already does all of this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top