[libvirt] [RFC]: Snapshot API
Daniel P. Berrange
berrange at redhat.com
Wed Mar 24 13:49:36 UTC 2010
On Wed, Mar 24, 2010 at 02:42:30PM +0100, Matthias Bolte wrote:
> 2010/3/24 Daniel P. Berrange <berrange at redhat.com>:
> > 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
>
> You mean you get D when you do a virDomainSnapshotCreateXML(dom, NULL)
> _after_ you've done a virDomainCreateAtSnapshot(dom, "A"), don't you?
Well I'll have to look up what VMWare does really, since their behaviour
is what I intended
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 :|
More information about the libvir-list
mailing list