[libvirt] About the Windows Support ToDo Item
by Adhyas Avasthi
I could not really understand this ToDo Item clearly. Does this mean that
libvert can be installed on Windows and then support Windows Hypervisor ?
Please pardon my lack of understanding, but from what I understand libvert
is supposed to be installed on the hypervisor itself (either in DOM0 or in
the kernel that is managing the hardware underneath, etc.) and then
communicated to from the virtual machine manager utility running on another
machine and trying to control VM behavior by communicating to the
hypervisor. And libvert does not support Windows hypervisor yet. So does
this ToDo mean that there is an expected support for Windows Hypervisor?
What about VMware hypervisor, then ? Can I install (after some development)
libvert on vmkernel (VMware's hardware managing OS) and then control it from
a virtual machine manager? I am just trying to understand the ToDo item and
possibilities of using libvert.
--
Adhyas
********************************************************************
Two types have compatible type if their types are the same.
— ANSI C Standard, 3.1.2.6.
********************************************************************
16 years
[libvirt] PATCH: Support SDL configuration for QEMU driver
by Daniel P. Berrange
QEMU has two modes of providing a graphical display, VNC and SDL. Now most
of our tools just use VNC, but occasionally people want to use SDL for
some crazy reason. We already support this in Xen driver, but the QEMU
impl has been rather lacking. At the moment if you ask for a SDL display
it'll only happen to work if you had the $DISPLAY environment variable
set when you started libvirtd - you probably don't.
The generic XML parser allows for two attributes on the <graohics>
element for setting the display and xauth filename, so this patch updates
the QEMU driver to use this data if available. This means we have to
start setting environment variables when invoking QEMU, so this patch
is a little larger than would otherwise be expected.
Now previously since we just use 'execv' the QEMU process would just
inherit all libvirtd's environment variables. When we now use execve()
no variables are inherited - we have to explicitly set all the ones
we need. I'm not sure what we should consider the mimimum required?
I'm merely setting 'LC_ALL=C' to ensure it runs in C locale. Do we
need to set $PATH for QEMU - maybe ? Anything else which is good
practice to set ?
src/qemu_conf.c | 60 +++++++++-
src/qemu_conf.h | 3
src/qemu_driver.c | 19 ++-
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 2
tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args | 2
tests/qemuxml2argvdata/qemuxml2argv-boot-network.args | 2
tests/qemuxml2argvdata/qemuxml2argv-bootloader.args | 2
tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args | 2
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-console-compat.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-many.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 2
tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args | 2
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args | 2
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args | 2
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args | 2
tests/qemuxml2argvdata/qemuxml2argv-input-xen.args | 2
tests/qemuxml2argvdata/qemuxml2argv-minimal.args | 2
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args | 2
tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args | 2
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 2
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args | 2
tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-file.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-many.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args | 2
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args | 2
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 2
tests/qemuxml2argvtest.c | 31 ++++-
44 files changed, 145 insertions(+), 48 deletions(-)
Daniel
diff -r 194a93a4a942 src/qemu_conf.c
--- a/src/qemu_conf.c Wed Oct 01 11:52:52 2008 +0100
+++ b/src/qemu_conf.c Thu Oct 02 18:03:43 2008 +0100
@@ -710,6 +710,7 @@
virDomainObjPtr vm,
unsigned int qemuCmdFlags,
const char ***retargv,
+ const char ***retenv,
int **tapfds,
int *ntapfds,
const char *migrateFrom) {
@@ -728,6 +729,8 @@
int disableKQEMU = 0;
int qargc = 0, qarga = 0;
const char **qargv = NULL;
+ int qenvc = 0, qenva = 0;
+ const char **qenv = NULL;
const char *emulator;
uname(&ut);
@@ -775,14 +778,39 @@
do { \
ADD_ARG_LIT("-usbdevice"); \
ADD_ARG_SPACE; \
- if ((asprintf((char **)&(qargv[qargc++]), "disk:%s", thisarg)) == -1) { \
+ if ((asprintf((char **)&(qargv[qargc++]), \
+ "disk:%s", thisarg)) == -1) { \
qargv[qargc-1] = NULL; \
goto no_memory; \
} \
} while (0)
+#define ADD_ENV_SPACE \
+ do { \
+ if (qenvc == qenva) { \
+ qenva += 10; \
+ if (VIR_REALLOC_N(qenv, qenva) < 0) \
+ goto no_memory; \
+ } \
+ } while (0)
+
+#define ADD_ENV(thisarg) \
+ do { \
+ ADD_ENV_SPACE; \
+ qenv[qenvc++] = thisarg; \
+ } while (0)
+
+#define ADD_ENV_LIT(thisarg) \
+ do { \
+ ADD_ENV_SPACE; \
+ if ((qenv[qenvc++] = strdup(thisarg)) == NULL) \
+ goto no_memory; \
+ } while (0)
+
snprintf(memory, sizeof(memory), "%lu", vm->def->memory/1024);
snprintf(vcpus, sizeof(vcpus), "%lu", vm->def->vcpus);
+
+ ADD_ENV_LIT("LC_ALL=C");
emulator = vm->def->emulator;
if (!emulator)
@@ -1163,7 +1191,24 @@
}
} else if (vm->def->graphics &&
vm->def->graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) {
- /* SDL is the default. no args needed */
+ char *xauth = NULL;
+ char *display = NULL;
+
+ if (vm->def->graphics->data.sdl.xauth &&
+ asprintf(&xauth, "XAUTHORITY=%s",
+ vm->def->graphics->data.sdl.xauth) < 0)
+ goto no_memory;
+ if (vm->def->graphics->data.sdl.display &&
+ asprintf(&display, "DISPLAY=%s",
+ vm->def->graphics->data.sdl.display) < 0) {
+ VIR_FREE(xauth);
+ goto no_memory;
+ }
+
+ if (xauth)
+ ADD_ENV(xauth);
+ if (display)
+ ADD_ENV(display);
}
/* Add sound hardware */
@@ -1225,8 +1270,10 @@
}
ADD_ARG(NULL);
+ ADD_ENV(NULL);
*retargv = qargv;
+ *retenv = qenv;
return 0;
no_memory:
@@ -1245,9 +1292,18 @@
VIR_FREE((qargv)[i]);
VIR_FREE(qargv);
}
+ if (qenv) {
+ for (i = 0 ; i < qenvc ; i++)
+ VIR_FREE((qenv)[i]);
+ VIR_FREE(qenv);
+ }
return -1;
#undef ADD_ARG
#undef ADD_ARG_LIT
#undef ADD_ARG_SPACE
+#undef ADD_USBDISK
+#undef ADD_ENV
+#undef ADD_ENV_LIT
+#undef ADD_ENV_SPACE
}
diff -r 194a93a4a942 src/qemu_conf.h
--- a/src/qemu_conf.h Wed Oct 01 11:52:52 2008 +0100
+++ b/src/qemu_conf.h Thu Oct 02 18:03:43 2008 +0100
@@ -93,7 +93,8 @@
struct qemud_driver *driver,
virDomainObjPtr dom,
unsigned int qemuCmdFlags,
- const char ***argv,
+ const char ***retargv,
+ const char ***retenv,
int **tapfds,
int *ntapfds,
const char *migrateFrom);
diff -r 194a93a4a942 src/qemu_driver.c
--- a/src/qemu_driver.c Wed Oct 01 11:52:52 2008 +0100
+++ b/src/qemu_driver.c Thu Oct 02 18:03:43 2008 +0100
@@ -844,6 +844,7 @@
virDomainObjPtr vm,
const char *migrateFrom) {
const char **argv = NULL, **tmp;
+ const char **progenv = NULL;
int i, ret;
char logfile[PATH_MAX];
struct stat sb;
@@ -939,13 +940,23 @@
}
if (qemudBuildCommandLine(conn, driver, vm,
- qemuCmdFlags, &argv,
+ qemuCmdFlags, &argv, &progenv,
&tapfds, &ntapfds, migrateFrom) < 0) {
close(vm->logfile);
vm->logfile = -1;
return -1;
}
+ tmp = progenv;
+ while (*tmp) {
+ if (safewrite(vm->logfile, *tmp, strlen(*tmp)) < 0)
+ qemudLog(QEMUD_WARN, _("Unable to write envv to logfile %d: %s\n"),
+ errno, strerror(errno));
+ if (safewrite(vm->logfile, " ", 1) < 0)
+ qemudLog(QEMUD_WARN, _("Unable to write envv to logfile %d: %s\n"),
+ errno, strerror(errno));
+ tmp++;
+ }
tmp = argv;
while (*tmp) {
if (safewrite(vm->logfile, *tmp, strlen(*tmp)) < 0)
@@ -966,7 +977,7 @@
for (i = 0 ; i < ntapfds ; i++)
FD_SET(tapfds[i], &keepfd);
- ret = virExec(conn, argv, NULL, &keepfd, &vm->pid,
+ ret = virExec(conn, argv, progenv, &keepfd, &vm->pid,
vm->stdin_fd, &vm->stdout_fd, &vm->stderr_fd,
VIR_EXEC_NONBLOCK);
if (ret == 0) {
@@ -977,6 +988,10 @@
for (i = 0 ; argv[i] ; i++)
VIR_FREE(argv[i]);
VIR_FREE(argv);
+
+ for (i = 0 ; progenv[i] ; i++)
+ VIR_FREE(progenv[i]);
+ VIR_FREE(progenv);
if (tapfds) {
for (i = 0 ; i < ntapfds ; i++) {
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-boot-network.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-bootloader.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-console-compat.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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 -drive file=,if=ide,media=cdrom,index=2 -net none -serial none -parallel none -usb
+LC_ALL=C /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 -drive file=,if=ide,media=cdrom,index=2 -net none -serial none -parallel none -usb
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -net none -serial none -parallel none -usb
+LC_ALL=C /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot d -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -net none -serial none -parallel none -usb
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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 -net none -serial none -parallel none -usb
+LC_ALL=C /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 -net none -serial none -parallel none -usb
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-many.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usbdevice disk:/tmp/usbdisk.img -net none -serial none -parallel none -usb
+LC_ALL=C /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usbdevice disk:/tmp/usbdisk.img -net none -serial none -parallel none -usb
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C XAUTHORITY=/root/.Xauthority DISPLAY=:0.1 /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml Thu Oct 02 18:03:43 2008 +0100
@@ -19,6 +19,6 @@
<target dev='hda' bus='ide'/>
</disk>
<input type='mouse' bus='ps2'/>
- <graphics type='sdl'/>
+ <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
</devices>
</domain>
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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 host:014.006
+LC_ALL=C /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 host:014.006
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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 host:0204:6025
+LC_ALL=C /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 host:0204:6025
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-input-xen.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/usr/bin/xenner -S -M xenner -m 214 -smp 1 -monitor pty -no-acpi -bootloader /foo -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3
+LC_ALL=C /usr/bin/xenner -S -M xenner -m 214 -smp 1 -monitor pty -no-acpi -bootloader /foo -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-minimal.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-net-user.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-file.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-many.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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,server -parallel none -usb
+LC_ALL=C /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,server -parallel none -usb
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvdata/qemuxml2argv-sound.args
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.args Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.args Thu Oct 02 18:03:43 2008 +0100
@@ -1,1 +1,1 @@
-/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
+LC_ALL=C /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
diff -r 194a93a4a942 tests/qemuxml2argvtest.c
--- a/tests/qemuxml2argvtest.c Wed Oct 01 11:52:52 2008 +0100
+++ b/tests/qemuxml2argvtest.c Thu Oct 02 18:03:43 2008 +0100
@@ -22,11 +22,14 @@
#define MAX_FILE 4096
-static int testCompareXMLToArgvFiles(const char *xml, const char *cmd, int extraFlags) {
+static int testCompareXMLToArgvFiles(const char *xml,
+ const char *cmd,
+ int extraFlags) {
char argvData[MAX_FILE];
char *expectargv = &(argvData[0]);
char *actualargv = NULL;
const char **argv = NULL;
+ const char **qenv = NULL;
const char **tmp = NULL;
int ret = -1, len, flags;
virDomainDefPtr vmdef = NULL;
@@ -48,18 +51,32 @@
extraFlags;
if (qemudBuildCommandLine(NULL, &driver,
- &vm, flags, &argv,
+ &vm, flags, &argv, &qenv,
NULL, NULL, NULL) < 0)
goto fail;
+ len = 1; /* for trailing newline */
+ tmp = qenv;
+ while (*tmp) {
+ len += strlen(*tmp) + 1;
+ tmp++;
+ }
+
tmp = argv;
- len = 1; /* for trailing newline */
while (*tmp) {
len += strlen(*tmp) + 1;
tmp++;
}
actualargv = malloc(sizeof(*actualargv)*len);
actualargv[0] = '\0';
+ tmp = qenv;
+ len = 0;
+ while (*tmp) {
+ if (actualargv[0])
+ strcat(actualargv, " ");
+ strcat(actualargv, *tmp);
+ tmp++;
+ }
tmp = argv;
len = 0;
while (*tmp) {
@@ -86,6 +103,14 @@
tmp++;
}
free(argv);
+ }
+ if (qenv) {
+ tmp = qenv;
+ while (*tmp) {
+ free(*(char**)tmp);
+ tmp++;
+ }
+ free(qenv);
}
virDomainDefFree(vmdef);
return ret;
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
16 years
[libvirt] [PATCH] Unify most error reporting (ver 2)
by Cole Robinson
The attached patch is a more complete cut at unifying
error reporting among the different source files.
Most files have their own custom Error function, each
with varying degrees of functionality, and lots of
code duplication.
The attached patch adds a helper function to virterror.c
that centralizes all this logic, and redefines each
local error function as a macro that calls out to
the helper. The fixed files now offer printf style
reporting, and the macros pass off function name,
file name, and line number of the reported error
(currently not used, but handy to have).
This change centralizes probably 90% of the error calls.
Some files have pretty custom error functions that
don't map easily to the helper, or call __virRaiseError
directly in a number of places, so I skipped these for
now. Eventually we should move all these edge cases over
so any src/ wide error changes will be pretty easy to
make.
The one thing we lose here is that some some places
were logging info in the err{1,2,3} and int{1,2} fields
of raised error. I don't consider this a loss: even
where it was used, it was used inconsistently and
rarely for anything that would be useful to a user.
In the places where the data had some value, I
included it in the error string.
One side question: is src/xmlrpc.{c,h} even used? And
if not, can it be removed?
Thanks,
Cole
domain_conf.c | 27 +-----------
hash.c | 26 +-----------
internal.h | 6 ++
lxc_conf.c | 21 ---------
lxc_conf.h | 7 +--
network_conf.c | 23 +---------
openvz_conf.c | 22 ----------
openvz_conf.h | 7 ++-
proxy_internal.c | 23 +---------
qemu_conf.c | 21 ---------
qemu_conf.h | 8 +--
qparams.c | 10 +---
sexpr.c | 25 +----------
storage_conf.c | 19 ---------
storage_conf.h | 7 +--
test.c | 28 ++++---------
util.c | 27 +-----------
virterror.c | 40 ++++++++++++++++++
xen_internal.c | 116 ++++++++++++++++++-------------------------------------
xen_unified.c | 24 ++---------
xend_internal.c | 59 ++-------------------------
xm_internal.c | 28 ++-----------
xml.c | 43 +++++---------------
xs_internal.c | 23 +---------
24 files changed, 164 insertions(+), 476 deletions(-)
16 years
[libvirt] libvirt - Configure fails with error message
by Ricardo Tiago
Hi,
When i try to run configure it fails asking me to install the gnutls
library, which is already installed.
Output from configure:
checking for struct _xmlURI.query_raw... no
checking gnutls/gnutls.h usability... yes
checking gnutls/gnutls.h presence... yes
checking for gnutls/gnutls.h... yes
checking for gnutls_handshake in -lgnutls... no
configure: error: You must install the GnuTLS library in order to
compile and run libvirt
[user1@xxx libvirt-0.4.6]# rpm -qa | grep gnutls
gnutls-devel-1.4.1-3.el5_1
gnutls-1.4.1-3.el5_1
After some checking in configure.in I verified that what was really
missing is libgcrypt-devel.
I believe the error message should be updated and provide more details
or at least a check for libgcrypt should be done before the gnutls
check.
Ricardo
16 years
[libvirt] [PATCH 0/2] Update MinGW specfile and add NSIS support to nightly builds
by Richard W.M. Jones
This patch is in two parts. The first part just updates the MinGW
specfile to the latest version. Note that it is also renamed (mingw-*
-> mingw32-*) to match the approved Fedora MinGW packaging guidelines.
The second part adds NSIS support. You will need mingw32-nsis and
mingw32-nsiswrapper installed, and then you'll get a nightly Windows
installer containing (at the moment) just libvirt-0.dll, virsh.exe and
some documentation and dependencies.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
16 years
[libvirt] PATCH: Disable QEMU drive caching
by Daniel P. Berrange
QEMU defaults to allowing the host OS to cache all disk I/O. THis has a
couple of problems
- It is a waste of memory because the guest already caches I/O ops
- It is unsafe on host OS crash - all unflushed guest I/O will be
lost, and there's no ordering guarentees, so metadata updates could
be flushe to disk, while the journal updates were not. Say goodbye
to your filesystem.
- It makes benchmarking more or less impossible / worthless because
what the benchmark things are disk writes just sit around in memory
so guest disk performance appears to exceed host diskperformance.
This patch disables caching on all QEMU guests. NB, Xen has long done this
for both PV & HVM guests - QEMU only gained this ability when -drive was
introduced, and sadly kept the default to unsafe cache=on settings.
Daniel
diff -r 4a0ccc9dc530 src/qemu_conf.c
--- a/src/qemu_conf.c Wed Oct 08 11:53:45 2008 +0100
+++ b/src/qemu_conf.c Wed Oct 08 11:59:33 2008 +0100
@@ -460,6 +460,8 @@
flags |= QEMUD_CMD_FLAG_DRIVE;
if (strstr(help, "boot=on"))
flags |= QEMUD_CMD_FLAG_DRIVE_BOOT;
+ if (strstr(help, "cache=on"))
+ flags |= QEMUD_CMD_FLAG_DRIVE_CACHE;
if (version >= 9000)
flags |= QEMUD_CMD_FLAG_VNC_COLON;
@@ -959,13 +961,15 @@
break;
}
- snprintf(opt, PATH_MAX, "file=%s,if=%s,%sindex=%d%s",
+ snprintf(opt, PATH_MAX, "file=%s,if=%s,%sindex=%d%s%s",
disk->src ? disk->src : "", bus,
media ? media : "",
idx,
bootable &&
disk->device == VIR_DOMAIN_DISK_DEVICE_DISK
- ? ",boot=on" : "");
+ ? ",boot=on" : "",
+ qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT
+ ? ",cache=off" : "");
ADD_ARG_LIT("-drive");
ADD_ARG_LIT(opt);
diff -r 4a0ccc9dc530 src/qemu_conf.h
--- a/src/qemu_conf.h Wed Oct 08 11:53:45 2008 +0100
+++ b/src/qemu_conf.h Wed Oct 08 11:59:33 2008 +0100
@@ -44,7 +44,8 @@
QEMUD_CMD_FLAG_NO_REBOOT = (1 << 2),
QEMUD_CMD_FLAG_DRIVE = (1 << 3),
QEMUD_CMD_FLAG_DRIVE_BOOT = (1 << 4),
- QEMUD_CMD_FLAG_NAME = (1 << 5),
+ QEMUD_CMD_FLAG_DRIVE_CACHE = (1 << 5),
+ QEMUD_CMD_FLAG_NAME = (1 << 6),
};
/* Main driver state */
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
16 years
[libvirt] [PATCH] cleanup virDomainCreateLinux into virDomainDefineXML
by Daniel Veillard
As promised in the libvirt-qpid thread, virDomainCreateLinux() call
name makes no sense (anymore), and it should be renamed, i guess since
virDomainCreate() already exist and by similarity with
virDomainDefineXML() the best name is virDomainCreateXML().
The associated patch rename virDomainCreateLinux to virDomainCreateXML
create a small function virDomainCreateLinux calling the former,
document it as deprecated. To help comprehension of the source code
it's also best to rename the internal driver method in a similar
way, which inflates the patch a bit but is IMHO worth it.
The patch also fixes a few #elif define(__sun__) and turn them
into the correct #elif defined(__sun__) cpp instructions, and changes
include/libvirt/virterror.h to improve the generated HTML page about the
deprected fileds in the structure, since we need to regenerate the
API xml and the docs, it was a good opportunity for that small change.
I removed the docs/ subdir part from the patch as it's generated
and mostly unreadable, that keeps it smaller too.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
16 years
[libvirt] [PATCH] fix index creation for disks > {sd,hd,xvd,vd}z
by Chris Wright
Calling virDiskNameToIndex with a disk name > {sd,hd,xvd,vd}z, such as
vdaa, generates a bogus index. Account for iterations through the loop.
Old behaviour:
vda -> 0
vdz -> 25
vdaa -> 0
vdaz -> 25
New behaviour:
vda -> 0
vdz -> 25
vdaa -> 26
vdaz -> 51
This was discovered by Sanjay Rao, thanks for the report.
Signed-off-by: Chris Wright <chrisw(a)redhat.com>
Cc: Mark Wagner <mwagner(a)redhat.com>
Cc: Sanjay Rao <srao(a)redhat.com>
---
src/domain_conf.c | 2 +-
src/util.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/domain_conf.c b/src/domain_conf.c
index 6a35064..b5897a7 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -3395,7 +3395,7 @@ char *virDomainConfigFile(virConnectPtr conn,
/* Translates a device name of the form (regex) "[fhv]d[a-z]+" into
* the corresponding bus,index combination (e.g. sda => (0,0), sdi (1,1),
- * hdd => (1,1), vdaa => (0,27))
+ * hdd => (1,1), vdaa => (0,26))
* @param disk The disk device
* @param busIdx parsed bus number
* @param devIdx parsed device number
diff --git a/src/util.c b/src/util.c
index ca14be1..56390d7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1055,7 +1055,7 @@ const char *virEnumToString(const char *const*types,
}
/* Translates a device name of the form (regex) "[fhv]d[a-z]+" into
- * the corresponding index (e.g. sda => 1, hdz => 26, vdaa => 27)
+ * the corresponding index (e.g. sda => 0, hdz => 25, vdaa => 26)
* @param name The name of the device
* @return name's index, or -1 on failure
*/
@@ -1075,8 +1075,8 @@ int virDiskNameToIndex(const char *name) {
if (!ptr)
return -1;
- while (*ptr) {
- idx = idx * 26;
+ for (i = 0; *ptr; i++) {
+ idx = (idx + i) * 26;
if (!c_islower(*ptr))
return -1;
16 years
[libvirt] Xen and out of memory stuff, blocks libvirtd
by Stefan de Konink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
[2008-10-08 19:14:05 13001] ERROR (XendCheckpoint:157) Save failed on
domain klant1_monetdb (17) - resuming.
Traceback (most recent call last):
File "usr/lib64/python2.5/site-packages/xen/xend/XendCheckpoint.py",
line 125, in save
forkHelper(cmd, fd, saveInputHandler, False)
File "usr/lib64/python2.5/site-packages/xen/xend/XendCheckpoint.py",
line 358, in forkHelper
child = xPopen3(cmd, True, -1, [fd, xc.handle()])
File "usr/lib64/python2.5/site-packages/xen/util/xpopen.py", line 100,
in __init__
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory
[2008-10-08 19:14:05 13001] DEBUG (XendDomainInfo:2456)
XendDomainInfo.resumeDomain(17)
After this point, I am unable to contact the libvird daemon.
Stefan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREKAAYFAkjs7qQACgkQYH1+F2Rqwn0heQCeNJWDo2h3BR1IhcXmt+w9tpjD
304An1SlqWbig7nL8jgeElzJgu/KqgIa
=dl3M
-----END PGP SIGNATURE-----
16 years