From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtGoq-0007Ae-L2 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:01:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtGoo-000360-Mi for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:01:12 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:50679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtGoo-00035b-6i for qemu-devel@nongnu.org; Thu, 10 Jan 2013 07:01:10 -0500 Received: by mail-wi0-f180.google.com with SMTP id hj13so249272wib.7 for ; Thu, 10 Jan 2013 04:01:09 -0800 (PST) Date: Thu, 10 Jan 2013 13:01:06 +0100 From: Stefan Hajnoczi Message-ID: <20130110120106.GA30946@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] reading files from qcow2-formated image disk for windows system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?6ams56OK?= Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Wed, Jan 09, 2013 at 03:31:50PM +0800, 马磊 wrote: > Hi, > >> The final effect is as follows: > >> > >> > >> *[malei@xentest-4-1 Fri Dec 28 ~/honeypot/xen/xen-4.1.2]$ qemu-img-xen > >> cat -f /1/boot.ini ~/vm-check.img * > >> *[boot loader]* > >> *timeout=30* > >> *default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS* > >> *[operating systems]* > >> *multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP > >> Professional" /noexecute=optin /fastdetect* > >> > >> [malei@xentest-4-1 Fri Dec 28 ~/honeypot/xen/xen-4.1.2]$ qemu-img-xen ls > >> -l -d /1/ ~/vm-check.img > >> *【name size(bytes) dir? date > >> create-time】* > >> *AUTOEXEC.BAT 0 file 2010-12-22 17:30:37* > >> *boot.ini 211 file 2010-12-23 > >> 01:24:41* > >> *bootfont.bin 322730 file 2004-11-23 20:00:00* > >> * > >> * > >> * > >> * > >> * > >> * > >> > >> *As you see above, the patch add two sub-commands for qemu-img-xen:cat > >> and ls.* > >> * > >> * > >> *For details in the patch, please check the attachment. * > >> > >> > >> > *Does anyone prefer this feature?!* This is already possible with http://libguestfs.org/. Or you can use qemu-nbd to mount the image on the host as explained here: http://blog.vmsplice.net/2011/02/how-to-access-virtual-machine-image.html Although adding file system code to qemu-img integrates this feature more closely, I think the maintenance overhead and duplication of having read-only file system implementations is too much. Therefore, I'm against merge a patch like this. Stefan