[libvirt] [PATCH 6/6] qemu: setvcpus: Save config changes to disk

Cole Robinson crobinso at redhat.com
Mon Nov 22 21:35:34 UTC 2010


Currently changes to the persistent config aren't flushed to disk, meaning
they are lost if the domain is redefined or libvirtd is restarted.

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 src/qemu/qemu_driver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c0335c3..04cca43 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6367,6 +6367,10 @@ qemudDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
         break;
     }
 
+    /* Save the persistent config to disk */
+    if (flags & VIR_DOMAIN_VCPU_CONFIG)
+        ret = virDomainSaveConfig(driver->configDir, persistentDef);
+
 endjob:
     if (qemuDomainObjEndJob(vm) == 0)
         vm = NULL;
-- 
1.7.3.2




More information about the libvir-list mailing list