Package: qemu
Version: 0.9.0-1
Severity: normal

It does not seem to be possible to make qemu export its monitor or
serial console over tcp, when qemu is the server, and connect to it
both robustly and without races.

Here's one attempt:

client_program &
qemu -serial tcp::port,server

In this mode, qemu blocks at startup until a connection is made to the
serial port. So the program that will be connecting needs to already
be running and polling the port.

But this is bad, since the client program presumably needs to give
up at some point if it fails to connect, in case qemu never starts.
And if it gives up too early, qemu will be left running.


Another attempt:

qemu -serial tcp::port,server &
client_program

There's a huge race here, the client program needs to wait for qemu to
start listening. And if it fails to connect after a while, it needs to
give up in case qemu isn't starting, but if it gives up too soon, qemu is
left running.


Another:

qemu -daemonize -serial tcp::port,server,nowait
client_program

The nowait option seems like the solution. Except that there's a new
race: the client_program might take too long to start, and qemu will be
booting in the background in the meantime, so the client program might
not be able to access the whole boot process.


What qemu needs is a way to make it start listening to the port, then
daemonise, and then block until it gets a connection. 

(This is the point where you tell me the simple, robust, and race-free
way to accomplish this that I've been missing. ;-)

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages qemu depends on:
ii  bochsbios                   2.3-2        BIOS for the Bochs emulator
ii  libasound2                  1.0.13-2     ALSA library
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libncurses5                 5.5-5        Shared libraries for terminal hand
ii  libsdl1.2debian             1.2.11-8     Simple DirectMedia Layer
ii  openhackware                0.4.1-2      OpenFirmware emulator for PowerPC
ii  proll                       18-2         JavaStation PROM 2.x compatible re
ii  vgabios                     0.6a-1       VGA BIOS software for the Bochs an
ii  zlib1g                      1:1.2.3-13   compression library - runtime

Versions of packages qemu recommends:
ii  debootstrap                   0.3.3.2    Bootstrap a basic Debian system
ii  sharutils                     1:4.2.1-15 shar, unshar, uuencode, uudecode
pn  vde2                          <none>     (no description available)

-- no debconf information

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to