[libvirt] [PATCH 4/4] snapshot: implement new APIs for qemu, esx, and vbox

Osier Yang jyang at redhat.com
Mon Jun 11 14:31:29 UTC 2012


On 2012年06月11日 20:41, Eric Blake wrote:
> On 06/11/2012 01:14 AM, Osier Yang wrote:
>> On 2012年05月25日 11:33, Eric Blake wrote:
>>> The two APIs are rather trivial; based on bits and pieces of other
>>> existing APIs.  Rather than blindly return 0 or 1 for HasMetadata,
>>> I chose to first validate that the snapshot in question in fact
>>> exists.
>>>
>
>>
>> Looks like it doesn't have metadata anyway for esx and vbox driver,
>> is it useful then?
>
> Right now, we have:
>
> qemu: always uses metadata [*]
> esx, vbox: never uses metadata (instead, the driver queries the
> hypervisor every time)
>
> [*] but this may change - I can see adding a flag to let the qemu driver
> report snapshots without metadata, corresponding to qcow2 internal images
>
> Furthermore, the existence of metadata is useful to know; with qemu, a
> snapshot prevents deletion of a persistent domain, with esx and vbox,
> all domains are persistent but the existence of a snapshot has no effect
> on the ability to delete the domain.
>

It's fine for qemu driver, as there will be changes in
future.

But not sure if checking whether the snapshot exists or not
in hasMetadata is good or not for esx and vbox driver. It
seems to me duplicate with domainSnapshotLookupByName, in
case of it's very likely no changes (support to have metadata)
for vbox and esx driver in future. Perhaps simply returns 0
is better.

Osier




More information about the libvir-list mailing list