[PATCH] qemu: Update a domain's persistent definition file if it's defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux