From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8ZQC-0008DD-K0 for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:50:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8ZPo-0000WI-7p for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:50:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8ZPn-0000Vj-Ve for qemu-devel@nongnu.org; Fri, 16 Mar 2012 11:50:04 -0400 Message-ID: <4F636123.5010901@redhat.com> Date: Fri, 16 Mar 2012 09:49:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <1331899989-7756-2-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: <1331899989-7756-2-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig062D45681C33712C7EC10780" Subject: Re: [Qemu-devel] [PATCH v7 2/6] Introduce "save-devices-state" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: xen-devel@lists.xensource.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, Luiz Capitulino , avi@redhat.com, anthony@codemonkey.ws This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig062D45681C33712C7EC10780 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/16/2012 06:13 AM, Stefano Stabellini wrote: > - add an "is_ram" flag to SaveStateEntry; >=20 > - register_savevm_live sets is_ram for live_savevm devices; >=20 > - introduce a "save-devices-state" QAPI command that can be used to sav= e > the state of all devices, but not the RAM or the block devices of the > VM. >=20 > +QEMU has code to load/save the state of the guest that it is running. > +These are two complementary operations. Saving the state just does > +that, saves the state for each device that the guest is running. > + > +These operations are normally used with migration (see migration.txt),= > +however it is also possible to save the state of all devices to file, > +without saving the RAM or the block devices of the VM. > + > +This operation is called "save-devices-state" (see QMP/qmp-commands.tx= t) Is there a complimentary load-devices-state? Just to make sure I'm clear, there are three things to save before you have a complete picture of a running VM: disk state (can be saved with 'savevm' to internal qcow2 snapshots, or with 'transaction' and 'blockdev-snapshot-sync' by creating external snapshots, or by 'migrate' to a file) RAM state (can be saved with 'savevm' to internal qcow2 snapshot, or with 'migrate' to a file; it is also possible to start qemu with a command line parameter telling which backing file tracks RAM state) device state (can be saved with 'savevm' to internal qcow2 snapshot, or with 'migrate' to a file, and now with 'save-devices-state') That is, 'migrate' does all three at once to an external file, 'savevm' does all three at once to an internal qcow2 snapshot, and you are now making it possible to do any one of the three independently to an external file while the VM continues to run. Is this something that libvirt should be exposing in the near future? > +SQMP > +save-devices-state > +------- > + > +Save the state of all devices to file. The RAM and the block devices > +of the VM are not saved by this command. > + > +Arguments: > + > +- "filename": the file to save the state of the devices to as binary > +data. See save-devices-state.txt for a description of the binary forma= t. > + > +Example: > + > +-> { "execute": "save-devices-state", "arguments": { "filename": "/tmp= /save" } } Can we at least reserve something for future extension to add things like 'fd:name' to refer to a named fd received earlier via 'getfd'? You could do that by documenting up front that if "filename" does not start with "/", then any pattern of letters followed by a ':' as the initial pattern of the filename is an error (and you avoid the error by using =2E/foo:... or an absolute path). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig062D45681C33712C7EC10780 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPY2EjAAoJEKeha0olJ0NqaSoIAKnEXMtg8ZaMfTyhzQWGBsZc OsXkHS5u1SbkAmr8w4IKSkVllY9CDV79iKTJCQVJO4EgA8BnljoW0OFfGF/ZvCIk h7fdK9X6qLJHpjqmRzi7M2CSC7cnKaFcPL66ocV7eopbzBVA/uY3a+25yhJFpuK8 vRNdTwg/e5sGiK9zHgd3KjudlxYKeUe18yCEvSJiKdlb2NuGAkwps3tsj5+T1QyE cQ8dcgyrw+iPWD/Zu5+ZKL/nT0XC7tU6+Vhjb8UEqK5reIo+QNihjceWXC2pPplG gUPTTsCs/W3C8rE67wM6R8bjnKeMyQCkCNxuPwc4lfok6qBJrIBUqgnVCf5TrKA= =897h -----END PGP SIGNATURE----- --------------enig062D45681C33712C7EC10780--