On 11/14/2012 04:33 AM, Guannan Ren wrote:
>> For example there is a snapshot chain like
>> baseimage->snap1->snap2->snap3
>>
>>
>> If we plan to go back to snap1, it will become as follows, is it
>> right?
>> baseimage-->snap1-->snap2-->snap3
>> \
>> snap1.1(new branch)
>>
>> If snap1.1 is a new snapshot taken of snap1, is it a live
>> external disk snapshot or offline
>> external disk snapshot?
Right now, I'm only proposing the ability to branch from an external
snapshot (whether disk-only or external checkpoint doesn't matter). So
you are indeed correct that if I have used snapshot commands to create
external snapshots leading to the chain:
base <- snap1 <- snap2
and then request a revert-and-create of snap1.1 with snap1 as the branch
point, then I will have:
base <- snap1 <- snap2
\- snap1.1
with snap1.qcow2 and snap1.1.qcow2 BOTH having base as their backing
file, but with the two files diverging in contents based on what the
guest has executed in the meantime.
Then, I'm also proposing a new operation for plain revert, which says to
revert to the external snapshot PLUS its subsequent disk changes, which
will let me pivot between the two branches by altering which qcow2 file
we load when booting the guest.
>
> That depends on what snap1 was originally. snap1.1 at the point of
> creation snap1 and snap1.1 will be identical, but they will eventually
> diverge when the machine is booted up in either of the branches.
>
Get it, but how to make the snapshot of snap1.1 that will be
identical with snap1 if snap1 is live external disk snapshot originally.
If we boot up the machine using snap1, then do the snapshot, the
snap1.1 will be not totally identical as least I think.
We are not booting up the guest before creating the new snapshot. The
new branched snapshot shares the same BASE files as the branch point.
The parent of the branch snapshot is the same parent of the original
snapshot we reverted to - not the reverted snapshot itself.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org