[libvirt] [PATCH 1/2] snapshots: allow create --redefine to force a new configuration

Peter Krempa pkrempa at redhat.com
Wed Mar 20 16:50:13 UTC 2019


On Wed, Mar 20, 2019 at 11:39:01 -0500, Eric Blake wrote:
> On 3/20/19 3:16 AM, Christian Ehrhardt wrote:
> 
> >> So looking at the bug, user created a snapshot, then upgraded qemu to a
> >> version which dropped the old machine type.
> >>
> >> Reverting to a inactive internal snapshot in this case will restore the
> >> definition including the machine type. That is what snapshots are
> >> expected to do.
> 
> We already have a FORCE flag for virDomainSnapshotRevert(); is that not
> sufficient to allow reverting to an inactive snapshot where the domain
> description is no longer viable in modern qemu?  I'm trying to see why a
> second --force flag to create --redefine helps things.

In the bug description the virDomainSnapshotRevert call succeessfully
reverted the state. Since the snapshot was taken in inactive state the
VM was stopped. A subsequent 'virsh start' failed and reported that the
machine type which was recorded was no longer suppored.

The ABI stability check which is done a part of redefining the snapshot
via 'virsh snapshot-edit' failed.

Even if the ABI stability check would be overriden, a 'virsh start'
would still fail until reverting to the snapshot again.

In this case the configuration can be simply fixed by editing the
current configuration after reverting the snapshpot by 'virsh edit'.

While that does not allow to fix snapshots which were not reverted to
I'm arguing that having the force flag is not required. This also does
avoid potential other problems which users could inflict on themselves
by forcing config without thinking.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190320/1a50244b/attachment-0001.sig>


More information about the libvir-list mailing list