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:
Pavel Hrdina 2015-12-03 13:38:56 +01:00
parent 5cc2d8f6d5
commit 6aff1e9ca5

View File

@ -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;