[virt-tools-list] Saved VM state not part of snapshot?

Cole Robinson crobinso at redhat.com
Thu Nov 14 15:43:58 UTC 2019


On 11/14/19 10:11 AM, Michael Weiser wrote:
> Hello Cole,
> 
> thanks for getting back to me.
> 
> On Tue, Nov 12, 2019 at 12:08:20PM -0500, Cole Robinson wrote:
> 
>>> - create a snapshot of this suspended state including disk and memory
>> Since the VM is shutoff, this is actually only snapshotting disk
>> contents. So it's no different than snapshotting an offline VM.
> [...]
>> I assume at this last step, you mean 'revert to the saved snapshot'. So
>> the disk contents have been reset to the contents at step 3, and the VM
>> is shutoff. But the disk contents at step 3 were essentially the mid
>> flight disk contents from the 'save' operation.
> 
> Correct. Sorry for not laying it out more clearly.
> 
>> Yes we need fixes here. Libvirt should be rejecting some of these cases
>> I think but virt-manager can help here too.
> 
>> * Run/Revert of a snapshot should be rejected if the VM is in the
>> 'Saved' state, aka has been 'virsh managedsave'. This should be done at
>> the libvirt level for completeness IMO. Maybe the API needs a flag to
>> override this behavior if users know what they are doing
> 
>> * virt-manager prompts to discard saved state first otherwise it doesn't
>> all snapshot revert.
> 
>> * Maybe reject snapshot creation when VM is in 'saved' state too, to
>> avoid ambiguity, but it's likely not as bad.
> 
> Instead of handling the symptoms, might it be easier to try and make the
> saved memory state become part of the snapshot then? I could think of
> moving the .save file from the qemu/save into the
> qemu/snapshot/<snapshot name> directory. Or resume the saved state into
> a running but paused VM and snapshot that so it becomes part of the
> snapshot by the native qemu mechanism.
> 

It's possible, but I don't think there will be much energy at the
libvirt level to implement or review this. internal snapshots don't get
a lot of love as they aren't used by any of the big fancy projects like
ovirt or openstack, even at the qemu level they aren't particularly well
regarded.

- Cole




More information about the virt-tools-list mailing list