From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgaRY-0003Kg-3i for qemu-devel@nongnu.org; Fri, 30 Dec 2011 06:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgaRX-0007H5-34 for qemu-devel@nongnu.org; Fri, 30 Dec 2011 06:16:12 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:55275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgaRW-0007H1-TP for qemu-devel@nongnu.org; Fri, 30 Dec 2011 06:16:11 -0500 Received: by werb10 with SMTP id b10so7693400wer.4 for ; Fri, 30 Dec 2011 03:16:10 -0800 (PST) Date: Fri, 30 Dec 2011 11:16:09 +0000 From: Stefan Hajnoczi Message-ID: <20111230111609.GC1740@stefanha-thinkpad.localdomain> 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] [help] QEMUFile's format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?wqTntYLmlrxhd2FyZQ==?= <250716708@qq.com> Cc: xen-devel , qemu-devel On Fri, Dec 23, 2011 at 01:17:00PM +0800, ¤終於aware wrote: > Is anyone clear about the format of qemu file for savevm or loadvm? If you are interested in the serialized device state format (e.g. the e1000 NIC's serialized state) then the answer is no. I'm not aware of any specification or schema that documents the device state. It has been known to change in the past and writing tools that depend on a specific device state layout outside of qemu.git is not viable today because you'll have to watch qemu.git hw/ code changes and update your external code every time something changes. It seems like a bad idea to duplicate the device state layout outside of qemu.git. For a temporary hack, read the QEMUFile and hw/ save/load code. You can try qemu-io -c "read -b 0 $length" to extract the vmstate from a qcow2 image file. Stefan