From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USIRS-0004hj-70 for qemu-devel@nongnu.org; Tue, 16 Apr 2013 22:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USIRP-0007ih-FY for qemu-devel@nongnu.org; Tue, 16 Apr 2013 22:49:50 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:41007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USIRO-0007YQ-UC for qemu-devel@nongnu.org; Tue, 16 Apr 2013 22:49:47 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Apr 2013 12:40:19 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 9567E3578050 for ; Wed, 17 Apr 2013 12:49:16 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3H2ZA2J37093462 for ; Wed, 17 Apr 2013 12:35:11 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3H2mjuP017826 for ; Wed, 17 Apr 2013 12:48:45 +1000 Message-ID: <516E0D6F.9070104@linux.vnet.ibm.com> Date: Wed, 17 Apr 2013 10:48:15 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <877gkavlw2.fsf@blackfin.pond.sub.org> <516544C3.2060306@redhat.com> <516559EB.8020005@redhat.com> <5165719B.7020508@redhat.com> <51659E1C.2050507@redhat.com> <5165A25B.70607@redhat.com> In-Reply-To: <5165A25B.70607@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: qemu-devel@nongnu.org, Markus Armbruster , lcapitulino@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