[libvirt] [PATCH] Add VIR_DIV_UP to divide memory or storage request sizes with round up
by Matthias Bolte
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
13 years, 11 months
[libvirt] [PATCH] qemu: fix augeas support for vnc_auto_unix_socket
by Eric Blake
Fixes test failure that was overlooked after commit 1e1f7a8950.
* daemon/Makefile.am (check-local): Let 'make check' fail on error.
* daemon/test_libvirtd.aug: Move qemu-specific option...
* src/qemu/test_libvirtd_qemu.aug: ...into correct test.
* src/qemu/libvirtd_qemu.aug: Parse new option.
---
Followup to https://www.redhat.com/archives/libvir-list/2011-January/msg01171.html
daemon/Makefile.am | 5 +++--
daemon/test_libvirtd.aug | 6 ------
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/test_libvirtd_qemu.aug | 4 ++++
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 3ffb7be..cdf0f75 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -301,8 +301,9 @@ libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
mv $@-t $@
check-local:
- test -x '$(AUGPARSE)' \
- && '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug || :
+ $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
+ '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
+ fi
else
diff --git a/daemon/test_libvirtd.aug b/daemon/test_libvirtd.aug
index 31fa643..5f8b644 100644
--- a/daemon/test_libvirtd.aug
+++ b/daemon/test_libvirtd.aug
@@ -271,9 +271,6 @@ log_filters=\"a\"
# Auditing:
audit_level = 2
-
-# VNC socket
-vnc_auto_unix_socket = 1
"
test Libvirtd.lns get conf =
@@ -552,6 +549,3 @@ vnc_auto_unix_socket = 1
{ "#empty" }
{ "#comment" = "Auditing:" }
{ "audit_level" = "2" }
- { "#empty" }
- { "#comment" = "VNC socket:" }
- { "vnc_auto_unix_socket" = "1" }
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 2f37015..affd74e 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -23,6 +23,7 @@ module Libvirtd_qemu =
(* Config entry grouped by function - same order as example config *)
let vnc_entry = str_entry "vnc_listen"
+ | bool_entry "vnc_auto_unix_socket"
| bool_entry "vnc_tls"
| str_entry "vnc_tls_x509_cert_dir"
| bool_entry "vnc_tls_x509_verify"
diff --git a/src/qemu/test_libvirtd_qemu.aug b/src/qemu/test_libvirtd_qemu.aug
index b4d8833..8e477f5 100644
--- a/src/qemu/test_libvirtd_qemu.aug
+++ b/src/qemu/test_libvirtd_qemu.aug
@@ -109,6 +109,8 @@ vnc_allow_host_audio = 1
clear_emulator_capabilities = 0
allow_disk_format_probing = 1
+
+vnc_auto_unix_socket = 1
"
test Libvirtd_qemu.lns get conf =
@@ -228,3 +230,5 @@ allow_disk_format_probing = 1
{ "clear_emulator_capabilities" = "0" }
{ "#empty" }
{ "allow_disk_format_probing" = "1" }
+{ "#empty" }
+{ "vnc_auto_unix_socket" = "1" }
--
1.7.3.5
13 years, 11 months
[libvirt] [PATCH v2] virsh: added --all flag to freecell command
by Michal Privoznik
This will iterate over all NUMA nodes, showing
free memory for each and sum at the end.
Existing default behavior is not changed.
---
tools/virsh.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 63 insertions(+), 12 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index cd54174..505ae85 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2273,36 +2273,87 @@ static const vshCmdInfo info_freecell[] = {
static const vshCmdOptDef opts_freecell[] = {
{"cellno", VSH_OT_INT, 0, N_("NUMA cell number")},
+ {"all", VSH_OT_BOOL, 0, N_("show free memory for all NUMA cells")},
{NULL, 0, 0, NULL}
};
static int
cmdFreecell(vshControl *ctl, const vshCmd *cmd)
{
+ int func_ret = FALSE;
int ret;
int cell, cell_given;
unsigned long long memory;
+ unsigned long long *nodes = NULL;
+ int all_given;
+ virNodeInfo info;
+
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
cell = vshCommandOptInt(cmd, "cellno", &cell_given);
- if (!cell_given) {
- memory = virNodeGetFreeMemory(ctl->conn);
- if (memory == 0)
- return FALSE;
+ all_given = vshCommandOptBool(cmd, "all");
+
+ if (all_given && cell_given) {
+ vshError(ctl, "%s", _("--cellno and --all are mutually exclusive. "
+ "Please choose only one."));
+ goto cleanup;
+ }
+
+ if (all_given) {
+ if (virNodeGetInfo(ctl->conn, &info) < 0) {
+ vshError(ctl, "%s", _("failed to get NUMA nodes count"));
+ goto cleanup;
+ }
+
+ if (!info.nodes) {
+ vshError(ctl, "%s", _("no NUMA nodes present"));
+ goto cleanup;
+ }
+
+ if (VIR_ALLOC_N(nodes, info.nodes) < 0) {
+ vshError(ctl, "%s", _("could not allocate memory"));
+ goto cleanup;
+ }
+
+ ret = virNodeGetCellsFreeMemory(ctl->conn, nodes, 0, info.nodes);
+ if (ret != info.nodes) {
+ vshError(ctl, "%s", _("could not get information about "
+ "all NUMA nodes"));
+ goto cleanup;
+ }
+
+ memory = 0;
+ for (cell = 0; cell < info.nodes; cell++) {
+ vshPrint(ctl, "%5d: %10llu kB\n", cell, (nodes[cell]/1024));
+ memory += nodes[cell];
+ }
+
+ vshPrintExtra(ctl, "--------------------\n");
+ vshPrintExtra(ctl, "%5s: %10llu kB\n",_("Total"), memory/1024);
} else {
- ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
- if (ret != 1)
- return FALSE;
+ if (!cell_given) {
+ memory = virNodeGetFreeMemory(ctl->conn);
+ if (memory == 0)
+ goto cleanup;
+ } else {
+ ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
+ if (ret != 1)
+ goto cleanup;
+ }
+
+ if (cell == -1)
+ vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
+ else
+ vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
}
- if (cell == -1)
- vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
- else
- vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
+ func_ret = TRUE;
- return TRUE;
+cleanup:
+ VIR_FREE(nodes);
+ return func_ret;
}
/*
--
1.7.3.5
13 years, 11 months
[libvirt] [PATCH] esx: Don't try to change max-memory of an active domain
by Matthias Bolte
Report an VIR_ERR_OPERATION_INVALID error in that case instead of letting
the SOAP call fail with an VIR_ERR_INTERNAL_ERROR error.
---
src/esx/esx_driver.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 26f029c..2799487 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2027,7 +2027,9 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
{
int result = -1;
esxPrivate *priv = domain->conn->privateData;
+ esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL;
+ esxVI_VirtualMachinePowerState powerState;
esxVI_VirtualMachineConfigSpec *spec = NULL;
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
@@ -2037,10 +2039,22 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
return -1;
}
- if (esxVI_LookupVirtualMachineByUuidAndPrepareForTask
- (priv->primary, domain->uuid, NULL, &virtualMachine,
+ if (esxVI_String_AppendValueToList(&propertyNameList,
+ "runtime.powerState") < 0 ||
+ esxVI_LookupVirtualMachineByUuidAndPrepareForTask
+ (priv->primary, domain->uuid, propertyNameList, &virtualMachine,
priv->autoAnswer) < 0 ||
- esxVI_VirtualMachineConfigSpec_Alloc(&spec) < 0 ||
+ esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0) {
+ goto cleanup;
+ }
+
+ if (powerState != esxVI_VirtualMachinePowerState_PoweredOff) {
+ ESX_ERROR(VIR_ERR_OPERATION_INVALID, "%s",
+ _("Domain is not powered off"));
+ goto cleanup;
+ }
+
+ if (esxVI_VirtualMachineConfigSpec_Alloc(&spec) < 0 ||
esxVI_Long_Alloc(&spec->memoryMB) < 0) {
goto cleanup;
}
@@ -2067,6 +2081,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
result = 0;
cleanup:
+ esxVI_String_Free(&propertyNameList);
esxVI_ObjectContent_Free(&virtualMachine);
esxVI_VirtualMachineConfigSpec_Free(&spec);
esxVI_ManagedObjectReference_Free(&task);
--
1.7.0.4
13 years, 11 months
[libvirt] [PATCH 00/11] Integration of lock managers in QEMU driver (v2)
by Daniel P. Berrange
This is a second iteration of the patches from
https://www.redhat.com/archives/libvir-list/2010-November/msg00975.html
Since the last posting quite alot of dev & testing has been done.
The main changes are:
- There is now a <lease> element in the XML to allow locking
against resources not otherwise in the XML
- The 'sanlock' plugin implementation is now in-tree
- The 'lock_driver.h' header is now longer publically installed.
All lock manager impls must be in-tree. This prevents closed
source plugins, and more importantly allows full integration
of error reporting
- Improved virCommand handshake to allow error message to be
passed back to libvirtd
This version is now actually tested with sanlock and works for
initial VM startup at least, successfully preventing QEMU being
started more than once for a given config.
Still todo:
- Merge this series with the huge RPC series
- Wire up a fcntl based plugin
- Integration with migration workflow
13 years, 11 months
[libvirt] [PATCH] virsh: added --all flag to freecell command
by Michal Privoznik
This will iterate over all NUMA nodes, showing
free memory for each and sum at the end.
Existing default behavior is not changed.
---
tools/virsh.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index cd54174..1ddc7cf 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2273,36 +2273,85 @@ static const vshCmdInfo info_freecell[] = {
static const vshCmdOptDef opts_freecell[] = {
{"cellno", VSH_OT_INT, 0, N_("NUMA cell number")},
+ {"all", VSH_OT_BOOL, 0, N_("show free memory for all NUMA cells")},
{NULL, 0, 0, NULL}
};
static int
cmdFreecell(vshControl *ctl, const vshCmd *cmd)
{
+ int func_ret = FALSE;
int ret;
int cell, cell_given;
unsigned long long memory;
+ unsigned long long *nodes = NULL;
+ int all_given;
+ virNodeInfo info;
+
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
cell = vshCommandOptInt(cmd, "cellno", &cell_given);
- if (!cell_given) {
- memory = virNodeGetFreeMemory(ctl->conn);
- if (memory == 0)
- return FALSE;
+ all_given = vshCommandOptBool(cmd, "all");
+
+ if (all_given && cell_given) {
+ vshError(ctl, "%s", _("--cellno and --all are mutual exclusive. Please choose only one."));
+ goto cleanup;
+ }
+
+ if (all_given) {
+ if (virNodeGetInfo(ctl->conn, &info) < 0) {
+ vshError(ctl, "%s", _("failed to get NUMA nodes count"));
+ goto cleanup;
+ }
+
+ if (!info.nodes) {
+ vshError(ctl, "%s", _("no NUMA nodes presented"));
+ goto cleanup;
+ }
+
+ if (VIR_ALLOC_N(nodes, info.nodes) < 0) {
+ vshError(ctl, "%s", _("could not allocate memory"));
+ goto cleanup;
+ }
+
+ ret = virNodeGetCellsFreeMemory(ctl->conn, nodes, 0, info.nodes);
+ if (ret != info.nodes) {
+ vshError(ctl, "%s", _("could not get information about all NUMA nodes"));
+ goto cleanup;
+ }
+
+ memory = 0;
+ for (cell = 0; cell < info.nodes; cell++) {
+ vshPrint(ctl, "%d: %llu kB\n", cell, (nodes[cell]/1024));
+ memory += nodes[cell];
+ }
+
+ vshPrintExtra(ctl, "--------------------\n");
+ vshPrintExtra(ctl, "%s %llu kB\n",_("Total"), memory/1024);
} else {
- ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
- if (ret != 1)
- return FALSE;
+ if (!cell_given) {
+ memory = virNodeGetFreeMemory(ctl->conn);
+ if (memory == 0)
+ goto cleanup;
+ } else {
+ ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
+ if (ret != 1)
+ goto cleanup;
+ }
+
+ if (cell == -1)
+ vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
+ else
+ vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
}
- if (cell == -1)
- vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
- else
- vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
+ func_ret = TRUE;
- return TRUE;
+cleanup:
+ VIR_FREE(nodes);
+ return func_ret;
}
/*
--
1.7.3.5
13 years, 11 months
[libvirt] [PATCH 2/3] cgroup: Implement blkio.weight tuning API.
by Gui Jianfeng
Implement blkio.weight tuning API.
Signed-off-by: Gui Jianfeng <guijianfeng(a)cn.fujitsu.com>
---
src/libvirt_private.syms | 2 ++
src/util/cgroup.c | 36 ++++++++++++++++++++++++++++++++++++
src/util/cgroup.h | 3 +++
3 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 2ce4bed..97b9851 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -77,6 +77,8 @@ virCgroupMounted;
virCgroupRemove;
virCgroupSetCpuShares;
virCgroupSetFreezerState;
+virCgroupSetWeight;
+virCgroupGetWeight;
virCgroupSetMemory;
virCgroupSetMemoryHardLimit;
virCgroupSetMemorySoftLimit;
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 309f4e9..a3d3f29 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -851,6 +851,42 @@ int virCgroupForDomain(virCgroupPtr driver ATTRIBUTE_UNUSED,
#endif
/**
+ * virCgroupSetWeight:
+ *
+ * @group: The cgroup to change io weight for
+ * @weight: The Weight for this cgroup
+ *
+ * Returns: 0 on success
+ */
+int virCgroupSetWeight(virCgroupPtr group, unsigned long weight)
+{
+ return virCgroupSetValueU64(group,
+ VIR_CGROUP_CONTROLLER_BLKIO,
+ "blkio.weight",
+ weight);
+}
+
+/**
+ * virCgroupGetWeight:
+ *
+ * @group: The cgroup to get weight for
+ * @Weight: Pointer to returned weight
+ *
+ * Returns: 0 on success
+ */
+int virCgroupGetWeight(virCgroupPtr group, unsigned long *weight)
+{
+ long long unsigned int __weight;
+ int ret;
+ ret = virCgroupGetValueU64(group,
+ VIR_CGROUP_CONTROLLER_BLKIO,
+ "blkio.weight", &__weight);
+ if (ret == 0)
+ *weight = (unsigned long) __weight;
+ return ret;
+}
+
+/**
* virCgroupSetMemory:
*
* @group: The cgroup to change memory for
diff --git a/src/util/cgroup.h b/src/util/cgroup.h
index 67b1299..99c1cfe 100644
--- a/src/util/cgroup.h
+++ b/src/util/cgroup.h
@@ -41,6 +41,9 @@ int virCgroupForDomain(virCgroupPtr driver,
int virCgroupAddTask(virCgroupPtr group, pid_t pid);
+int virCgroupSetWeight(virCgroupPtr group, unsigned long weight);
+int virCgroupGetWeight(virCgroupPtr group, unsigned long *weight);
+
int virCgroupSetMemory(virCgroupPtr group, unsigned long long kb);
int virCgroupGetMemoryUsage(virCgroupPtr group, unsigned long *kb);
--
1.7.1
13 years, 11 months
[libvirt] [PATCH 0/3] qemu aio mode per disk
by Eric Blake
I've taken the patch that Matthias Dahl originally posted _months_
ago:
https://www.redhat.com/archives/libvir-list/2010-April/msg00888.html
and updated it by splitting into three patches, adding more testsuite
coverage, improving documentation, and altering the names slightly.
The end result is that you use:
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' io='native'/>
...
</disk>
</devices>
as the way to request qemu -drive ...,aio=native
Let's get this reviewed and in, rather than dragging our feet
for a few more months :)
Eric Blake (1):
qemu aio: enable support
Matthias Dahl (2):
qemu aio: add XML parsing
qemu aio: parse aio support from qemu -help
AUTHORS | 1 +
docs/formatdomain.html.in | 40 +++++++++++++++++----
docs/schemas/domain.rng | 11 ++++++
src/conf/domain_conf.c | 25 +++++++++++++
src/conf/domain_conf.h | 10 +++++
src/libvirt_private.syms | 3 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_command.c | 17 +++++++++
tests/qemuhelptest.c | 12 ++++--
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 33 +++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 1 +
14 files changed, 149 insertions(+), 12 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
--
1.7.3.4
13 years, 11 months
[libvirt] l10n/i18n ~ po files and their cycle
by Zdenek Styblik
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I somehow dared to open 'po/cs.po' file and it made me wonder what's the
life cycle of these files. Especially this file seems to be somehow
"shifted", because translations don't even match to their English
counterpart.
I doubt anybody is using Czech translation for libvirt and to be honest,
I would be enormously surprised if someone, anyone, did.
To save myself time, let's ask somewhat obvious. How to use translation?
Is LC_LANG going to do the trick?
Thanks for answers ~ yeh, I'm actually interested into the very first
question of mine - the life cycle of .po files :o)
Thanks,
Z.
- --
Zdenek Styblik
Net/Linux admin
OS TurnovFree.net
email: stybla(a)turnovfree.net
jabber: stybla(a)jabber.turnovfree.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0/GlkACgkQ8MreUbSH7ilzzgCff1ixlPxXusi6YvlaLQK4MXgf
kQEAoK11Axh+iOldlXZucmd7ti9W5PgJ
=dh3C
-----END PGP SIGNATURE-----
13 years, 11 months
[libvirt] [PATCH] docs: replace CRLF with LF
by Juerg Haefliger
---
docs/page.xsl | 350 ++++++++++++++++++++++++++++----------------------------
1 files changed, 175 insertions(+), 175 deletions(-)
diff --git a/docs/page.xsl b/docs/page.xsl
index 4f1c92f..fc782a2 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -1,175 +1,175 @@
-<?xml version="1.0"?>
-<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:exsl="http://exslt.org/common"
- exclude-result-prefixes="xsl exsl"
- version="1.0">
-
- <!-- The sitemap.html.in page contains the master navigation structure -->
- <xsl:variable name="sitemap" select="document('sitemap.html.in')/html/body/div[@id='sitemap']"/>
-
- <xsl:template match="code[@class='docref']" mode="content">
- <xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
- <a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
- </xsl:template>
-
- <xsl:template match="node() | @*" mode="content">
- <xsl:copy>
- <xsl:apply-templates select="node() | @*" mode="content"/>
- </xsl:copy>
- </xsl:template>
-
-
- <xsl:template match="ul[@id='toc']" mode="content">
- <xsl:call-template name="toc"/>
- </xsl:template>
-
- <!-- This processes the sitemap to form a context sensitive
- navigation menu for the current page -->
- <xsl:template match="ul" mode="menu">
- <xsl:param name="pagename"/>
- <xsl:param name="level"/>
- <ul class="{concat('l', $level)}">
- <xsl:for-each select="li">
- <!-- The extra div tag here works around an IE6 whitespace collapsing problem -->
- <li><div>
- <!-- A menu is active if there is an 'a' tag with
- a href matching this pagename at this level
- or a child menu -->
- <xsl:variable name="class">
- <xsl:choose>
- <xsl:when test="count(.//a[@href = $pagename]) > 0">
- <xsl:text>active</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>inactive</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <!-- A menu should use a 'span' instead of 'a' if
- the immediate 'a' tag has href matching the
- current pagename -->
- <xsl:choose>
- <xsl:when test="$pagename = a/@href">
- <span class="{$class}"><xsl:value-of select="a"/></span>
- </xsl:when>
- <xsl:when test="a/@href = 'http://wiki.libvirt.org'">
- <a title="{./span}" class="{$class}" href="{a/@href}"><xsl:value-of select="a"/></a>
- </xsl:when>
- <xsl:otherwise>
- <a title="{./span}" class="{$class}" href="{concat($href_base, a/@href)}"><xsl:value-of select="a"/></a>
- </xsl:otherwise>
- </xsl:choose>
-
- <!-- A sub-menu should only be expanded it contains
- an 'a' tag with href matching this pagename -->
- <xsl:if test="count(.//a[@href = $pagename]) > 0">
- <xsl:apply-templates select="ul" mode="menu">
- <xsl:with-param name="pagename" select="$pagename"/>
- <xsl:with-param name="level" select="$level + 1"/>
- </xsl:apply-templates>
- </xsl:if>
- </div></li>
- </xsl:for-each>
- </ul>
- </xsl:template>
-
- <xsl:template name="toc">
- <ul>
- <xsl:for-each select="/html/body/h2[count(a) = 1]">
- <xsl:variable name="thish2" select="."/>
- <li>
- <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
- <xsl:if test="count(./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]) > 0">
- <ul>
- <xsl:for-each select="./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]">
- <xsl:variable name="thish3" select="."/>
- <li>
- <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
- <xsl:if test="count(./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]) > 0">
- <ul>
- <xsl:for-each select="./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]">
- <xsl:variable name="thish4" select="."/>
- <li>
- <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
- <xsl:if test="count(./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]) > 0">
- <ul>
- <xsl:for-each select="./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]">
- <xsl:variable name="thish5" select="."/>
- <li>
- <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
- <xsl:if test="count(./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]) > 0">
- <ul>
- <xsl:for-each select="./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]">
- <li>
- <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:template>
-
- <!-- This is the master page structure -->
- <xsl:template match="/" mode="page">
- <xsl:param name="pagename"/>
- <html>
- <xsl:comment>
- This file is autogenerated from <xsl:value-of select="$pagename"/>.in
- Do not edit this file. Changes will be lost.
- </xsl:comment>
- <head>
- <link rel="stylesheet" type="text/css" href="{$href_base}main.css"/>
- <link rel="SHORTCUT ICON" href="{$href_base}32favicon.png"/>
- <title>libvirt: <xsl:value-of select="html/body/h1"/></title>
- <meta name="description" content="libvirt, virtualization, virtualization API"/>
- </head>
- <body>
- <div id="header">
- <div id="headerLogo"/>
- <div id="headerSearch">
- <form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
- <div>
- <input id="query" name="query" type="text" size="12" value=""/>
- <input id="submit" name="submit" type="submit" value="Search"/>
- </div>
- </form>
- </div>
- </div>
- <div id="body">
- <div id="menu">
- <xsl:apply-templates select="exsl:node-set($sitemap)/ul" mode="menu">
- <xsl:with-param name="pagename" select="$pagename"/>
- <xsl:with-param name="level" select="0"/>
- </xsl:apply-templates>
- </div>
- <div id="content">
- <xsl:apply-templates select="/html/body/*" mode="content"/>
- </div>
- </div>
- <div id="footer">
- <p id="sponsor">
- Sponsored by:<br/>
- <a href="http://et.redhat.com/"><img src="{$href_base}et.png" alt="Project sponsored by Red Hat Emerging Technology"/></a>
- </p>
- </div>
- </body>
- </html>
- </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0"?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="xsl exsl"
+ version="1.0">
+
+ <!-- The sitemap.html.in page contains the master navigation structure -->
+ <xsl:variable name="sitemap" select="document('sitemap.html.in')/html/body/div[@id='sitemap']"/>
+
+ <xsl:template match="code[@class='docref']" mode="content">
+ <xsl:variable name="name"><xsl:value-of select="."/></xsl:variable>
+ <a href="html/libvirt-libvirt.html#{$name}"><code><xsl:value-of select="$name"/></code></a>
+ </xsl:template>
+
+ <xsl:template match="node() | @*" mode="content">
+ <xsl:copy>
+ <xsl:apply-templates select="node() | @*" mode="content"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="ul[@id='toc']" mode="content">
+ <xsl:call-template name="toc"/>
+ </xsl:template>
+
+ <!-- This processes the sitemap to form a context sensitive
+ navigation menu for the current page -->
+ <xsl:template match="ul" mode="menu">
+ <xsl:param name="pagename"/>
+ <xsl:param name="level"/>
+ <ul class="{concat('l', $level)}">
+ <xsl:for-each select="li">
+ <!-- The extra div tag here works around an IE6 whitespace collapsing problem -->
+ <li><div>
+ <!-- A menu is active if there is an 'a' tag with
+ a href matching this pagename at this level
+ or a child menu -->
+ <xsl:variable name="class">
+ <xsl:choose>
+ <xsl:when test="count(.//a[@href = $pagename]) > 0">
+ <xsl:text>active</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>inactive</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- A menu should use a 'span' instead of 'a' if
+ the immediate 'a' tag has href matching the
+ current pagename -->
+ <xsl:choose>
+ <xsl:when test="$pagename = a/@href">
+ <span class="{$class}"><xsl:value-of select="a"/></span>
+ </xsl:when>
+ <xsl:when test="a/@href = 'http://wiki.libvirt.org'">
+ <a title="{./span}" class="{$class}" href="{a/@href}"><xsl:value-of select="a"/></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a title="{./span}" class="{$class}" href="{concat($href_base, a/@href)}"><xsl:value-of select="a"/></a>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- A sub-menu should only be expanded it contains
+ an 'a' tag with href matching this pagename -->
+ <xsl:if test="count(.//a[@href = $pagename]) > 0">
+ <xsl:apply-templates select="ul" mode="menu">
+ <xsl:with-param name="pagename" select="$pagename"/>
+ <xsl:with-param name="level" select="$level + 1"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </div></li>
+ </xsl:for-each>
+ </ul>
+ </xsl:template>
+
+ <xsl:template name="toc">
+ <ul>
+ <xsl:for-each select="/html/body/h2[count(a) = 1]">
+ <xsl:variable name="thish2" select="."/>
+ <li>
+ <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
+ <xsl:if test="count(./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]) > 0">
+ <ul>
+ <xsl:for-each select="./following-sibling::h3[preceding-sibling::h2[1] = $thish2 and count(a) = 1]">
+ <xsl:variable name="thish3" select="."/>
+ <li>
+ <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
+ <xsl:if test="count(./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]) > 0">
+ <ul>
+ <xsl:for-each select="./following-sibling::h4[preceding-sibling::h3[1] = $thish3 and count(a) = 1]">
+ <xsl:variable name="thish4" select="."/>
+ <li>
+ <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
+ <xsl:if test="count(./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]) > 0">
+ <ul>
+ <xsl:for-each select="./following-sibling::h5[preceding-sibling::h4[1] = $thish4 and count(a) = 1]">
+ <xsl:variable name="thish5" select="."/>
+ <li>
+ <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
+ <xsl:if test="count(./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]) > 0">
+ <ul>
+ <xsl:for-each select="./following-sibling::h6[preceding-sibling::h5[1] = $thish5 and count(a) = 1]">
+ <li>
+ <a href="#{a/@name}"><xsl:value-of select="a/text()"/></a>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:template>
+
+ <!-- This is the master page structure -->
+ <xsl:template match="/" mode="page">
+ <xsl:param name="pagename"/>
+ <html>
+ <xsl:comment>
+ This file is autogenerated from <xsl:value-of select="$pagename"/>.in
+ Do not edit this file. Changes will be lost.
+ </xsl:comment>
+ <head>
+ <link rel="stylesheet" type="text/css" href="{$href_base}main.css"/>
+ <link rel="SHORTCUT ICON" href="{$href_base}32favicon.png"/>
+ <title>libvirt: <xsl:value-of select="html/body/h1"/></title>
+ <meta name="description" content="libvirt, virtualization, virtualization API"/>
+ </head>
+ <body>
+ <div id="header">
+ <div id="headerLogo"/>
+ <div id="headerSearch">
+ <form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
+ <div>
+ <input id="query" name="query" type="text" size="12" value=""/>
+ <input id="submit" name="submit" type="submit" value="Search"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div id="body">
+ <div id="menu">
+ <xsl:apply-templates select="exsl:node-set($sitemap)/ul" mode="menu">
+ <xsl:with-param name="pagename" select="$pagename"/>
+ <xsl:with-param name="level" select="0"/>
+ </xsl:apply-templates>
+ </div>
+ <div id="content">
+ <xsl:apply-templates select="/html/body/*" mode="content"/>
+ </div>
+ </div>
+ <div id="footer">
+ <p id="sponsor">
+ Sponsored by:<br/>
+ <a href="http://et.redhat.com/"><img src="{$href_base}et.png" alt="Project sponsored by Red Hat Emerging Technology"/></a>
+ </p>
+ </div>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
--
1.7.1
13 years, 11 months