mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
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: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2078be3e46
commit
13e6083efa
@ -7418,8 +7418,6 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
qemuProcessBuildDestroyMemoryPaths(driver, vm, NULL, false);
|
qemuProcessBuildDestroyMemoryPaths(driver, vm, NULL, false);
|
||||||
|
|
||||||
vm->def->id = -1;
|
|
||||||
|
|
||||||
if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
|
if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallback)
|
||||||
driver->inhibitCallback(false, driver->inhibitOpaque);
|
driver->inhibitCallback(false, driver->inhibitOpaque);
|
||||||
|
|
||||||
@ -7495,6 +7493,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
qemuExtDevicesStop(driver, vm);
|
qemuExtDevicesStop(driver, vm);
|
||||||
|
|
||||||
|
vm->def->id = -1;
|
||||||
|
|
||||||
/* Stop autodestroy in case guest is restarted */
|
/* Stop autodestroy in case guest is restarted */
|
||||||
qemuProcessAutoDestroyRemove(driver, vm);
|
qemuProcessAutoDestroyRemove(driver, vm);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user