]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
blkdeviotune: fix bug with saving values into live XML
authorPavel Hrdina <phrdina@redhat.com>
Thu, 25 Sep 2014 09:28:25 +0000 (11:28 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 25 Sep 2014 09:50:03 +0000 (11:50 +0200)
When you updated some blkdeviotune values for running domain the values
were stored only internally, but not saved into the live XML so they
won't survive restarting the libvirtd.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_driver.c

index 4afd06620508832c97520d32764a4a5825971d6b..efce382107027a0a2e7e7b31e2ab69dc52fef042 100644 (file)
@@ -16406,6 +16406,13 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
         if (ret < 0)
             goto endjob;
         vm->def->disks[idx]->blkdeviotune = info;
+
+        ret = virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm);
+        if (ret < 0) {
+            virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+                           _("Saving live XML config failed"));
+            goto endjob;
+        }
     }
 
     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {