qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-img
@ 2009-02-12 17:15 D. Schreiber
  2009-02-13 10:03 ` Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: D. Schreiber @ 2009-02-12 17:15 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hello,

is it possible to add "pipe"-Mode like this?

dd if=/dev/sda | qemu-img convert -f raw - -O qcow2 newImage.img

I know i can read directly from device, but in some cases (i.e. get data
from netcat) it would be nice to convert from stdin. Alternative: read
from fifo.

Another wish is to mount an compressed qcow-Image as loop-Device.

Regards
D. Schreiber

[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu-img
  2009-02-12 17:15 [Qemu-devel] qemu-img D. Schreiber
@ 2009-02-13 10:03 ` Kevin Wolf
  2009-02-13 14:27 ` Lennart Sorensen
  2009-02-13 19:09 ` [Qemu-devel] qemu-img D. Schreiber
  2 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2009-02-13 10:03 UTC (permalink / raw)
  To: qemu-devel

D. Schreiber schrieb:
> Hello,
> 
> is it possible to add "pipe"-Mode like this?
> 
> dd if=/dev/sda | qemu-img convert -f raw - -O qcow2 newImage.img
> 
> I know i can read directly from device, but in some cases (i.e. get data
> from netcat) it would be nice to convert from stdin. Alternative: read
> from fifo.

That shouldn't be too difficult to implement. It just needs someone to
do it.

> Another wish is to mount an compressed qcow-Image as loop-Device.

You can use qemu-nbd instead.

Kevin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu-img
  2009-02-12 17:15 [Qemu-devel] qemu-img D. Schreiber
  2009-02-13 10:03 ` Kevin Wolf
@ 2009-02-13 14:27 ` Lennart Sorensen
  2009-02-13 15:52   ` Jamie Lokier
  2009-02-13 19:09 ` [Qemu-devel] qemu-img D. Schreiber
  2 siblings, 1 reply; 6+ messages in thread
From: Lennart Sorensen @ 2009-02-13 14:27 UTC (permalink / raw)
  To: qemu-devel

On Thu, Feb 12, 2009 at 06:15:57PM +0100, D. Schreiber wrote:
> is it possible to add "pipe"-Mode like this?
> 
> dd if=/dev/sda | qemu-img convert -f raw - -O qcow2 newImage.img

Does this work:

dd if=/dev/sda | qemu-img convert -f raw <(dd if=/dev/sda) -O qcow2 newImage.img

> I know i can read directly from device, but in some cases (i.e. get data
> from netcat) it would be nice to convert from stdin. Alternative: read
> from fifo.
> 
> Another wish is to mount an compressed qcow-Image as loop-Device.

I suspect you have to write a loop device handler for the kernel to
support that.  Sounds perfectly doable.

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu-img
  2009-02-13 14:27 ` Lennart Sorensen
@ 2009-02-13 15:52   ` Jamie Lokier
  2009-02-13 16:42     ` Lennart Sorensen
  0 siblings, 1 reply; 6+ messages in thread
From: Jamie Lokier @ 2009-02-13 15:52 UTC (permalink / raw)
  To: qemu-devel

Lennart Sorensen wrote:
> On Thu, Feb 12, 2009 at 06:15:57PM +0100, D. Schreiber wrote:
> > is it possible to add "pipe"-Mode like this?
> > 
> > dd if=/dev/sda | qemu-img convert -f raw - -O qcow2 newImage.img
> 
> Does this work:
> 
> dd if=/dev/sda | qemu-img convert -f raw <(dd if=/dev/sda) -O qcow2 newImage.img

No point running dd twice at the same time :-)

I suspect you meant one of these:

dd if=/dev/sda | qemu-img convert -f raw /dev/stdin -O qcow2 newImage.img

qemu-img convert -f raw <(dd if=/dev/sda) -O qcow2 newImage.img

-- Jamie

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu-img
  2009-02-13 15:52   ` Jamie Lokier
@ 2009-02-13 16:42     ` Lennart Sorensen
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Sorensen @ 2009-02-13 16:42 UTC (permalink / raw)
  To: qemu-devel

On Fri, Feb 13, 2009 at 03:52:27PM +0000, Jamie Lokier wrote:
> No point running dd twice at the same time :-)
> 
> I suspect you meant one of these:
> 
> dd if=/dev/sda | qemu-img convert -f raw /dev/stdin -O qcow2 newImage.img
> 
> qemu-img convert -f raw <(dd if=/dev/sda) -O qcow2 newImage.img

That one.

I copied the line, edited it, and forgot to finish deleting.

-- 
Len Sorensen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: qemu-img
  2009-02-12 17:15 [Qemu-devel] qemu-img D. Schreiber
  2009-02-13 10:03 ` Kevin Wolf
  2009-02-13 14:27 ` Lennart Sorensen
@ 2009-02-13 19:09 ` D. Schreiber
  2 siblings, 0 replies; 6+ messages in thread
From: D. Schreiber @ 2009-02-13 19:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

Hello,

thank's a lot for the hints.

> is it possible to add "pipe"-Mode like this?

Some tipps doesn't work or not what i'm looking for.

> You can use qemu-nbd instead.

I'll take a look of this.


Regards
D. Schreiber

[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-13 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 17:15 [Qemu-devel] qemu-img D. Schreiber
2009-02-13 10:03 ` Kevin Wolf
2009-02-13 14:27 ` Lennart Sorensen
2009-02-13 15:52   ` Jamie Lokier
2009-02-13 16:42     ` Lennart Sorensen
2009-02-13 19:09 ` [Qemu-devel] qemu-img D. Schreiber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).