From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StPRN-0002Sd-D5 for qemu-devel@nongnu.org; Mon, 23 Jul 2012 16:41:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StPRM-0006w5-0J for qemu-devel@nongnu.org; Mon, 23 Jul 2012 16:41:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StPRL-0006vo-OP for qemu-devel@nongnu.org; Mon, 23 Jul 2012 16:41:15 -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 q6NKfFel014443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 23 Jul 2012 16:41:15 -0400 Date: Mon, 23 Jul 2012 17:41:51 -0300 From: Luiz Capitulino Message-ID: <20120723174151.47ca5347@doriath.home> In-Reply-To: <5003CCD8.7070308@redhat.com> References: <03cf631acdeac4654b1d7d8505d9d5f133ea6e6c.1342092497.git.phrdina@redhat.com> <4FFF0F34.4030507@redhat.com> <5003CCD8.7070308@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Eric Blake , qemu-devel@nongnu.org On Mon, 16 Jul 2012 10:12:08 +0200 Pavel Hrdina wrote: > On 07/12/2012 07:53 PM, Eric Blake wrote: > > 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 snapshot > >> +# 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, SnapshotNotAccepted > >> +# If an error occures while creating a snapshot, SnapshotCreateFailed > > s/occures/occurs/ > > > >> +# If open a block device for vm state fail, SnapshotOpenFailed > >> +# If an error uccures while writing vm state, SnapshotWriteFailed > > s/uccures/occurs/ > > > >> +# If delete snapshot with same 'name' fail, SnapshotDeleteFailed > > 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'.) > This sounds reasonable and I think that this could be also good for HMP, > not only for QMP. > If there isn't anyone who disagree, I'll implement it. I agree with it. > > Pavel > >> +# > >> +# Since: 1.2 > >> +## > >> +{ 'command': 'savevm', 'data': {'*name': 'str'} } > >> \ No newline at end of file > > Fix that. > > > >> @@ -1061,6 +1061,32 @@ Example: > >> > >> EQMP > >> { > >> + .name = "savevm", > >> + .args_type = "name:s?", > >> + .params = "name", > >> + .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created", > >> + .mhandler.cmd_new = 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'? > > > > >