From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpNaT-0006d2-AW for qemu-devel@nongnu.org; Thu, 12 Jul 2012 13:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpNaR-0000K6-TN for qemu-devel@nongnu.org; Thu, 12 Jul 2012 13:54:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpNaR-0000Jx-L2 for qemu-devel@nongnu.org; Thu, 12 Jul 2012 13:53:59 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6CHrwFl023302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 Jul 2012 13:53:58 -0400 Message-ID: <4FFF0F34.4030507@redhat.com> Date: Thu, 12 Jul 2012 11:53:56 -0600 From: Eric Blake MIME-Version: 1.0 References: <03cf631acdeac4654b1d7d8505d9d5f133ea6e6c.1342092497.git.phrdina@redhat.com> In-Reply-To: <03cf631acdeac4654b1d7d8505d9d5f133ea6e6c.1342092497.git.phrdina@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig0E9B5DA30DB0EBB3EBC1E955" Subject: Re: [Qemu-devel] [RFC PATCH 1/4] qapi: Convert savevm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0E9B5DA30DB0EBB3EBC1E955 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/12/2012 10:55 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > +++ b/qapi-schema.json > @@ -1868,3 +1868,25 @@ > # Since: 0.14.0 > ## > { 'command': 'netdev_del', 'data': {'id': 'str'} } > + > +## > +# @savevm: > +# > +# Create a snapshot of the whole virtual machine. If 'tag' is provided= , > +# it is used as human readable identifier. If there is already a snaps= hot > +# with the same tag or ID, it is replaced. > +# > +# @name: tag or id of new or existing snapshot Needs an #optional designation, given the syntax below. > +# > +# Returns: Nothing on success > +# If there is a writable device not supporting snapshots, > +# SnapshotNotSupported > +# If no block device can accept snapshots, SnapshotNotAccepte= d > +# If an error occures while creating a snapshot, SnapshotCrea= teFailed s/occures/occurs/ > +# If open a block device for vm state fail, SnapshotOpenFaile= d > +# If an error uccures while writing vm state, SnapshotWriteFa= iled s/uccures/occurs/ > +# If delete snapshot with same 'name' fail, SnapshotDeleteFai= led The notion of blindly overwriting the existing snapshot of the same name seems a bit dangerous; should we take this opportunity to enhance the command, and add a force flag, where things fail if the flag is false but the name already exists, and where the reuse only happens if the flag is present? (In fact, it would make my life in libvirt easier, as I have an action item to make libvirt reject attempts to create a snapshot with tag named '1' if an existing snapshot already has an id of '1'.) > +# > +# Since: 1.2 > +## > +{ 'command': 'savevm', 'data': {'*name': 'str'} } > \ No newline at end of file Fix that. > @@ -1061,6 +1061,32 @@ Example: > =20 > EQMP > { > + .name =3D "savevm", > + .args_type =3D "name:s?", > + .params =3D "name", > + .help =3D "save a VM snapshot. If no tag or id are provi= ded, a new snapshot is created", > + .mhandler.cmd_new =3D qmp_marshal_input_savevm > + }, > + > +SQMP > +savevm I know the HMP command is short, for ease of typing; but since 'savevm' is not an English word, should we name the QMP command 'save-vm'? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig0E9B5DA30DB0EBB3EBC1E955 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/ iQEcBAEBCAAGBQJP/w81AAoJEKeha0olJ0Nqo0EH/1NlQnufAwAnjqegWsYqFAiS i/PhgO03gcWqqGRxkyXuZcog9q4BTS/fi6DvsMn0D0L9wy1b42KsTObcDSogixUP ngXdD2G1xjE7OQr//WuxiszL8U0fgc6cLQ78yKwdC1cmtMpOYPc+2mdY3BA/7UMp 37NQXO11z8Ud2n0MWiX6ivBOXCk/0joRoIZiTc30omCNlfgnXBeLIyslPJmAZdpG MRWWsoVBSo8kDjaVWYGF4kAKN9D5fHImVd+MaYKgicTkm7v7uM4Y7wYBsXcqmFro a6JyvCbYfu9cMwJX6ey6NOXxkFRUlhdzeq7aWDeEm1J/2Ydc9eE2xoT6xZX4kWc= =bR6i -----END PGP SIGNATURE----- --------------enig0E9B5DA30DB0EBB3EBC1E955--