]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Reject 'rename-restart' action for 'on_reboot'/'on_poweroff'/'on_crash'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Aug 2021 14:23:02 +0000 (16:23 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Aug 2021 13:32:44 +0000 (15:32 +0200)
commit2b81fbb22e8389236e0374a9c6d56e9f8001f1ec
treeedc7177d55ec65b81cbe80828aadb4f76e66bb0a
parentd28103b4c4295ea94326868c68d0ac31d09ff721
qemu: Reject 'rename-restart' action for 'on_reboot'/'on_poweroff'/'on_crash'

The qemu driver didn't ever implement any meaningful handling for the
'rename-restart' action.

At this point the following handling would take place:

'on_reboot' set to 'rename-restart' is ignored on guest-initiated
reboots, the guest simply reboots.

For on_poweroff set to 'rename-restart' the following happens:

guest initiated shutdown -> 'destroy'
libvirt initiated shutdown -> 'reboot'

In addition when 'on_reboot' is 'destroy' in addition to 'on_poweroff'
being 'rename-restart' the guest is able to execute instructions after
issuing a reset before libvirt terminates it. This will be addressed
separately later.

Forbid the flag in the qemu def validator and update the documentation
to be factual.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/formatdomain.rst
src/qemu/qemu_validate.c
src/qemu/qemu_validate.h