[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [RFC]: Snapshot API



On Wed, Mar 24, 2010 at 09:09:08AM -0400, Chris Lalancette wrote:
> On 03/24/2010 04:52 AM, Paolo Bonzini wrote:
> 
> > 
> >> > How can<parent>  be settable? If I have snapshots A and B
> >> >
> >> >    A ->  B ->  current state
> >> >
> >> > and I create a new snapshot C, then B will be the parent of C.
> >> >
> >> >    A ->  B ->  C ->  current state
> >> >
> >> > If I create another snapshot D now and specify A to be its parent,
> >> > what's supposed to happen then?
> >>
> >> You are right, that doesn't make that much sense.  I have to admit that
> >> the tree structure is the part I thought about least, so I'll take that
> >> part back. <parent> is just going to be an informational field about
> >> which snapshot was current (if any) when this one was created.
> > 
> > If discarding a snapshot also discards the children, it would definitely
> > make sense to be able to specify the parent.
> 
> The problem, though, is what Mattias points out; there is no (easy) way
> that, given state C, I can get back to state A to make a new snapshot.
> I actually have to be at state A to take a new snapshot with a parent of
> A.  I think this is a place where we have to make it manual; if you really
> want a new snapshot that is a child of A, you'll have to manually shutdown
> your domain, boot to snapshot A, then take a snapshot of A.

This is something virDomainCreateAtSnapshot() should solve.

If you have a series

   A -> B -> C

And you do  virDomainCreateAtSnapshot(dom, "A"), then you get 'D'

   A -> B -> C
   |
   \-> D

B & C are still valid

IIUC, this is how VMWare works & we essentially need our API to map to that
since VirtualBox seems to follow the VMWare model too & there's no reason
that QEMU can't too.

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]