12 years after this bug was filed, and because this is the top hit for
"qemu-img" and stdin / stdout, I want to point out that this is now
possible in Debian and other Linux distros using nbdcopy (in package
libnbd-bin) + qemu-nbd.

To stream from any qemu format such as qcow2 out to stdout:

  nbdcopy -- [ qemu-nbd -f qcow2 image.qcow2 ] - | file -

To stream from stdin into any qemu format such as qcow2:

  zcat image.gz | nbdcopy -- - [ qemu-nbd -f qcow2 output.qcow2 ]

Reply via email to