[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 07/11] qapi: Convert savevm
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 07/11] qapi: Convert savevm |
Date: |
Tue, 09 Apr 2013 10:12:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/09/2013 10:04 AM, Markus Armbruster wrote:
>> +
>> +##
>> +# @vm-snapshot-save:
>> +#
>> +# Create a snapshot of the whole virtual machine. If tag is provided as
>> @name,
>> +# it is used as human readable identifier. If there is already a snapshot
>> +# with the same tag or id, the force argument needs to be true to replace
>> it.
>
> "tag or id"?
>
> HMP command savevm's argument is matched against both QEMUSnapshotInfo
> member id_str (a.k.a. id) and name (a.k.a. tag). Do we really want that
> kind of overloading in QMP? Shouldn't we make it tag vs. id explicit
> there?
The qcow2 file format already allows for the creation of a snapshot with
an id but no tag. We've been back and forth about whether QMP should
allow a user to be able to create all valid qcow2 files (and hence allow
the omission of tag). But things really get confusing if you allow the
creation of a tag that matches an existing id (create a snapshot, then
create another snapshot with the tag '1'); or even if a tag can match a
potential future id (create a snapshot with a tag named '2', then create
another snapshot). So the lookup should always check for BOTH tag and
id, even though the command is supplying only a 'tag'; and if a tag is
omitted, a unique id will always be returned.
>
>> +#
>> +# The VM is automatically stopped and resumed and saving a snapshot can take
>> +# a long time.
>> +#
>> +# @name: #optional tag of new snapshot or tag|id of existing snapshot
>
> Should we make this mandatory? We have to keep the argument optional in
> HMP, but that needn't concern us here.
If we mandate that a tag always be supplied, then we cannot create qcow2
files with a snapshot that lacks a tag using just QMP; but even if we do
that, we STILL have to support use of existing qcow2 files that were
created by earlier qemu and/or other tools that have snapshots without a
tag.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature