[libvirt] libvirt internal snapshots incremental or not.

Hi, Is libvirt internal snapshots are incremental or not..? Consider the example, There are 3 snapshots, created respectively snp1 first, after some changes snp2, again after some changes snp3. Question, 1.Is there any dependency that is ...snp2 depended upon snp1 and snp3 depended upon snp2 OR snp1 OR both 2.So if I remove snp2, does it makes snp3 invalid, OR can I use snp3 further. -- *Regards* *Sijo Jose*

On 10/13/2014 12:39 PM, Sijo Jose wrote:
Hi, Is libvirt internal snapshots are incremental or not..? Consider the example, There are 3 snapshots, created respectively snp1 first, after some changes snp2, again after some changes snp3.
Question, 1.Is there any dependency that is ...snp2 depended upon snp1 and snp3 depended upon snp2 OR snp1 OR both
2.So if I remove snp2, does it makes snp3 invalid, OR can I use snp3 further.
Internal snapshots are independent, you can delete or alter any snapshot and it doesn't impact the state of the other snapshots. - Cole

On 10/13/2014 04:39 AM, Sijo Jose wrote:
Hi, Is libvirt internal snapshots are incremental or not..? Consider the example, There are 3 snapshots, created respectively snp1 first, after some changes snp2, again after some changes snp3.
Question, 1.Is there any dependency that is ...snp2 depended upon snp1 and snp3 depended upon snp2 OR snp1 OR both
2.So if I remove snp2, does it makes snp3 invalid, OR can I use snp3 further.
The snapshots are independent. Deleting one does not invalidate the other. In more detail, internal snapshots are implemented by ref-counting in the qcow2 file format. Prior to a snapshot, all allocated clusters have a ref-count of 1. When you create a snapshot, all current clusters have their ref-count incremented. When you write to a cluster, if the ref-count is larger than 1, it does a copy-on-write operation to put the write in a new cluster (the COW part of qcow2), and decrements the ref-count of the old cluster. When reverting to a snapshot, you are just changing which set of clusters is current. When deleting a snapshot, you decrement the ref-count of all clusters pointed to by the snapshot, possibly freeing memory for clusters that drop to 0 ref-count. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Cole Robinson
-
Eric Blake
-
Sijo Jose