From e193b5ddea95471b194b8d40f82e7b6b11dfae1b Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 22 May 2008 16:27:20 +0000 Subject: [PATCH] Apply CPU pinning at startup for QEMU guests --- ChangeLog | 10 +++ src/qemu_conf.c | 48 +++++++++-- src/qemu_conf.h | 3 + src/qemu_driver.c | 79 +++++++++++++------ src/xml.c | 5 +- src/xml.h | 4 +- .../qemuxml2argv-boot-cdrom.args | 2 +- .../qemuxml2argv-boot-floppy.args | 2 +- .../qemuxml2argv-boot-network.args | 2 +- .../qemuxml2argv-bootloader.args | 2 +- .../qemuxml2argv-clock-localtime.args | 2 +- .../qemuxml2argv-clock-utc.args | 2 +- .../qemuxml2argv-console-compat.args | 2 +- .../qemuxml2argv-disk-cdrom.args | 2 +- .../qemuxml2argv-disk-floppy.args | 2 +- .../qemuxml2argv-disk-many.args | 2 +- .../qemuxml2argv-disk-virtio.args | 2 +- .../qemuxml2argv-disk-xenvbd.args | 2 +- .../qemuxml2argv-graphics-sdl.args | 2 +- .../qemuxml2argv-graphics-vnc.args | 2 +- .../qemuxml2argv-input-usbmouse.args | 2 +- .../qemuxml2argv-input-usbtablet.args | 2 +- .../qemuxml2argv-input-xen.args | 2 +- .../qemuxml2argv-minimal.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-minimal.xml | 2 +- .../qemuxml2argv-misc-acpi.args | 2 +- .../qemuxml2argv-misc-no-reboot.args | 2 +- .../qemuxml2argv-net-user.args | 2 +- .../qemuxml2argv-net-virtio.args | 2 +- .../qemuxml2argv-parallel-tcp.args | 2 +- .../qemuxml2argv-serial-dev.args | 2 +- .../qemuxml2argv-serial-file.args | 2 +- .../qemuxml2argv-serial-many.args | 2 +- .../qemuxml2argv-serial-pty.args | 2 +- .../qemuxml2argv-serial-tcp-telnet.args | 2 +- .../qemuxml2argv-serial-tcp.args | 2 +- .../qemuxml2argv-serial-udp.args | 2 +- .../qemuxml2argv-serial-unix.args | 2 +- .../qemuxml2argv-serial-vc.args | 2 +- .../qemuxml2argvdata/qemuxml2argv-sound.args | 2 +- 40 files changed, 153 insertions(+), 64 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24047b28c3..a895a00cc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu May 22 12:22:29 EST 2008 Daniel P. Berrange + + Apply CPU pinning at startup if requested for QEMU + * src/qemu_conf.h: Store global CPU pinning data + * src/qemu_conf.c: Parse and format CPU set mask for vCPUs + * src/qemu_driver.c: Apply CPU pinning at startup + * tests/qemuxml2argvdata/*.args: Add in -S arg which is now + always used + * src/xml.c, xml.h: Allow use of CPU set functions from QEMU + Thu May 22 12:20:29 EST 2008 Daniel P. Berrange Add support for VCPU pinning in QEMU driver diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 9310cfd0e6..15bf253bdb 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -56,6 +56,7 @@ #include "memory.h" #include "verify.h" #include "c-ctype.h" +#include "xml.h" #define qemudLog(level, msg...) fprintf(stderr, msg) @@ -1744,6 +1745,25 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn, } xmlXPathFreeObject(obj); + /* Extract domain vcpu info */ + obj = xmlXPathEval(BAD_CAST "string(/domain/vcpu[1]/@cpuset)", ctxt); + if ((obj == NULL) || (obj->type != XPATH_STRING) || + (obj->stringval == NULL) || (obj->stringval[0] == 0)) { + /* Allow use on all CPUS */ + memset(def->cpumask, 1, QEMUD_CPUMASK_LEN); + } else { + char *set = (char *)obj->stringval; + memset(def->cpumask, 0, QEMUD_CPUMASK_LEN); + if (virParseCpuSet(conn, (const char **)&set, + 0, def->cpumask, + QEMUD_CPUMASK_LEN) < 0) { + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + "%s", _("malformed vcpu mask information")); + goto error; + } + } + xmlXPathFreeObject(obj); + /* See if ACPI feature is requested */ obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt); if ((obj != NULL) && (obj->type == XPATH_NODESET) && @@ -2432,6 +2452,7 @@ int qemudBuildCommandLine(virConnectPtr conn, disableKQEMU = 1; len = 1 + /* qemu */ + 1 + /* Stopped */ 2 + /* machine type */ disableKQEMU + /* Disable kqemu */ (vm->qemuCmdFlags & QEMUD_CMD_FLAG_NAME ? 2 : 0) + /* -name XXX */ @@ -2456,7 +2477,7 @@ int qemudBuildCommandLine(virConnectPtr conn, (vm->def->os.bootloader[0] ? 2 : 0) + /* bootloader */ (vm->def->graphicsType == QEMUD_GRAPHICS_VNC ? 2 : (vm->def->graphicsType == QEMUD_GRAPHICS_SDL ? 0 : 1)) + /* graphics */ - (vm->migrateFrom[0] ? 3 : 0); /* migrateFrom */ + (vm->migrateFrom[0] ? 2 : 0); /* migrateFrom */ snprintf(memory, sizeof(memory), "%lu", vm->def->memory/1024); snprintf(vcpus, sizeof(vcpus), "%d", vm->def->vcpus); @@ -2465,6 +2486,8 @@ int qemudBuildCommandLine(virConnectPtr conn, goto no_memory; if (!((*argv)[++n] = strdup(vm->def->os.binary))) goto no_memory; + if (!((*argv)[++n] = strdup("-S"))) + goto no_memory; if (!((*argv)[++n] = strdup("-M"))) goto no_memory; if (!((*argv)[++n] = strdup(vm->def->os.machine))) @@ -2890,8 +2913,6 @@ int qemudBuildCommandLine(virConnectPtr conn, } if (vm->migrateFrom[0]) { - if (!((*argv)[++n] = strdup("-S"))) - goto no_memory; if (!((*argv)[++n] = strdup("-incoming"))) goto no_memory; if (!((*argv)[++n] = strdup(vm->migrateFrom))) @@ -3877,7 +3898,7 @@ char *qemudGenerateXML(virConnectPtr conn, const struct qemud_vm_sound_def *sound; const struct qemud_vm_chr_def *chr; const char *type = NULL; - int n; + int n, allones = 1; if (!(type = qemudVirtTypeToString(def->virtType))) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, @@ -3898,7 +3919,24 @@ char *qemudGenerateXML(virConnectPtr conn, virBufferVSprintf(&buf, " %lu\n", def->maxmem); virBufferVSprintf(&buf, " %lu\n", def->memory); - virBufferVSprintf(&buf, " %d\n", def->vcpus); + + for (n = 0 ; n < QEMUD_CPUMASK_LEN ; n++) + if (def->cpumask[n] != 1) + allones = 0; + + if (allones) { + virBufferVSprintf(&buf, " %d\n", def->vcpus); + } else { + char *cpumask = NULL; + if ((cpumask = virSaveCpuSet(conn, def->cpumask, QEMUD_CPUMASK_LEN)) == NULL) { + qemudReportError(conn, NULL, NULL, VIR_ERR_NO_MEMORY, + "%s", _("allocating cpu mask")); + goto cleanup; + } + virBufferVSprintf(&buf, " %d\n", cpumask, def->vcpus); + free(cpumask); + } + if (def->os.bootloader[0]) virBufferVSprintf(&buf, " %s\n", def->os.bootloader); virBufferAddLit(&buf, " \n"); diff --git a/src/qemu_conf.h b/src/qemu_conf.h index 7f9b7e13fd..433650a54c 100644 --- a/src/qemu_conf.h +++ b/src/qemu_conf.h @@ -33,6 +33,7 @@ #include "iptables.h" #include "capabilities.h" #include +#include #define qemudDebug(fmt, ...) do {} while(0) @@ -104,6 +105,7 @@ enum qemud_vm_net_forward_type { #define QEMUD_MAX_NAME_LEN 50 #define QEMUD_MAX_XML_LEN 4096 #define QEMUD_MAX_ERROR_LEN 1024 +#define QEMUD_CPUMASK_LEN CPU_SETSIZE /* Stores the virtual network interface configuration */ struct qemud_vm_net_def { @@ -282,6 +284,7 @@ struct qemud_vm_def { unsigned long memory; unsigned long maxmem; int vcpus; + char cpumask[QEMUD_CPUMASK_LEN]; int noReboot; diff --git a/src/qemu_driver.c b/src/qemu_driver.c index ea566b546e..314a03a8c1 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -717,6 +717,52 @@ error: return 0; } +static int +qemudInitCpus(virConnectPtr conn, + struct qemud_driver *driver, + struct qemud_vm *vm) { + char *info = NULL; +#if HAVE_SCHED_GETAFFINITY + cpu_set_t mask; + int i, maxcpu = QEMUD_CPUMASK_LEN; + virNodeInfo nodeinfo; + + if (virNodeInfoPopulate(conn, &nodeinfo) < 0) + return -1; + + /* setaffinity fails if you set bits for CPUs which + * aren't present, so we have to limit ourselves */ + if (maxcpu > nodeinfo.cpus) + maxcpu = nodeinfo.cpus; + + CPU_ZERO(&mask); + for (i = 0 ; i < maxcpu ; i++) + if (vm->def->cpumask[i]) + CPU_SET(i, &mask); + + for (i = 0 ; i < vm->nvcpupids ; i++) { + if (sched_setaffinity(vm->vcpupids[i], + sizeof(mask), &mask) < 0) { + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + _("failed to set CPU affinity %s"), + strerror(errno)); + return -1; + } + } +#endif /* HAVE_SCHED_GETAFFINITY */ + + /* Allow the CPUS to start executing */ + if (qemudMonitorCommand(driver, vm, "cont", &info) < 0) { + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + "%s", _("resume operation failed")); + return -1; + } + free(info); + + return 0; +} + + static int qemudNextFreeVNCPort(struct qemud_driver *driver ATTRIBUTE_UNUSED) { int i; @@ -874,28 +920,17 @@ static int qemudStartVMDaemon(virConnectPtr conn, } if (ret == 0) { - if (virEventAddHandle(vm->stdout, - POLLIN | POLLERR | POLLHUP, - qemudDispatchVMEvent, - driver) < 0) { - qemudShutdownVMDaemon(conn, driver, vm); - return -1; - } - - if (virEventAddHandle(vm->stderr, - POLLIN | POLLERR | POLLHUP, - qemudDispatchVMEvent, - driver) < 0) { - qemudShutdownVMDaemon(conn, driver, vm); - return -1; - } - - if (qemudWaitForMonitor(conn, driver, vm) < 0) { - qemudShutdownVMDaemon(conn, driver, vm); - return -1; - } - - if (qemudDetectVcpuPIDs(conn, driver, vm) < 0) { + if ((virEventAddHandle(vm->stdout, + POLLIN | POLLERR | POLLHUP, + qemudDispatchVMEvent, + driver) < 0) || + (virEventAddHandle(vm->stderr, + POLLIN | POLLERR | POLLHUP, + qemudDispatchVMEvent, + driver) < 0) || + (qemudWaitForMonitor(conn, driver, vm) < 0) || + (qemudDetectVcpuPIDs(conn, driver, vm) < 0) || + (qemudInitCpus(conn, driver, vm) < 0)) { qemudShutdownVMDaemon(conn, driver, vm); return -1; } diff --git a/src/xml.c b/src/xml.c index ec39a0a6dc..43f3cc05f4 100644 --- a/src/xml.c +++ b/src/xml.c @@ -60,7 +60,7 @@ virXMLError(virConnectPtr conn, virErrorNumber error, const char *info, * Parser and converter for the CPUset strings used in libvirt * * * ************************************************************************/ -#if WITH_XEN +#if WITH_XEN || WITH_QEMU /** * parseCpuNumber: * @str: pointer to the char pointer used @@ -249,8 +249,9 @@ virParseCpuSet(virConnectPtr conn, const char **str, char sep, _("topology cpuset syntax error"), 0); return (-1); } +#endif - +#if WITH_XEN /** * virConvertCpuSet: * @conn: connection diff --git a/src/xml.h b/src/xml.h index e5f2103838..679325755f 100644 --- a/src/xml.h +++ b/src/xml.h @@ -32,7 +32,7 @@ int virXPathNodeSet (const char *xpath, xmlXPathContextPtr ctxt, xmlNodePtr **list); -#if WITH_XEN +#if WITH_XEN || WITH_QEMU int virParseCpuSet (virConnectPtr conn, const char **str, char sep, @@ -41,6 +41,8 @@ int virParseCpuSet (virConnectPtr conn, char * virSaveCpuSet (virConnectPtr conn, char *cpuset, int maxcpu); +#endif +#if WITH_XEN char * virConvertCpuSet(virConnectPtr conn, const char *str, int maxcpu); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args index fe29e97c12..3f45b24023 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -cdrom /dev/cdrom -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -cdrom /dev/cdrom -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args index 9141ef299d..9cf5c807e4 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot a -hda /dev/HostVG/QEMUGuest1 -fda /tmp/firmware.img -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot a -hda /dev/HostVG/QEMUGuest1 -fda /tmp/firmware.img -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args index fdef4608d4..22ee6930b0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot n -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot n -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args index c0a2cead33..f7284fc0c9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args @@ -1 +1 @@ -/usr/bin/qemu-kvm -M xenner -m 214 -smp 1 -nographic -monitor pty -no-acpi -bootloader /usr/bin/pygrub -cdrom /dev/cdrom -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu-kvm -S -M xenner -m 214 -smp 1 -nographic -monitor pty -no-acpi -bootloader /usr/bin/pygrub -cdrom /dev/cdrom -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args index 9e2f9706ed..148db62eae 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -localtime -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -localtime -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args index 69b1e7a421..c8d10bb3b0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args index 541b7194ef..4610ae46c0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args index 8f0cdf8dad..a971b6c2ff 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -cdrom /root/boot.iso -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -cdrom /root/boot.iso -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args index 10b72d7d99..dc3187292d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -fda /dev/fd0 -fdb /tmp/firmware.img -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -fda /dev/fd0 -fdb /tmp/firmware.img -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args index 899b35b226..04bc6b719b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -hdb /dev/HostVG/QEMUGuest2 -hdc /tmp/data.img -hdd /tmp/logs.img -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -hdb /dev/HostVG/QEMUGuest2 -hdc /tmp/data.img -hdd /tmp/logs.img -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args index 1edb6f84f5..116274dac0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=virtio,index=0 -drive file=/tmp/logs.img,if=virtio,index=6 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=virtio,index=0 -drive file=/tmp/logs.img,if=virtio,index=6 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args index 5f5d9ecef0..e04feab971 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=xen,index=0 -drive file=/tmp/logs.img,if=xen,index=6 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=xen,index=0 -drive file=/tmp/logs.img,if=xen,index=6 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args index b2faaabffd..e2165a1c51 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args index f8a98cd1cd..4f9ad7ef33 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3 \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3 \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args index 8552d308cb..6a80ad5e43 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice mouse \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice mouse \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args index 790bc1b324..dd87a7017d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice tablet \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -usbdevice tablet \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args index d23818d75f..3e6c0e620c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args @@ -1 +1 @@ -/usr/bin/xenner -M xenner -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc :-5901 \ No newline at end of file +/usr/bin/xenner -S -M xenner -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc :-5901 \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.args b/tests/qemuxml2argvdata/qemuxml2argv-minimal.args index 23e6bb7895..904eb1add8 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -name QEMUGuest1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -name QEMUGuest1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml index 26c9b25943..566a4ad982 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml @@ -3,7 +3,7 @@ c7a5fdbd-edaf-9455-926a-d65c16db1809 219200 219200 - 1 + 1 hvm diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args index ba87bfbafb..9697a967af 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args index 7461c957c7..57b1ca3d2e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-reboot -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-reboot -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.args b/tests/qemuxml2argvdata/qemuxml2argv-net-user.args index fce8a215d5..e3e518c025 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0 -net user,vlan=0 -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0 -net user,vlan=0 -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args index f1fa174f8a..a570ff107a 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0,model=virtio -net user,vlan=0 -serial none -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,macaddr=00:11:22:33:44:55,vlan=0,model=virtio -net user,vlan=0 -serial none -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args index 31c482ee0a..5c432ea563 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel tcp:127.0.0.1:9999,listen -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel tcp:127.0.0.1:9999,listen -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args index 9c6262b057..4844b74bf6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial /dev/ttyS2 -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial /dev/ttyS2 -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args index a373db29c1..2636239d30 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial file:/tmp/serial.log -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial file:/tmp/serial.log -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args index d3e26867fd..143853f6e9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -serial file:/tmp/serial.log -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -serial file:/tmp/serial.log -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args index 541b7194ef..4610ae46c0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial pty -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args index 9613919971..03fd270ff0 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,listen -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial telnet:127.0.0.1:9999,listen -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args index c82ef995ed..c353883b4c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial tcp:127.0.0.1:9999 -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial tcp:127.0.0.1:9999 -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args index e376ffc9e4..742a4f6464 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial udp:127.0.0.1:9998@127.0.0.1:9999 -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial udp:127.0.0.1:9998@127.0.0.1:9999 -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args index 1ce9aee7c1..286d174248 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial unix:/tmp/serial.sock -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial unix:/tmp/serial.sock -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args index 93f331f015..9cc3f57c2f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial vc -parallel none -usb \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial vc -parallel none -usb \ No newline at end of file diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.args b/tests/qemuxml2argvdata/qemuxml2argv-sound.args index b8d7533c52..0b12a0ae88 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-sound.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.args @@ -1 +1 @@ -/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16 \ No newline at end of file +/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16 \ No newline at end of file