]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: prepare cleanup for <transient/> disk overlays
authorPeter Krempa <pkrempa@redhat.com>
Tue, 22 Sep 2020 12:39:27 +0000 (14:39 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Oct 2020 07:55:02 +0000 (09:55 +0200)
commitafc25e8553fa67ffa9741fc4c5b5c1689b08ed5a
tree7c63a9bdcedece1f886f0e21fd9440f1cfdcfec3
parent797ee40b214c80349434bbee476dc62944d500be
qemu: prepare cleanup for <transient/> disk overlays

Later patches will implement support for <transient/> disks in libvirt
by installing an overlay on top of the configured image. This will
require cleanup after the VM will be stopped so that the state is
correctly discarded.

Since the overlay will be installed only during the startup phase of the
VM we need to ensure that qemuProcessStop doesn't delete the original
file on some previous failure. This is solved by adding
'inhibitDiskTransientDelete' VM private data member which is set prior
to any startup step and will be cleared once transient disk overlays are
established.

Based on that we can then delete the overlays for any <transient/> disk.

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_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_process.c