1
From 42e1e104ca11ce85c8ca8094ac11a26ceb94f070 Mon Sep 17 00:00:00 2001
2
From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
3
Date: Thu, 11 Dec 2008 12:02:50 +0100
4
Subject: [PATCH] qemu: fix parallel/serial mode "tcp" and "unix"
7
http://bellard.org/qemu/qemu-doc.html
8
the required option is 'server' not 'listen'. Use nowait so kvm/qemu doesn't
9
timeout during monitor startup as it waits for an incoming connection.
13
src/qemu_conf.c | 6 +++---
14
.../qemuxml2argv-parallel-tcp.args | 2 +-
15
.../qemuxml2argv-serial-tcp-telnet.args | 2 +-
16
3 files changed, 5 insertions(+), 5 deletions(-)
18
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
19
index e6c378f..e890480 100644
22
@@ -676,13 +676,13 @@ static int qemudBuildCommandLineChrDevStr(virDomainChrDefPtr dev,
23
if (snprintf(buf, buflen, "telnet:%s:%s%s",
25
dev->data.tcp.service,
26
- dev->data.tcp.listen ? ",server" : "") >= buflen)
27
+ dev->data.tcp.listen ? ",server,nowait" : "") >= buflen)
30
if (snprintf(buf, buflen, "tcp:%s:%s%s",
32
dev->data.tcp.service,
33
- dev->data.tcp.listen ? ",listen" : "") >= buflen)
34
+ dev->data.tcp.listen ? ",server,nowait" : "") >= buflen)
38
@@ -690,7 +690,7 @@ static int qemudBuildCommandLineChrDevStr(virDomainChrDefPtr dev,
39
case VIR_DOMAIN_CHR_TYPE_UNIX:
40
if (snprintf(buf, buflen, "unix:%s%s",
42
- dev->data.nix.listen ? ",listen" : "") >= buflen)
43
+ dev->data.nix.listen ? ",server,nowait" : "") >= buflen)
47
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
48
index 1a08bbb..e9bbc71 100644
49
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
50
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
52
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /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
53
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /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,server,nowait -usb
54
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
55
index f2d1f17..ad37de4 100644
56
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
57
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
59
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /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
60
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /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,nowait -parallel none -usb