]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: snapshot: Introduce helpers for creating overlays on <transient/> disks
authorPeter Krempa <pkrempa@redhat.com>
Mon, 21 Sep 2020 17:39:02 +0000 (19:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Oct 2020 07:55:02 +0000 (09:55 +0200)
commit117ff49db71f3ae7add0a20300d8cec6fc730a9a
treecb4b79e852087de4d563b040a6e737b43da15dce
parentafc25e8553fa67ffa9741fc4c5b5c1689b08ed5a
qemu: snapshot: Introduce helpers for creating overlays on <transient/> disks

To implement <transient/> disks we'll need to install an overlay on top
of the original disk image which will be discarded after the VM is
turned off. This was initially implemented by qemu but libvirt never
picked up this option as the overlays were created by qemu without
libvirt involvment which didn't work with SELinux.

With blockdev the qemu feature became unsupported so we need to do this
via the snapshot code anyways.

The helpers introduced in this patch prepare a fake snapshot disk
definition for a disk which is configured as <transient/> and use it to
create a snapshot (without actually modifying metadata or persistent
def).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Tested-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_snapshot.c
src/qemu/qemu_snapshot.h