]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Warn of restore with managed save being risky
authorMichael Weiser <michael.weiser@gmx.de>
Fri, 3 Jan 2020 18:43:23 +0000 (19:43 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Jan 2020 09:36:33 +0000 (10:36 +0100)
commit5373f63b30828cef3d7231354e989c2aabffe41c
treefede1717463057158c8e90b93f01b7ae20a7b660
parentc27d3ec17a42a2ff6949210b245db41d3d6a0868
qemu: Warn of restore with managed save being risky

Internal snapshots of a non-running domain do not carry any memory state
and restoring such a snapshot will not replace existing saved memory
state. This allows a scenario, where a user first suspends a domain into
managedsave, restores a non-running snapshot and then resumes the domain
from managedsave. After that, the guest system will run with its
previous memory state atop a different disk state. The most obvious
possible fallout from this is extensive file system corruption. Swap
content and RAID bitmaps might also be off.

This has been discussed[1] and fixed[2] from the end-user perspective for
virt-manager.

This patch marks the restore operation as risky at the libvirt level,
requiring the user to remove the saved memory state first or force the
operation.

[1] https://www.redhat.com/archives/virt-tools-list/2019-November/msg00011.html
[2] https://www.redhat.com/archives/virt-tools-list/2019-December/msg00049.html

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_driver.c