[PATCH] Add VIR_DIV_UP to divide memory or storage request sizes with round up

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

 



Use it in all places where a memory or storage request size is converted
to a larger granularity. This avoids requesting too small memory or storage
sizes that could result from the truncation done by a simple division.

This extends the round up fix in 6002e0406c338668ea0ecbfeb6c1ef20a8b67efe
to the whole codebase.

Instead of reporting errors for odd values in the VMX code round them up.

Update the QEMU Argv tests accordingly as the original memory size 219200
isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
it to 219100 and 219136. Use two different values intentionally to make
sure that rounding up works.

Update virsh.pod accordingly, as rounding down and rejecting are replaced
by rounding up.
---
 src/esx/esx_driver.c                               |    6 +-
 src/esx/esx_storage_driver.c                       |    3 +-
 src/internal.h                                     |    3 +
 src/opennebula/one_conf.c                          |    2 +-
 src/qemu/qemu_command.c                            |    2 +-
 src/qemu/qemu_monitor_text.c                       |    2 +-
 src/storage/storage_backend.c                      |    5 +-
 src/storage/storage_backend_logical.c              |    5 +--
 src/vbox/vbox_tmpl.c                               |   11 +++--
 src/vmx/vmx.c                                      |   57 ++++++--------------
 src/xen/xend_internal.c                            |    7 ++-
 src/xen/xm_internal.c                              |    4 +-
 .../qemuxml2argv-balloon-device-auto.xml           |    4 +-
 .../qemuxml2argv-balloon-device.xml                |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml  |    4 +-
 .../qemuxml2argv-boot-menu-disable.xml             |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-boot-network.xml |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml |    4 +-
 .../qemuxml2argv-channel-guestfwd.xml              |    4 +-
 .../qemuxml2argv-channel-virtio-auto.xml           |    4 +-
 .../qemuxml2argv-channel-virtio.xml                |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-clock-france.xml |    4 +-
 .../qemuxml2argv-clock-localtime.xml               |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml  |    4 +-
 .../qemuxml2argv-clock-variable.xml                |    4 +-
 .../qemuxml2argv-console-compat-auto.xml           |    4 +-
 .../qemuxml2argv-console-compat-chardev.xml        |    4 +-
 .../qemuxml2argv-console-compat.xml                |    4 +-
 .../qemuxml2argv-console-virtio.xml                |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml  |    4 +-
 .../qemuxml2argv-cpu-topology1.xml                 |    4 +-
 .../qemuxml2argv-cpu-topology2.xml                 |    4 +-
 .../qemuxml2argv-cpu-topology3.xml                 |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml   |    4 +-
 .../qemuxml2argv-disk-cdrom-empty.xml              |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml |    4 +-
 .../qemuxml2argv-disk-drive-boot-cdrom.xml         |    4 +-
 .../qemuxml2argv-disk-drive-boot-disk.xml          |    4 +-
 .../qemuxml2argv-disk-drive-cache-v1-none.xml      |    4 +-
 .../qemuxml2argv-disk-drive-cache-v1-wb.xml        |    4 +-
 .../qemuxml2argv-disk-drive-cache-v1-wt.xml        |    4 +-
 .../qemuxml2argv-disk-drive-cache-v2-none.xml      |    4 +-
 .../qemuxml2argv-disk-drive-cache-v2-wb.xml        |    4 +-
 .../qemuxml2argv-disk-drive-cache-v2-wt.xml        |    4 +-
 ...muxml2argv-disk-drive-error-policy-enospace.xml |    4 +-
 .../qemuxml2argv-disk-drive-error-policy-stop.xml  |    4 +-
 .../qemuxml2argv-disk-drive-fat.xml                |    4 +-
 .../qemuxml2argv-disk-drive-fmt-qcow.xml           |    4 +-
 .../qemuxml2argv-disk-drive-network-nbd.xml        |    4 +-
 .../qemuxml2argv-disk-drive-network-rbd.xml        |    4 +-
 .../qemuxml2argv-disk-drive-network-sheepdog.xml   |    4 +-
 .../qemuxml2argv-disk-drive-readonly-disk.xml      |    4 +-
 .../qemuxml2argv-disk-drive-readonly-no-device.xml |    4 +-
 .../qemuxml2argv-disk-drive-shared.xml             |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml  |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml  |    4 +-
 .../qemuxml2argv-disk-scsi-device-auto.xml         |    4 +-
 .../qemuxml2argv-disk-scsi-device.xml              |    4 +-
 .../qemuxml2argv-disk-usb-device.xml               |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml   |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml  |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml  |    4 +-
 .../qemuxml2argv-floppy-drive-fat.xml              |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml       |    4 +-
 .../qemuxml2argv-graphics-sdl-fullscreen.xml       |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml |    4 +-
 .../qemuxml2argv-graphics-spice.xml                |    4 +-
 .../qemuxml2argv-graphics-vnc-sasl.xml             |    4 +-
 .../qemuxml2argv-graphics-vnc-socket.xml           |    4 +-
 .../qemuxml2argv-graphics-vnc-tls.xml              |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml |    4 +-
 .../qemuxml2argv-hostdev-pci-address-device.xml    |    4 +-
 .../qemuxml2argv-hostdev-pci-address.xml           |    4 +-
 .../qemuxml2argv-hostdev-usb-address-device.xml    |    4 +-
 .../qemuxml2argv-hostdev-usb-address.xml           |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml  |    4 +-
 .../qemuxml2argv-input-usbmouse.xml                |    4 +-
 .../qemuxml2argv-input-usbtablet.xml               |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml  |    4 +-
 .../qemuxml2argv-machine-aliases1.xml              |    4 +-
 .../qemuxml2argv-machine-aliases2.xml              |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-memtune.xml    |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-migrate.xml    |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-minimal.xml    |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml  |    4 +-
 .../qemuxml2argv-misc-no-reboot.xml                |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml  |    4 +-
 .../qemuxml2argv-net-eth-ifname.xml                |    4 +-
 .../qemuxml2argv-net-eth-names.xml                 |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml    |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-net-user.xml   |    4 +-
 .../qemuxml2argv-net-virtio-device.xml             |    4 +-
 .../qemuxml2argv-net-virtio-netdev.xml             |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml |    4 +-
 .../qemuxml2argv-nographics-vga.xml                |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-nographics.xml |    4 +-
 .../qemuxml2argv-parallel-tcp-chardev.xml          |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml |    4 +-
 .../qemuxml2argv-qemu-ns-no-env.xml                |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml    |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml |    4 +-
 .../qemuxml2argv-restore-v2-fd.xml                 |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml |    4 +-
 .../qemuxml2argv-serial-dev-chardev.xml            |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml |    4 +-
 .../qemuxml2argv-serial-file-chardev.xml           |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-serial-file.xml  |    4 +-
 .../qemuxml2argv-serial-many-chardev.xml           |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-serial-many.xml  |    4 +-
 .../qemuxml2argv-serial-pty-chardev.xml            |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml |    4 +-
 .../qemuxml2argv-serial-tcp-chardev.xml            |    4 +-
 .../qemuxml2argv-serial-tcp-telnet-chardev.xml     |    4 +-
 .../qemuxml2argv-serial-tcp-telnet.xml             |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml |    4 +-
 .../qemuxml2argv-serial-udp-chardev.xml            |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml |    4 +-
 .../qemuxml2argv-serial-unix-chardev.xml           |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-serial-unix.xml  |    4 +-
 .../qemuxml2argv-serial-vc-chardev.xml             |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml  |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-smbios.xml     |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-smp.xml        |    4 +-
 .../qemuxml2argvdata/qemuxml2argv-sound-device.xml |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-sound.xml      |    4 +-
 .../qemuxml2argv-watchdog-device.xml               |    4 +-
 .../qemuxml2argv-watchdog-dump.xml                 |    4 +-
 tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml   |    4 +-
 .../qemuxml2xmlout-balloon-device-auto.xml         |    4 +-
 .../qemuxml2xmlout-channel-virtio-auto.xml         |    4 +-
 .../qemuxml2xmlout-console-compat-auto.xml         |    4 +-
 .../qemuxml2xmlout-console-virtio.xml              |    4 +-
 .../qemuxml2xmlout-disk-scsi-device-auto.xml       |    4 +-
 tools/virsh.pod                                    |   16 +++---
 141 files changed, 309 insertions(+), 326 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 2799487..61c2371 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2060,7 +2060,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
     }
 
     spec->memoryMB->value =
-      memory / 1024; /* Scale from kilobytes to megabytes */
+      VIR_DIV_UP(memory, 1024); /* Scale from kilobytes to megabytes */
 
     if (esxVI_ReconfigVM_Task(priv->primary, virtualMachine->obj, spec,
                               &task) < 0 ||
@@ -2117,7 +2117,7 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
     }
 
     spec->memoryAllocation->limit->value =
-      memory / 1024; /* Scale from kilobytes to megabytes */
+      VIR_DIV_UP(memory, 1024); /* Scale from kilobytes to megabytes */
 
     if (esxVI_ReconfigVM_Task(priv->primary, virtualMachine->obj, spec,
                               &task) < 0 ||
@@ -4448,7 +4448,7 @@ esxDomainSetMemoryParameters(virDomainPtr domain, virMemoryParameterPtr params,
             }
 
             spec->memoryAllocation->reservation->value =
-              params[i].value.ul / 1024; /* Scale from kilobytes to megabytes */
+              VIR_DIV_UP(params[i].value.ul, 1024); /* Scale from kilobytes to megabytes */
         } else {
             ESX_ERROR(VIR_ERR_INVALID_ARG, _("Unknown field '%s'"),
                       params[i].field);
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 12c8f5e..136a90b 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -1106,7 +1106,8 @@ esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
          */
         virtualDiskSpec->adapterType = (char *)"busLogic";
 
-        virtualDiskSpec->capacityKb->value = def->capacity / 1024; /* Scale from byte to kilobyte */
+        virtualDiskSpec->capacityKb->value =
+          VIR_DIV_UP(def->capacity, 1024); /* Scale from byte to kilobyte */
 
         if (esxVI_CreateVirtualDisk_Task
               (priv->primary, datastorePath, priv->primary->datacenter->_reference,
diff --git a/src/internal.h b/src/internal.h
index 038b862..11ba45f 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -231,4 +231,7 @@
         }                                                               \
     } while (0)
 
+/* divide value by size, rounding up */
+# define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size))
+
 #endif                          /* __VIR_INTERNAL_H__ */
diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c
index 0b0a08a..60afca5 100644
--- a/src/opennebula/one_conf.c
+++ b/src/opennebula/one_conf.c
@@ -175,7 +175,7 @@ char* xmlOneTemplate(virDomainDefPtr def)
                       "by libvirt\nNAME = %s\nCPU = %d\nMEMORY = %ld\n",
                       def->name,
                       def->maxvcpus,
-                      (def->mem.max_balloon)/1024);
+                      VIR_DIV_UP(def->mem.max_balloon, 1024));
 
     /*Optional Booting OpenNebula Information:*/
     if (def->os.kernel) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c0ec00b..a0f86a3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2667,7 +2667,7 @@ qemuBuildCommandLine(virConnectPtr conn,
      * is not supported, then they're out of luck anyway
      */
     virCommandAddArg(cmd, "-m");
-    virCommandAddArgFormat(cmd, "%lu", def->mem.max_balloon / 1024);
+    virCommandAddArgFormat(cmd, "%lu", VIR_DIV_UP(def->mem.max_balloon, 1024));
     if (def->mem.hugepage_backed) {
         if (!driver->hugetlbfs_mount) {
             qemuReportError(VIR_ERR_INTERNAL_ERROR,
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 4cf87fe..6d0ba4c 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -852,7 +852,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
      * 'newmem' is in KB, QEMU monitor works in MB, and we all wish
      * we just worked in bytes with unsigned long long everywhere.
      */
-    if (virAsprintf(&cmd, "balloon %lu", (newmem / 1024)) < 0) {
+    if (virAsprintf(&cmd, "balloon %lu", VIR_DIV_UP(newmem, 1024)) < 0) {
         virReportOOMError();
         return -1;
     }
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index bfe1172..2eede74 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -725,7 +725,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
     }
 
     /* Size in KB */
-    if (virAsprintf(&size, "%lluK", vol->capacity / 1024) < 0) {
+    if (virAsprintf(&size, "%lluK", VIR_DIV_UP(vol->capacity, 1024)) < 0) {
         virReportOOMError();
         goto cleanup;
     }
@@ -870,7 +870,8 @@ virStorageBackendCreateQcowCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
     }
 
     /* Size in MB - yes different units to qemu-img :-( */
-    if (virAsprintf(&size, "%llu", vol->capacity / 1024 / 1024) < 0) {
+    if (virAsprintf(&size, "%llu",
+                    VIR_DIV_UP(vol->capacity, (1024 * 1024))) < 0) {
         virReportOOMError();
         return -1;
     }
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 389ecd7..ead35cb 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -604,10 +604,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
         cmdargv = cmdargvsnap;
     }
 
-    unsigned long long int capacity;
-    capacity = (vol->capacity + 1023) /1024;
-
-    snprintf(size, sizeof(size)-1, "%lluK", capacity);
+    snprintf(size, sizeof(size)-1, "%lluK", VIR_DIV_UP(vol->capacity, 1024));
     size[sizeof(size)-1] = '\0';
 
     vol->type = VIR_STORAGE_VOL_BLOCK;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 77b43f8..b5cde1f 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1784,7 +1784,8 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) {
             rc = data->vboxSession->vtbl->GetMachine(data->vboxSession, &machine);
             if (NS_SUCCEEDED(rc) && machine) {
 
-                rc = machine->vtbl->SetMemorySize(machine, memory / 1024);
+                rc = machine->vtbl->SetMemorySize(machine,
+                                                  VIR_DIV_UP(memory, 1024));
                 if (NS_SUCCEEDED(rc)) {
                     machine->vtbl->SaveSettings(machine);
                     ret = 0;
@@ -4398,7 +4399,8 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine)
 {
     if ((def->nvideos == 1) &&
         (def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_VBOX)) {
-        machine->vtbl->SetVRAMSize(machine, def->videos[0]->vram / 1024);
+        machine->vtbl->SetVRAMSize(machine,
+                                   VIR_DIV_UP(def->videos[0]->vram, 1024));
         machine->vtbl->SetMonitorCount(machine, def->videos[0]->heads);
         if (def->videos[0]->accel) {
             machine->vtbl->SetAccelerate3DEnabled(machine,
@@ -4771,7 +4773,8 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
         goto cleanup;
     }
 
-    rc = machine->vtbl->SetMemorySize(machine, def->mem.cur_balloon / 1024);
+    rc = machine->vtbl->SetMemorySize(machine,
+                                      VIR_DIV_UP(def->mem.cur_balloon, 1024));
     if (NS_FAILED(rc)) {
         vboxError(VIR_ERR_INTERNAL_ERROR,
                   _("could not set the memory size of the domain to: %lu Kb, "
@@ -8072,7 +8075,7 @@ static virStorageVolPtr vboxStorageVolCreateXML(virStoragePoolPtr pool,
         rc = data->vboxObj->vtbl->CreateHardDisk(data->vboxObj, hddFormatUtf16, hddNameUtf16, &hardDisk);
         if (NS_SUCCEEDED(rc)) {
             IProgress *progress    = NULL;
-            PRUint64   logicalSize = def->capacity / 1024 / 1024;
+            PRUint64   logicalSize = VIR_DIV_UP(def->capacity, 1024 * 1024);
             PRUint32   variant     = HardDiskVariant_Standard;
 
             if (def->capacity == def->allocation)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 44c014f..2f574fc 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2818,7 +2818,7 @@ virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def)
         goto cleanup;
     }
 
-    (*def)->vram = svga_vramSize / 1024; /* Scale from bytes to kilobytes */
+    (*def)->vram = VIR_DIV_UP(svga_vramSize, 1024); /* Scale from bytes to kilobytes */
 
     result = 0;
 
@@ -2849,6 +2849,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
     char *preliminaryDisplayName = NULL;
     char *displayName = NULL;
     char *annotation = NULL;
+    unsigned long max_balloon;
     bool scsi_present[4] = { false, false, false, false };
     int scsi_virtualDev[4] = { -1, -1, -1, -1 };
     bool floppy_present[2] = { false, false };
@@ -2940,46 +2941,24 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
     }
 
     /* def:mem.max_balloon -> vmx:memsize */
-    if (def->mem.max_balloon <= 0 || def->mem.max_balloon % 4096 != 0) {
-        VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
-                  _("Expecting domain XML entry 'memory' to be an unsigned "
-                    "integer (multiple of 4096) but found %lld"),
-                  (unsigned long long)def->mem.max_balloon);
-        goto cleanup;
-    }
+    /* max-memory must be a multiple of 4096 kilobyte */
+    max_balloon = VIR_DIV_UP(def->mem.max_balloon, 4096) * 4096;
 
-    /* Scale from kilobytes to megabytes */
-    virBufferVSprintf(&buffer, "memsize = \"%d\"\n",
-                      (int)(def->mem.max_balloon / 1024));
+    virBufferVSprintf(&buffer, "memsize = \"%lu\"\n",
+                      max_balloon / 1024); /* Scale from kilobytes to megabytes */
 
     /* def:mem.cur_balloon -> vmx:sched.mem.max */
-    if (def->mem.cur_balloon < def->mem.max_balloon) {
-        if (def->mem.cur_balloon <= 0 || def->mem.cur_balloon % 1024 != 0) {
-            VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
-                      _("Expecting domain XML entry 'currentMemory' to be an "
-                        "unsigned integer (multiple of 1024) but found %llu"),
-                      (unsigned long long)def->mem.cur_balloon);
-            goto cleanup;
-        }
-
-        /* Scale from kilobytes to megabytes */
-        virBufferVSprintf(&buffer, "sched.mem.max = \"%d\"\n",
-                          (int)(def->mem.cur_balloon / 1024));
+    if (def->mem.cur_balloon < max_balloon) {
+        virBufferVSprintf(&buffer, "sched.mem.max = \"%lu\"\n",
+                          VIR_DIV_UP(def->mem.cur_balloon,
+                                     1024)); /* Scale from kilobytes to megabytes */
     }
 
     /* def:mem.min_guarantee -> vmx:sched.mem.minsize */
     if (def->mem.min_guarantee > 0) {
-        if (def->mem.min_guarantee % 1024 != 0) {
-            VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
-                      _("Expecting domain XML entry 'memtune/min_guarantee' to "
-                        "be an unsigned integer (multiple of 1024) but found %llu"),
-                      (unsigned long long)def->mem.min_guarantee);
-            goto cleanup;
-        }
-
-        /* Scale from kilobytes to megabytes */
-        virBufferVSprintf(&buffer, "sched.mem.minsize = \"%d\"\n",
-                          (int)(def->mem.min_guarantee / 1024));
+        virBufferVSprintf(&buffer, "sched.mem.minsize = \"%lu\"\n",
+                          VIR_DIV_UP(def->mem.min_guarantee,
+                                     1024)); /* Scale from kilobytes to megabytes */
     }
 
     /* def:maxvcpus -> vmx:numvcpus */
@@ -3733,6 +3712,8 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
 int
 virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
 {
+    unsigned long long vram;
+
     if (def->type != VIR_DOMAIN_VIDEO_TYPE_VMVGA) {
         VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
                   _("Unsupported video device type '%s'"),
@@ -3744,11 +3725,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
      * For Windows guests the VRAM size should be a multiple of 64 kilobyte.
      * See http://kb.vmware.com/kb/1003 and http://kb.vmware.com/kb/1001558
      */
-    if (def->vram % 64 != 0) {
-        VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
-                  _("Video device VRAM size must be a multiple of 64 kilobyte"));
-        return -1;
-    }
+    vram = VIR_DIV_UP(def->vram, 64) * 64;
 
     if (def->heads > 1) {
         VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -3757,7 +3734,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
     }
 
     virBufferVSprintf(buffer, "svga.vramSize = \"%lld\"\n",
-                      def->vram * 1024LL); /* Scale from kilobytes to bytes */
+                      vram * 1024); /* kilobyte to byte */
 
     return 0;
 }
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 44d5a22..00fcbf2 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -3111,7 +3111,7 @@ xenDaemonDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
     if (domain->id < 0 && priv->xendConfigVersion < 3)
         return(-1);
 
-    snprintf(buf, sizeof(buf), "%lu", memory >> 10);
+    snprintf(buf, sizeof(buf), "%lu", VIR_DIV_UP(memory, 1024));
     return xend_op(domain->conn, domain->name, "op", "maxmem_set", "memory",
                    buf, NULL);
 }
@@ -3148,7 +3148,7 @@ xenDaemonDomainSetMemory(virDomainPtr domain, unsigned long memory)
     if (domain->id < 0 && priv->xendConfigVersion < 3)
         return(-1);
 
-    snprintf(buf, sizeof(buf), "%lu", memory >> 10);
+    snprintf(buf, sizeof(buf), "%lu", VIR_DIV_UP(memory, 1024));
     return xend_op(domain->conn, domain->name, "op", "mem_target_set",
                    "target", buf, NULL);
 }
@@ -5778,7 +5778,8 @@ xenDaemonFormatSxpr(virConnectPtr conn,
     virBufferAddLit(&buf, "(vm ");
     virBufferEscapeSexpr(&buf, "(name '%s')", def->name);
     virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)",
-                      def->mem.cur_balloon/1024, def->mem.max_balloon/1024);
+                      VIR_DIV_UP(def->mem.cur_balloon, 1024),
+                      VIR_DIV_UP(def->mem.max_balloon, 1024));
     virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
     /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
        either 32, or 64 on a platform where long is big enough.  */
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index bfb6698..865805c 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -2336,10 +2336,10 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
     if (xenXMConfigSetString(conf, "uuid", uuid) < 0)
         goto no_memory;
 
-    if (xenXMConfigSetInt(conf, "maxmem", def->mem.max_balloon / 1024) < 0)
+    if (xenXMConfigSetInt(conf, "maxmem", VIR_DIV_UP(def->mem.max_balloon, 1024)) < 0)
         goto no_memory;
 
-    if (xenXMConfigSetInt(conf, "memory", def->mem.cur_balloon / 1024) < 0)
+    if (xenXMConfigSetInt(conf, "memory", VIR_DIV_UP(def->mem.cur_balloon, 1024)) < 0)
         goto no_memory;
 
     if (xenXMConfigSetInt(conf, "vcpus", def->maxvcpus) < 0)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
index 26c9b25..9315621 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
index 274eb8b..8ac3c09 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
index 410e6f9..14ccd23 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
index ad8bae2..db3a94f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
index ceb109c..bc1da8a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
index 48f27aa..44ca0fa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
index b1b7721..d3f3369 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
index eabbe87..ba8a9b2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
index af19b3b..6ce846d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
@@ -1,8 +1,8 @@
 <domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <bootloader>/usr/bin/pygrub</bootloader>
   <os>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
index b3c56b1..b1d5281 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
index afd73f4..c127d84 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
index 2dbb596..f612c02 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
index 8794492..017ef39 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
index 786d0c7..ed746c1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
index 41818d2..9f52cca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
index f0e875e..bd19988 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
index 611ddb8..0bf52f4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
index 9591c87..9011522 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
index fd72421..259af4a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
index 53d3a8d..d6db442 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
index cd2a506..831291a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
index 2a163d6..1a2bef6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
index b3baed7..795baca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
index 55f6b3c..3dee11f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
index ca336b8..6b37207 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
index 3308965..9f09e81 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
index ca336b8..6b37207 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>6</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
index d893736..f6d7633 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
index 1b18d61..bc40d16 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
index 061b196..2fd2e6a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
index 0994a49..434cd7e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
index 9762f5a..452cb82 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
index 0b2f512..3f60871 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
index a438086..6a4e8e3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
index 29012a8..5f351f5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
index 0b2f512..da07d5e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
index a438086..8c30aec 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
index 29012a8..a9e0c33 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
index b3e6de9..f9a56ab 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
index a486502..6d99607 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
index a3491e7..d473711 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
index f2643bb..cc88ef5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
index 863165d..c0255a8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
index 118d890..e920db1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
index 5313d75..83d6c4e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
index 1f193c9..c0cf6a4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
index 1f193c9..c0cf6a4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
index 27e741a..8dcf4b7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
index c0a4a08..6c2a18d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
index 14f85cc..3b28a34 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
index df50a27..a7e55b0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
index a250940..530c0a6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
index 6d35eea..7ad35e3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
index 79ab654..0a9adef 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
index a8aae71..eef9a1b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
index a3dd4c6..c940847 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
index ec74bdd..ceee0b8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
index 9072ead..62b12bc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index 06b0539..4e11a28 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index 16fd3ba..cf5aaa9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 15a22f3..fc9f3fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index d6ad72b..19c9213 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
index 711e3f8..4ef8af4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest2</name>
   <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
index 0347eee..a88ada4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest2</name>
   <uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
index da2562e..04dc7da 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
index 4391bf1..c224291 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
index 8ed7490..78bf4e1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <memoryBacking>
     <hugepages/>
   </memoryBacking>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
index b76a895..b9aff61 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
index a878f8c..18d5cb5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
index 0ea00c1..8a5fcd7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
@@ -1,8 +1,8 @@
 <domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <bootloader>/foo</bootloader>
   <os>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
index 9f3fc85..a969f8c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
index c57e64c..424179e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
@@ -1,8 +1,8 @@
 <domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='x86_64'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
index 9f713f0..37b5c88 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <memtune>
     <hard_limit>512000</hard_limit>
     <soft_limit>128000</soft_limit>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
index 8a13e47..2f13d46 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
index c8e87b0..d5f8d2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
index bb4f5f0..b06493f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
index c8e87b0..d5f8d2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
index 516957f..a638e06 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
index 7875d0c..74db024 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
index 5d410b3..d5c4b36 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
index ffc4a2c..540808d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
index e521796..572f3cc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
index e521796..5f2b12c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
index 9b9c059..ec930b3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
index 1093901..328f81e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
index 1093901..5c50ecc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
index 60087f1..0d9dd98 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
@@ -1,8 +1,8 @@
 <domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
index c48c248..c5020a0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
@@ -1,8 +1,8 @@
 <domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
index 5d24986..ea5a3f8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
index cc0ab43..41f473a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
index 98bc4ef..9a3e197 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
index 3e60e98..975d81e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
index b121c5c..d6116e8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
index 1d042f1..e68ad79 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
index 611ddb8..57d1b74 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
index 9591c87..19dd131 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
index 286417e..cd43384 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
index 5aeceb0..14bead4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
index 5bf6a08..ad5a038 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
index 304792e..45ad585 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
index 2c44738..12622d4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
index e4fe4fd..8697f5a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
index 2c07e94..4ed72aa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
index 61dff3f..4685ad4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
index 5b39736..fe1fdad 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
index 36bd622..6100332 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
index 23ec1a7..9f0ea7b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <sysinfo type='smbios'>
     <bios>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
index 975f873..cba15dc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu current='1'>2</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index fbca4fe..0f5df4d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index d34e0b3..57cabb4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
index 2dfc37e..48e969f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
index 4314ec4..d7c1f84 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
index 804dfd8..06da70b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
index ea79fba..a52ea8e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index 9591c87..9011522 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
index 431dd34..b64c7e5 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219100</memory>
+  <currentMemory>219100</currentMemory>
   <vcpu cpuset='1-4,8-20,525'>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
index a250940..530c0a6 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
@@ -1,8 +1,8 @@
 <domain type='qemu'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory>219200</memory>
-  <currentMemory>219200</currentMemory>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
   <vcpu>1</vcpu>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tools/virsh.pod b/tools/virsh.pod
index c00cc8a..441ca8a 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -576,9 +576,9 @@ XEN_CREDIT scheduler and are now I<DEPRECATED>.
 Immediately change the current memory allocation for an active guest domain.
 
 Some hypervisors require a larger granularity than kilobytes, and requests
-that are not an even multiple will either be rounded down or rejected.  For
-example, vSphere/ESX rejects the parameter unless the kB argument is evenly
-divisible by 1024 (that is, the kB argument happens to represent megabytes).
+that are not an even multiple will be rounded up.  For example, vSphere/ESX
+rounds the parameter up unless the kB argument is evenly divisible by 1024
+(that is, the kB argument happens to represent megabytes).
 
 For Xen, you can only adjust the memory of a running domain if the domain is
 paravirtualized or running the PV balloon driver.
@@ -594,11 +594,11 @@ Change the maximum memory allocation limit for an inactive guest domain.
 This command works for at least the Xen and vSphere/ESX hypervisors,
 but not for QEMU/KVM.
 
-Some hypervisors require a larger granularity than kilobytes, rounding down
-or rejecting requests that are not an even multiple of the desired amount.
-vSphere/ESX is one of these, requiring the parameter to be evenly divisible
-by 4MB.  For vSphere/ESX, 263168 (257MB) would be rejected because it's not
-a multiple of 4MB, while 266240 (260MB) is valid.
+Some hypervisors require a larger granularity than kilobytes, rounding up
+requests that are not an even multiple of the desired amount.  vSphere/ESX
+is one of these, requiring the parameter to be evenly divisible by 4MB.  For
+vSphere/ESX, 263168 (257MB) would be rounded up because it's not a multiple
+of 4MB, while 266240 (260MB) is valid without rounding.
 
 Note, to change the maximum memory allocation for a QEMU/KVM guest domain,
 use the virsh B<edit> command instead to update its XML <memory> element.
-- 
1.7.0.4

--
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]