]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: snapshot: error out early when reverting snapshot for VM with non-file disk
authorPavel Hrdina <phrdina@redhat.com>
Wed, 26 Feb 2025 10:04:52 +0000 (11:04 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 11 Mar 2025 16:51:11 +0000 (17:51 +0100)
commit278b8334eb26aa9495f6d37e4f72471cbc8739a6
tree23c4bf8ff09157fd52fdb3b6211009efede480d3
parentfc47a37a7a8630cb93afb26c0ca09def731ce16d
qemu: snapshot: error out early when reverting snapshot for VM with non-file disk

Before this patch the code would start the revert process by destroying
the VM and preparing to revert where it would fail with following error:

    error: unsupported configuration: source for disk 'sdb' is not a regular file; refusing to generate external snapshot name

and leaving user with offline VM even if it was running.

Make the check before we start the revert process to not destroy VMs.

Resolves: https://issues.redhat.com/browse/RHEL-30971
Resolves: https://issues.redhat.com/browse/RHEL-79928
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_snapshot.c