From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Pavel Hrdina <phrdina@redhat.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command
Date: Wed, 17 Apr 2013 10:48:15 +0800 [thread overview]
Message-ID: <516E0D6F.9070104@linux.vnet.ibm.com> (raw)
In-Reply-To: <5165A25B.70607@redhat.com>
于 2013-4-11 1:33, Pavel Hrdina 写道:
> On 10.4.2013 19:15, Eric Blake wrote:
>> On 04/10/2013 08:05 AM, Pavel Hrdina wrote:
>>> Here is another proposal how to handle vm snapshots:
>>>
>>> QMP vm-snapshot-save:
>>> - { 'command': 'vm-snapshot-save',
>>> 'data': { 'name': 'str' },
>>> 'returns': 'SnapshotInfo' }
>>> - vm-snapshot-save returns an error if there is an existing
>>> snapshot with the same name
>>> - you cannot provide an id for a new snapshot
>>> - on success all information about created snapshot will be
>>> returned
>>>
>>> QMP vm-snapshot-load
>>> - { 'command': 'vm-snapshot-load',
>>> 'data': { '*name': 'str', '*id': 'int' },
>>> 'returns': 'SnapshotInfo' }
>>> - one of the name or id must be provided
>>> - if both are provided they will match only the snapshot with the
>>> same name and id
>>> - returns SnapshotInfo only if the snapshot exists.
>>>
>>> QMP vm-snapshot-delete:
>>> - { 'command': 'vm-snapshot-delete',
>>> 'data': { '*name': 'str', '*id': 'int' },
>>> 'returns': 'SnapshotInfo' }
>>> - same rules as vm-snapshot-load
>>
>> Missing some form of query-snapshots to list all consistent snapshots
>> that can be loaded or deleted (or is that another series?)
>
> Yes, there is another series for that.
> http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg00196.html
>
>>
>> Also, while load can only take a consistent snapshot, it might make
>> sense to expose two levels of delete - one that deletes consistent
>> snapshots, and one that deletes a snapshot for a given block device
>> regardless of whether it is consistent across all devices in use by
>> the VM.
>
> I think that Wenchao also works on it. He posted some patches for block
> snapshots about month ago.
>
yep, the latest version is at
http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg02525.html
which expose block'image info to management stack. Luckily the two
serial does not conflict each other in main part:), only for
bdrv_snapshot_find() function.
>>
>>>
>>> HMP savevm:
>>> - args_type = "force:-f,name:s?",
>>> - if the name is not provided the HMP command will generates new
>>> one for QMP command
>>> - if there is already a snapshot with provided or generated name
>>> it will fails
>>> - there will be an optional -f parameter to force saving requested
>>> snapshot and it will internally use vm-snapshot-delete and then
>>> vm-snapshot-save
>>> - all information about created snapshot will be printed
>>>
>>> HMP loadvm:
>>> - args_type = "name:s?,id:i?",
>>> - follow the same behavior as the QMP command
>>
>> Except that with HMP, arguments are positional. You can't provide 'id'
>> in isolation; by listing id:i? second, the parser requires that the
>> first argument encountered is a name.
>>
>> I think a better interface might be:
>>
>> HMP loadvm:
>> - args_type = "id:-i,name:s?'
>>
>> If just name is given, first do a tag lookup; if that fails do an id
>> lookup. If the -i flag is given, skip the tag lookup just do an id
>> lookup.
>
> I didn't realize that, thanks for pointing this out.
>
>>
>>>
>>> HMP delvm:
>>> - args_type = "name:s?,id:i?"
>>> - same rules as loadvm
>>
>> Same comment as for loadvm.
>>
>
>
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2013-04-17 2:49 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 14:12 [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command Pavel Hrdina
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 01/11] block: add error parameter to bdrv_snapshot_create() and related functions Pavel Hrdina
2013-04-09 13:13 ` Markus Armbruster
2013-04-09 13:43 ` Kevin Wolf
2013-04-09 16:21 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 02/11] block: add error parameter to del_existing_snapshots() Pavel Hrdina
2013-04-09 13:27 ` Markus Armbruster
2013-04-09 14:14 ` Luiz Capitulino
2013-04-10 9:57 ` Pavel Hrdina
2013-04-10 11:33 ` Markus Armbruster
2013-04-10 12:06 ` Eric Blake
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 03/11] savevm: add error parameter to qemu_savevm_state_begin() Pavel Hrdina
2013-04-09 13:34 ` Markus Armbruster
2013-04-09 13:37 ` Markus Armbruster
2013-04-09 13:47 ` Pavel Hrdina
2013-04-09 13:49 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 04/11] savevm: add error parameter to qemu_savevm_state_iterate() Pavel Hrdina
2013-04-09 13:41 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 05/11] savevm: add error parameter to qemu_savevm_state_complete() Pavel Hrdina
2013-04-09 13:56 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 06/11] savevm: add error parameter to qemu_savevm_state() Pavel Hrdina
2013-04-09 14:00 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 07/11] qapi: Convert savevm Pavel Hrdina
2013-03-29 16:12 ` Eric Blake
2013-03-29 16:21 ` Pavel Hrdina
2013-04-09 16:04 ` Markus Armbruster
2013-04-09 16:12 ` Eric Blake
2013-04-09 17:23 ` Markus Armbruster
2013-04-09 17:46 ` Eric Blake
2013-04-10 8:01 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 08/11] qemu-img: introduce qemu_img_handle_error Pavel Hrdina
2013-04-09 16:10 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 09/11] block: update return value from bdrv_snapshot_create Pavel Hrdina
2013-04-09 16:29 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 10/11] savevm: update return value from qemu_savevm_state Pavel Hrdina
2013-04-09 16:32 ` Markus Armbruster
2013-03-29 14:12 ` [Qemu-devel] [PATCH v4 11/11] savevm: add force parameter to HMP command and return snapshot info Pavel Hrdina
2013-04-09 16:45 ` Markus Armbruster
2013-04-10 8:18 ` [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command Markus Armbruster
2013-04-10 10:53 ` Pavel Hrdina
2013-04-10 12:24 ` Eric Blake
2013-04-10 12:40 ` Luiz Capitulino
2013-04-10 12:49 ` Eric Blake
2013-04-10 13:22 ` Pavel Hrdina
2013-04-10 13:32 ` Luiz Capitulino
2013-04-10 13:50 ` Pavel Hrdina
2013-04-10 14:05 ` Pavel Hrdina
2013-04-10 17:15 ` Eric Blake
2013-04-10 17:33 ` Pavel Hrdina
2013-04-17 2:48 ` Wenchao Xia [this message]
2013-04-11 9:20 ` Markus Armbruster
2013-04-15 12:10 ` Kevin Wolf
2013-04-15 13:16 ` Eric Blake
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=516E0D6F.9070104@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=phrdina@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).