提交 e2b86f58 编写于 作者: D Dmitry Andreev 提交者: Jiri Denemark

qemuDomainReboot: use fakeReboot=true only for acpi mode

When acpi is used to reboot/shutdown qemu domain, qemu emits
SHUTDOWN event. Libvirt uses fakeReboot variable in order to
differentiate reboot or shutdown. fakeReboot value is reseted
to false after domain restart/reset.

When mode=agent is used to reboot qemu domain, qemu doesn't emit
SHUTDOWN event and libvirt doesn't reset fakeReboot value to false.
In this case next 'shutdown -h now' performs reboot. That's why
we don't need to set fakeReboot=true for mode=agent.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 3bd2ee5d
......@@ -2068,8 +2068,6 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
goto endjob;
}
qemuDomainSetFakeReboot(driver, vm, isReboot);
if (useAgent) {
qemuDomainObjEnterAgent(vm);
ret = qemuAgentShutdown(priv->agent, agentFlag);
......@@ -2096,6 +2094,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
#if WITH_YAJL
}
#endif
qemuDomainSetFakeReboot(driver, vm, isReboot);
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorSystemPowerdown(priv->mon);
if (qemuDomainObjExitMonitor(driver, vm) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册