qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Did qemu-img support stdin/stdout


From: Zenaan Harkness
Subject: Re: Did qemu-img support stdin/stdout
Date: Sun, 5 Mar 2023 11:39:44 +1100

Trying to wrap my head around this - may be a solution for someone else too:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513451

| From: "Richard W.M. Jones" <rjones@redhat.com>
| To: 513451@bugs.debian.org
| Subject: Re: qemu-img: add stdin/stdout support
| Date: Sat, 11 Sep 2021 19:16:51 +0100
|
| 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 ]
|


See also:
 - https://qemu-devel.nongnu.narkive.com/SLLyf9sr/qemu-img
 - https://www.tecmint.com/migrate-virtualbox-vms-into-kvm-vms/
 - https://access.redhat.com/discussions/4340061
 - 
https://superuser.com/questions/590968/quickest-way-to-merge-all-snapshots-in-virtualbox
   - "As of VirtualBox 6.0.8, this still works. – Paul Sturm Aug 29,
2019 at 15:11"


Note: I'm using gmail web which aiui breaks threading but I used the
same subject line (and I only just subscribed now to send this email
in case it's useful to someone), but the above is reply to the
following:

https://lists.gnu.org/archive/html/qemu-discuss/2020-01/msg00028.html
> From: Shifeng Zhang
> Subject: Re: Did qemu-img support stdin/stdout
> Date: Mon, 13 Jan 2020 12:42:32 -0700
>
> Mark, thanks for the reply and the confirmation.
> Steve
>
> On Mon, Jan 13, 2020 at 11:06 AM Max Reitz <address@hidden> wrote:
>  On 10.01.20 17:40, Shifeng Zhang wrote:
>  > Hi,
>  >
>  > Is it possible to use qemu-img with pipe? like qemu-img convert -f raw
>  > -O vmdk - | other_command?
>  >
>  > I tried to use pipe and seemed not working, hopefully some experts can
>  > confirm it works with pipe or not.
>
>  Hi,
>
>  No, it isn’t, unfortunately.  The files need to be seekable.
>
>  Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]