]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuProcessHandleReset: Don't emulate lifecycle actions for RESET event
authorPeter Krempa <pkrempa@redhat.com>
Fri, 20 Aug 2021 14:16:46 +0000 (16:16 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Aug 2021 13:32:44 +0000 (15:32 +0200)
commit24dab19f8a7a46661d9a49c2fb73b25d8c5544be
tree50da82674156a3d154f230407524752c1266b0d8
parent5fb54459e3c929d20f853a70c65decbd6ad307ad
qemuProcessHandleReset: Don't emulate lifecycle actions for RESET event

The RESET event is delivered by qemu only when the guest OS is actually
allowed to reboot ('-no-reboot' or equivalent is not used) and due to
the nature of async handling of the events VM is actually already
executing guest code after the reboot, until our code gets to killing
it.

In general it should have been impossible to reach a state where the
reboot action is 'destroy' but we didn't use '-no-reboot' but due to
various bugs it was.

Due to the fact that this was not a desired operation and additionally
guest code already is executing I think the best option is not to kill
the VM any more (possible data loss?) and rely for the proper fix where
we use the new 'set-action' QMP command to enable an equivalent
behaviour to '-no-reboot' during runtime.

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