mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
libxl: copy persistent domain definition while starting a guest
We should make a copy of current definition to preserve a persistent definition, because we later update the definition with live changes. The live definition is discarded on domain shutdown and replaced by the copy we make before starting the domain. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
@@ -959,6 +959,10 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
||||
VIR_FREE(managed_save_path);
|
||||
}
|
||||
|
||||
if (virDomainObjSetDefTransient(cfg->caps, driver->xmlopt,
|
||||
vm, true) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (libxlBuildDomainConfig(driver->reservedGraphicsPorts, vm->def,
|
||||
cfg->ctx, &d_config) < 0)
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user