]> xenbits.xensource.com Git - libvirt.git/commit
qemu snapshot: use QMP snapshot-delete for internal snapshots deletion
authorPeter Krempa <pkrempa@redhat.com>
Thu, 3 Oct 2024 11:23:20 +0000 (13:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 9 Oct 2024 14:00:43 +0000 (16:00 +0200)
commiteac1a86f72f3846ec0f7d3339286ba4b521474c1
treee7a50d40349423d1b0da1be6624d98bccefd4cc3
parentb93af62c40ec8dceb222bbf74f7714f0a6e460a0
qemu snapshot: use QMP snapshot-delete for internal snapshots deletion

Switch to using the modern QMP command.

As the user visible logic when deleting internal snapshots using the old
'delvm' command was very lax in terms of catching inconsistencies
between the snapshot metadata and on-disk state we re-implement this
behaviour even using the new command. We could improve the validation
but that'd go at the cost of possible failures which users might not
expect.

As 'delvm' was simply ignoring any kind of failure the selection of
devices to delete the snapshot from is based on querying qemu first
which top level images do have the internal snapshot and then continuing
only on those.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_snapshot.c