diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-25 14:45:47 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-25 14:45:47 +0100 |
commit | f8e2c1f126f7216792c6bf487b02728a4f5a917a (patch) | |
tree | 8fb9fd0688682e37ea85338c410f0ea441a078f5 /tools/console | |
parent | f8ffd3b21f42c524ab836080a64b9147c4faf6df (diff) | |
download | xen-f8e2c1f126f7216792c6bf487b02728a4f5a917a.tar.gz xen-f8e2c1f126f7216792c6bf487b02728a4f5a917a.tar.bz2 xen-f8e2c1f126f7216792c6bf487b02728a4f5a917a.zip |
pv-qemu 10/10: Make xenconsoled ignore doms with qemu-dm
This patch writes a field /local/vm/DOMID/console/type taking the
value 'ioemu' or 'xenconsoled'. If xenconsoled sees a type that is
not its own, then it skips handling of that guest. The qemu-dm
process doesn't need to read this field since it will only attach
to the console if given the -serial pty arg which XenD already
ensures matches this xenstore field.
The overall behaviour is that if a paravirt guest has a qemu-dm
process running then that handles the console, otherwise the
xenconsoled handles it. The former is more functional, with the
exception of not currently supporting persistent logging to a
file at the same time as exposing a PTY.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/daemon/io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index dbc9a8326c..c6dc6cd973 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -377,6 +377,7 @@ int xs_gather(struct xs_handle *xs, const char *dir, ...) static int domain_create_ring(struct domain *dom) { int err, remote_port, ring_ref, rc; + char *type, path[PATH_MAX]; err = xs_gather(xs, dom->serialpath, "ring-ref", "%u", &ring_ref, @@ -393,6 +394,14 @@ static int domain_create_ring(struct domain *dom) } else dom->use_consolepath = 0; + sprintf(path, "%s/type", dom->use_consolepath ? dom->conspath: dom->serialpath); + type = xs_read(xs, XBT_NULL, path, NULL); + if (type && strcmp(type, "xenconsoled") != 0) { + free(type); + return 0; + } + free(type); + if ((ring_ref == dom->ring_ref) && (remote_port == dom->remote_port)) goto out; |