[Libguestfs] v2v: -o rhv-upload: Upload via NBD

Richard W.M. Jones rjones at redhat.com
Mon Dec 10 10:29:23 UTC 2018


On Sun, Dec 09, 2018 at 07:11:28PM +0200, Nir Soffer wrote:
> I posted this patch for vdsm, adding NBD APIs:
> https://gerrit.ovirt.org/c/96079/

Great stuff.  What's the minimum version of oVirt which will have this
feature and what's the approximate date when we can assume most users
of oVirt will have this?

I don't have time now to implement the rest but I filed an RFE bug
referring back to your email:

https://bugzilla.redhat.com/show_bug.cgi?id=1657713

Rich.

> The main purpose of these APIs are enabling incremental restore, but they
> also
> enable a more efficient rhv-upload via NBD, and importing to thin disks,
> which is
> not possible with current solution.
> 
> The same idea can work for KubeVirt or other targets, minimizing specific
> target code.
> 
> Here is how rhv-upload can work using NBD:
> 
> 1. rhv-upload plugin separated to pre and post scripts
> 
> - pre - prepare disk and start image transfer
> - post - finialize image transfer, create vm, etc.
> 
> 2. rhr-upload-pre plugin create a transfer with transport="nbd"
> 
> POST /imagetransfers
> 
> <image_transfer>
>     <disk id="123"/>
>     <direction>upload</direction>
>     <format>raw</format>
>     <transport>nbd</transport>
> </image_transfer>
> 
> Engine does not implement <transport> yet, but this should be an easy
> change.
> 
> This will use the new NBD APIs to export the disk using NBD over unix
> socket.
> We can support later also NBD over TLS/PSK.
> 
> Engine will return NBD url in transfer_url:
> 
>     <transfer_url>nbd:unix:/run/vdsm/nbd/<transfer_uuid>.sock</tansfer_url>
> 
> 3. v2v use the trasfer_url to start qem-img with the NBD server:
> 
>     nbdkit (vddk) -> qemu-img convert -> qemu-nbd
> 
> Note that nbdkit is removed from the rhv side of the pipeline. This is
> expected to
> improve the throughput significantly, since imageio is not very good with
> lot of
> small requests generated by qemu-img.
> 
> 4. rhv-upload-post script invoked to complete the transfer
> 
> What do you think?
> 
> Nir

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list