mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_process: continue to process fakereboot after restarting libvirtd
During the vm rebooting, the vm could be paused if the libvirtd is restarted for some reason, which is not expected. We need continue fakereboot process if fakereboot flags is true and the vm is in paused-user status. Signed-off-by: Bihong Yu <yubihong@huawei.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
83ce9ec0a7
commit
e3959c928e
@ -8732,13 +8732,15 @@ qemuProcessReconnect(void *opaque)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* In case the domain shutdown while we were not running,
|
||||
* we need to finish the shutdown process. And we need to do it after
|
||||
* we have virQEMUCaps filled in.
|
||||
/* In case the domain shutdown or fake reboot while we were not running,
|
||||
* we need to finish the shutdown or fake reboot process. And we need to
|
||||
* do it after we have virQEMUCaps filled in.
|
||||
*/
|
||||
if (state == VIR_DOMAIN_SHUTDOWN ||
|
||||
(state == VIR_DOMAIN_PAUSED &&
|
||||
reason == VIR_DOMAIN_PAUSED_SHUTTING_DOWN)) {
|
||||
reason == VIR_DOMAIN_PAUSED_SHUTTING_DOWN) ||
|
||||
(priv->fakeReboot && state == VIR_DOMAIN_PAUSED &&
|
||||
reason == VIR_DOMAIN_PAUSED_USER)) {
|
||||
VIR_DEBUG("Finishing shutdown sequence for domain %s",
|
||||
obj->def->name);
|
||||
qemuProcessShutdownOrReboot(driver, obj);
|
||||
|
Loading…
x
Reference in New Issue
Block a user