I think it's even possible to modify that shell script to pipe into
nbdkit and from there to ‘qemu-img convert’. I'm too lazy to actually
do that right now, but the basic idea is here:
https://rwmj.wordpress.com/2014/10/14/streaming-nbd-server/
You'll probably have to add ‘-m 1’ to the qemu-img convert command line.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org