]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: save domain state to XML after reboot
authorSergey Fionov <fionov@gmail.com>
Sat, 18 May 2013 11:47:51 +0000 (15:47 +0400)
committerEric Blake <eblake@redhat.com>
Fri, 24 May 2013 21:29:22 +0000 (15:29 -0600)
commit2697c8a116fbac52326bca180bdd3edfd1a8b544
treed4e01a2d51474fe2bab1fb243049a997a45a1161
parentbefc36a81dadaa48d228272b25d2022d33528032
qemu: save domain state to XML after reboot

Currently qemuDomainReboot() does reboot in two phases:
qemuMonitorSystemPowerdown() and qemuProcessFakeReboot().

qemuMonitorSystemPowerdown() shutdowns the domain and saves domain
state/reason as VIR_DOMAIN_SHUTDOWN_UNKNOWN.

qemuProcessFakeReboot() sets domain state/reason to
VIR_DOMAIN_RESUMED_UNPAUSED but does not save domain state changes.

Subsequent restart of libvirtd leads to restoring domain state/reason to
saved that is VIR_DOMAIN_SHUTDOWN_UNKNOWN and to automatic shutdown of
the domain. This commit adds virDomainSaveStatus() into
qemuProcessFakeReboot() to avoid unexpected shutdowns.
src/qemu/qemu_process.c