mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
3bd2ee5d55
commit
e2b86f580c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user