[libvirt] Re: RFC: API additions for enhanced snapshot support

Nicolas Sebrecht nsebrecht at piing.fr
Wed Jul 6 08:59:53 UTC 2011


The 05/07/11, Eric Blake wrote:

> I was trying to model this after the virDomainSnapshot API, which has a
> notion of current snapshot, but I guess I don't fully understand what
> that API was implying by current domain snapshot.
> 
> After looking more through the code, it looks like the idea was to
> support the notion of a branching hierarchy of snapshots:
> 
> A -> B -> D
>  \-> C -> E
> 
> such that you can revert to the snapshot at point B, start the domain,
> and create snapshot D; then stop the domain, revert to the snapshot at
> point C, start the domain, and create snapshot E.  Every time you start
> the domain, you know from which state it was started, so the current
> snapshot is the snapshot that would be the parent if you were to create
> a snapshot right now.
> 
> As long as you can create a branching hierarchy (that is, after creating
> a snapshot, you can revert to its parent state, then make different
> changes, and create a new snapshot), then there really is a need to know
> which snapshot is current - listing all snapshots can show you the
> parent(s) of each snapshot in that list, but can't tell you which
> snapshot would be the parent of a new one created right now.

May I ask what would happen if the user asks for deletion of A (as both
base and snapshot)?  Would it be possible?  Would it be merged to both B
and C? Using which filename?

-- 
Nicolas Sebrecht




More information about the libvir-list mailing list