I posted this patch for vdsm, adding NBD APIs:
The main purpose of these APIs are enabling incremental restore, but they
enable a more efficient rhv-upload via NBD, and importing to thin disks,
not possible with current solution.
The same idea can work for KubeVirt or other targets, minimizing specific
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"
Engine does not implement <transport> yet, but this should be an easy
This will use the new NBD APIs to export the disk using NBD over unix
We can support later also NBD over TLS/PSK.
Engine will return NBD url in transfer_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
improve the throughput significantly, since imageio is not very good with
small requests generated by qemu-img.
4. rhv-upload-post script invoked to complete the transfer
What do you think?