qemu-img qcow and raw format
Quoted 14 lines · ---- Francois Visconte
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
- rebootI'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)
Quoted 8 lines
- ssh deployment-server "cat image.qcow" | qemu-img - -O raw
/dev/sdaThe 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