From: Li XueLei <li.xuelei1@xxxxxxxxxx> During making disk snapshot in an active domain, sometimes we should update the domain's persistent definition.We must check if the domain is defined, before we update the persistent definition file. First,we create a vm.Then,define the vm and undefine the vm.Last create a --memspec snapshot for the vm.Now,we will find a persistent definition file in the config directory if we don't use this patch. Signed-off-by: Li XueLei <li.xuelei1@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e32257f..94dcb97 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15330,7 +15330,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver, if (ret == 0 || !do_transaction) { if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0 || - (persist && virDomainSaveConfig(cfg->configDir, driver->caps, + (vm->persistent && persist && virDomainSaveConfig(cfg->configDir, driver->caps, vm->newDef) < 0)) ret = -1; } -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list