Skip to contentSkip to conversation

qemu-img qcow and raw format

Qemu-devel Francois Visconte 3 participants 4 messages Apr 12, 2007

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Creating a temp file maybe?

Cheers,
Gildas

2007/4/12, Francois Visconte <[email protected]>:

Quoted 34 lines

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

#2 lore raw

Hello

Quoted 2 lines

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

#3 lore raw
In reply to Francois Visconte
Quoted 2 lines · Francois Visconte

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)

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