[libvirt] [BUG] intermediate snapshot deleted

Matthias Bolte matthias.bolte at googlemail.com
Wed Dec 22 20:58:08 UTC 2010


2010/12/8 Philipp Hahn <hahn at univention.de>:
> Hello,
>
> I encountered another problem: snapshots are linked to there parent snapshot.
> If the parent snapshot is deleted, the chain gets broken and deleting the
> child snapshot terminates with an error message:
>> error: Domain snapshot not found: no domain snapshot parent with matching
> name '1291813671'
>
> I can reproduce this using the following sequence of commands for my
> test-domain called "test" using a singel qcow2 image:
> # virsh snapshot-create test # 1291813670
> # virsh snapshot-create test # 1291813671
> # virsh snapshot-create test # 1291813672
> # virsh snapshot-delete test 1291813671
> # virsh snapshot-delete test 1291813672
>
> Is this problem known (libvirt-0.8.3)?
> Reverting to such an unlinked snapshot is still possible, but deleting it is
> not.
>

Sorry for the late response.

I can reproduce this with current git head. The problem is that the
QEMU driver doesn't update the parent attribute of the children of a
snapshot being deleted.

While looking at the code there are other problems too. For example,
which snapshot is the current one it not saved to disk. Therefore,
when you create a snapshot A and after this another snapshot B you
should get

A <- [B]

where X <- Y means X is parent of Y and [Z] means current snapshot.

But when you restart libvirtd in between creating A and B then you end up with

A
[B]

Anyway, I've posted a patch that fixes the problem you reported by
updating the parent attribute of the children of a snapshot being
deleted.

https://www.redhat.com/archives/libvir-list/2010-December/msg00935.html

Matthias




More information about the libvir-list mailing list