]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Set fake reboot flag only in acpi mode for shutdown
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Thu, 14 Jul 2016 11:08:22 +0000 (14:08 +0300)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 2 Aug 2016 13:28:32 +0000 (09:28 -0400)
commit3b676eb67f17cd4ba9e0d0aa7702bbf419f9796f
treec1a2ff3831b247020a24d2648737348d6857068c
parent172218a01eea0f9e0b45852e4a646cbf96acf7cd
qemu: Set fake reboot flag only in acpi mode for shutdown

Conditional setting of the fake reboot flag should only happen for
the acpi mode shutdown path; however, for the agent mode shutdown,
the fake reboot should be cleared. This patch will essentially revert
commit id '8be502fd', but adds an explicit setting of the flag to false
when using mode=agent while also only conditionally setting the reboot
flag if the guest went away. This also avoids an issue where a shutdown
with reboot semantics is done from agent mode which sets the reboot
flag followed by a shutdown from within the guest which would result
in a reboot due to the fake reboot flag being set. The change will
also properly handle the cases described in the following archive post:

  https://www.redhat.com/archives/libvir-list/2015-April/msg00715.html
src/qemu/qemu_driver.c