]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: setvcpus: Save config changes to disk
authorCole Robinson <crobinso@redhat.com>
Mon, 22 Nov 2010 19:07:02 +0000 (14:07 -0500)
committerCole Robinson <crobinso@redhat.com>
Tue, 23 Nov 2010 13:42:46 +0000 (08:42 -0500)
Currently changes to the persistent config aren't flushed to disk, meaning
they are lost if the domain is redefined or libvirtd is restarted.

src/qemu/qemu_driver.c

index c0335c38324c59c0bf3947540399bc0d70ebe668..04cca432972557d0fd05107dffc1e0539c746fd3 100644 (file)
@@ -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;