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; diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 4fe6897001..d07926bb7d 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -916,8 +916,15 @@ class XendDomainInfo: else: to_store[n] = str(v) + # Figure out if we need to tell xenconsoled to ignore this guest's + # console - device model will handle console if it is running + constype = "ioemu" + if 'device_model' not in self.info['platform']: + constype = "xenconsoled" + f('console/port', self.console_port) f('console/ring-ref', self.console_mfn) + f('console/type', constype) f('store/port', self.store_port) f('store/ring-ref', self.store_mfn)