提交 13e6083e 编写于 作者: M Marc-André Lureau 提交者: Michal Privoznik

qemu: reset VM id after external devices stop

pid filenames (from swtpm and other helpers from this series) are
based on VM shortname, which is derived from VM id. If the id is reset
to early, the state filenames will not be found.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 2078be3e
......@@ -7418,8 +7418,6 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuProcessBuildDestroyMemoryPaths(driver, vm, NULL, false);
vm->def->id = -1;
if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
driver->inhibitCallback(false, driver->inhibitOpaque);
......@@ -7495,6 +7493,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuExtDevicesStop(driver, vm);
vm->def->id = -1;
/* Stop autodestroy in case guest is restarted */
qemuProcessAutoDestroyRemove(driver, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册