mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 11:21:44 +03:00
qemu: Refresh state after restore from a save image
When restoring a domain from a save image, we need to query QEMU for some runtime information that is not stored in status XML, or even if it is, it's not parsed (e.g. virtio-mem actual size, or soon rx-filters for macvtaps). During migration, this is done in qemuMigrationDstFinishFresh(), or in case of newly started domain in qemuProcessStart(). Except, the way that the code is written, when restoring from a save image (which is effectively a migration), the state is never refreshed, because qemuProcessStart() sees incoming migration so it does not refresh the state thinking it'll be done in the finish phase. But restoring from a save image has no finish phase. Therefore, refresh the state explicitly after the domain was restored but before vCPUs are resumed. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
43973de6f1
commit
7356dce2b3
@ -672,6 +672,8 @@ qemuSaveImageStartVM(virConnectPtr conn,
|
||||
VIR_DOMAIN_EVENT_STARTED_RESTORED);
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
|
||||
if (qemuProcessRefreshState(driver, vm, asyncJob) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* If it was running before, resume it now unless caller requested pause. */
|
||||
if (header->was_running && !start_paused) {
|
||||
|
Loading…
Reference in New Issue
Block a user