]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Add monitor infrastructure for 'snapshot-load' QMP command
authorPeter Krempa <pkrempa@redhat.com>
Wed, 6 Nov 2024 14:59:34 +0000 (15:59 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 18 Nov 2024 12:51:13 +0000 (13:51 +0100)
commit2ed93e1a4bbfd352f1f2a1735ad1342f6b6ffdbd
treeee9da59190e6b972d0cc0a74538416f35869a98b
parentc82dd60b2e5e84e0e6cfe956847c38e0cfbb96bd
qemu: monitor: Add monitor infrastructure for 'snapshot-load' QMP command

Libvirt currently loads snapshots via the '-loadvm' commandline option
but that uses the same logic as the 'loadvm' text monitor command used
to pick the disk image with the 'vmstate' section. Since libvirt now
implements our own logic to pick the 'vmstate' device it can happen that
we pick a different than qemu and thus qemu would fail to load the
snapshot. This happens currently on VMs with UEFI firmware with NVRAM
image in qcow2 format.

To fix this libvirt will need to use the 'snapshot-load' QMP command
instead of relying on '-savevm'.

Implement the monitor bits for 'snapshot-load'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h