]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: Set current memory value after successful balloon
authorJim Fehlig <jfehlig@suse.com>
Thu, 10 Jan 2019 22:18:36 +0000 (15:18 -0700)
committerJim Fehlig <jfehlig@suse.com>
Wed, 23 Jan 2019 17:50:05 +0000 (10:50 -0700)
The libxl driver does not set the new memory value in the active domain def
after a successful balloon. This results in the old memory value in
<currentMemory>. E.g.

virsh dumpxml test | grep currentMemory
  <currentMemory unit='KiB'>20971520</currentMemory>
virsh setmem test 16777216 --live
virsh dumpxml test | grep currentMemory
  <currentMemory unit='KiB'>20971520</currentMemory>

Set the new memory value in active domain def after a successful call to
libxl_set_memory_target().

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/libxl/libxl_driver.c

index e30c9891d29af7fc6f6290b889bf8d8ba6aa462c..f11597b0d7cd6e9139ccd9aa3f466ab3c9482ca0 100644 (file)
@@ -1676,6 +1676,7 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
                                  " with libxenlight"), vm->def->id);
                 goto endjob;
             }
+            vm->def->mem.cur_balloon = newmem;
         }
 
         if (flags & VIR_DOMAIN_MEM_CONFIG) {