]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: copy persistent domain definition while starting a guest
authorPavel Hrdina <phrdina@redhat.com>
Thu, 3 Dec 2015 12:38:56 +0000 (13:38 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 9 Dec 2015 12:00:23 +0000 (13:00 +0100)
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>
src/libxl/libxl_domain.c

index 40dcea171c06746d7e49ae3a73a01e0c3d014c4e..c86dbbd8eceb4e0b014dc0466d8e2eace382acff 100644 (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;