qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-img qcow and raw format
@ 2007-04-12  8:09 Francois Visconte
  2007-04-12 10:17 ` Gildas
  2007-04-12 10:54 ` Daniel Silverstone
  0 siblings, 2 replies; 5+ messages in thread
From: Francois Visconte @ 2007-04-12  8:09 UTC (permalink / raw)
  To: qemu-devel

Hello,

I'm currently developing an OS deployment tool similar to G4U (ghost for 
unix).
This is a very basic tool
  - boot an initrd
  - configure network
  - ssh deployment-server "cat image.dd"  > /dev/sda
  - reboot


I'm using qemu to test my initrd and deployment tool and i would like 
replace my raw image format with qcow images (size/compression and crypto)

  - ssh deployment-server "cat image.qcow" | qemu-img - -O raw /dev/sda

The problem is qemu-img can't read from stdin, so i tried :

  - mkfifo deploy-in.fifo
  - qemu-img convert deploy-in.fifo -O raw /dev/sda
  - ssh deployment-server "cat image.qcow" > deploy-in.fifo
    qemu-img: Could not open 'deploy-in.fifo'


Is there any way to achieve this goal ?


Cheers,
François Visconte

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

* Re: [Qemu-devel] qemu-img qcow and raw format
  2007-04-12  8:09 [Qemu-devel] qemu-img qcow and raw format Francois Visconte
@ 2007-04-12 10:17 ` Gildas
  2007-04-12 10:51   ` Francois Visconte
  2007-04-12 10:54 ` Daniel Silverstone
  1 sibling, 1 reply; 5+ messages in thread
From: Gildas @ 2007-04-12 10:17 UTC (permalink / raw)
  To: qemu-devel

Creating a temp file maybe?

Cheers,
Gildas

2007/4/12, Francois Visconte <francois.visconte@inria.fr>:
> Hello,
>
> I'm currently developing an OS deployment tool similar to G4U (ghost for
> unix).
> This is a very basic tool
>   - boot an initrd
>   - configure network
>   - ssh deployment-server "cat image.dd"  > /dev/sda
>   - reboot
>
>
> I'm using qemu to test my initrd and deployment tool and i would like
> replace my raw image format with qcow images (size/compression and crypto)
>
>   - ssh deployment-server "cat image.qcow" | qemu-img - -O raw /dev/sda
>
> The problem is qemu-img can't read from stdin, so i tried :
>
>   - mkfifo deploy-in.fifo
>   - qemu-img convert deploy-in.fifo -O raw /dev/sda
>   - ssh deployment-server "cat image.qcow" > deploy-in.fifo
>     qemu-img: Could not open 'deploy-in.fifo'
>
>
> Is there any way to achieve this goal ?
>
>
> Cheers,
> François Visconte
>
>
>
>
>

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

* Re: [Qemu-devel] qemu-img qcow and raw format
  2007-04-12 10:17 ` Gildas
@ 2007-04-12 10:51   ` Francois Visconte
  0 siblings, 0 replies; 5+ messages in thread
From: Francois Visconte @ 2007-04-12 10:51 UTC (permalink / raw)
  To: qemu-devel

Hello
> Creating a temp file maybe?
> 
I'm using qemu-img from an initrd so i can't create big file into a 
temps file.
Creating a temp file may cause deployment to be 2 times longer:
  - ssh ... "cat image.dd" > temp_file
  - qemu-img convert temp_file -O raw /dev/sda


Cheers,
François

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

* Re: [Qemu-devel] qemu-img qcow and raw format
  2007-04-12  8:09 [Qemu-devel] qemu-img qcow and raw format Francois Visconte
  2007-04-12 10:17 ` Gildas
@ 2007-04-12 10:54 ` Daniel Silverstone
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Silverstone @ 2007-04-12 10:54 UTC (permalink / raw)
  To: qemu-devel

On Thu, 2007-04-12 at 10:09 +0200, Francois Visconte wrote:
>     qemu-img: Could not open 'deploy-in.fifo'
> Is there any way to achieve this goal ?

It strikes me that it's likely qemu-img assumes it can seek around in
the file it is reading from, so perhaps you'll have to look at modifying
qemu-img to support a stream mode?

D.

(Note this is just a guess)

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895

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

* Re: [Qemu-devel] qemu-img qcow and raw format
@ 2007-04-12 15:19 Ben Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Taylor @ 2007-04-12 15:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Francois Visconte


---- Francois Visconte <francois.visconte@inria.fr> wrote: 
> Hello,
> 
> I'm currently developing an OS deployment tool similar to G4U (ghost for 
> unix).
> This is a very basic tool
>   - boot an initrd
>   - configure network
>   - ssh deployment-server "cat image.dd"  > /dev/sda
>   - reboot
> 
> 
> I'm using qemu to test my initrd and deployment tool and i would like 
> replace my raw image format with qcow images (size/compression and crypto)
> 
>   - ssh deployment-server "cat image.qcow" | qemu-img - -O raw /dev/sda
> 
> The problem is qemu-img can't read from stdin, so i tried :
> 
>   - mkfifo deploy-in.fifo
>   - qemu-img convert deploy-in.fifo -O raw /dev/sda
>   - ssh deployment-server "cat image.qcow" > deploy-in.fifo
>     qemu-img: Could not open 'deploy-in.fifo'

I have not looked at the code in qemu-img (and the associated 
routines).  It appears that qemu-img is probably looking for
a file handle and not a named pipe. Either that, or you need
to shove the ssh command in the background before the 
qemu-img command so qemu-img has a chance to
start processing the data.  It's not clear whether or not
qemu-img is seeing an "empty file" because there's no
data on the pipe, or it can't read from the pipe.

Ben

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

end of thread, other threads:[~2007-04-12 15:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12  8:09 [Qemu-devel] qemu-img qcow and raw format Francois Visconte
2007-04-12 10:17 ` Gildas
2007-04-12 10:51   ` Francois Visconte
2007-04-12 10:54 ` Daniel Silverstone
  -- strict thread matches above, loose matches on Subject: below --
2007-04-12 15:19 Ben Taylor

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).