From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hc1A0-0007UF-1A for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:24:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hc19y-0007TY-Ib for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:24:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hc19y-0007TQ-AX for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:24:30 -0400 Received: from eastrmpop103.cox.net ([68.230.240.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hc15n-00033V-13 for qemu-devel@nongnu.org; Thu, 12 Apr 2007 11:20:11 -0400 Message-ID: <5729339.1176391181022.JavaMail.root@eastrmwml05.mgt.cox.net> Date: Thu, 12 Apr 2007 11:19:41 -0400 From: Ben Taylor Subject: Re: [Qemu-devel] qemu-img qcow and raw format MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Francois Visconte ---- Francois Visconte 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