From: Pavel Hrdina <phrdina@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 1/4] qapi: Convert savevm
Date: Mon, 16 Jul 2012 10:12:08 +0200 [thread overview]
Message-ID: <5003CCD8.7070308@redhat.com> (raw)
In-Reply-To: <4FFF0F34.4030507@redhat.com>
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<phrdina@redhat.com>
>> ---
>> +++ 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.
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'?
>
next prev parent reply other threads:[~2012-07-16 8:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 16:55 [Qemu-devel] [RFC PATCH 0/4] qapi: Convert snapshot's commands Pavel Hrdina
2012-07-12 16:55 ` [Qemu-devel] [RFC PATCH 1/4] qapi: Convert savevm Pavel Hrdina
2012-07-12 17:53 ` Eric Blake
2012-07-16 8:12 ` Pavel Hrdina [this message]
2012-07-23 20:41 ` Luiz Capitulino
2012-07-23 20:41 ` Luiz Capitulino
2012-07-12 16:55 ` [Qemu-devel] [RFC PATCH 2/4] qapi: Convert loadvm Pavel Hrdina
2012-07-12 17:56 ` Eric Blake
2012-07-24 17:04 ` Luiz Capitulino
2012-07-24 17:03 ` Luiz Capitulino
2012-07-12 16:55 ` [Qemu-devel] [RFC PATCH 3/4] qapi: Convert delvm Pavel Hrdina
2012-07-12 17:59 ` Eric Blake
2012-07-16 8:12 ` Pavel Hrdina
2012-07-16 16:37 ` Eric Blake
2012-07-17 10:55 ` Kevin Wolf
2012-07-12 16:55 ` [Qemu-devel] [RFC PATCH 4/4] qapi: Convert info snapshots Pavel Hrdina
2012-07-12 18:03 ` Eric Blake
2012-07-16 8:15 ` Pavel Hrdina
2012-07-24 17:30 ` [Qemu-devel] [RFC PATCH 0/4] qapi: Convert snapshot's commands Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5003CCD8.7070308@redhat.com \
--to=phrdina@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).