id = xenGetDomIdFromSxpr(root, priv->xendConfigVersion);
xenUnifiedLock(priv);
- tty = xenStoreDomainGetConsolePath(conn, id);
+ if (sexpr_lookup(root, "domain/image/hvm"))
+ tty = xenStoreDomainGetSerialConsolePath(conn, id);
+ else
+ tty = xenStoreDomainGetConsolePath(conn, id);
vncport = xenStoreDomainGetVNCPort(conn, id);
xenUnifiedUnlock(priv);
if (!(def = xenParseSxpr(root,
return virDomainDoStoreQuery(conn, domid, "console/tty");
}
+/**
+ * xenStoreDomainGetSerailConsolePath:
+ * @conn: the hypervisor connection
+ * @domid: id of the domain
+ *
+ * Return the path to the pseudo TTY on which the guest domain's
+ * serial console is attached.
+ *
+ * Returns the path to the serial console. It is the callers
+ * responsibilty to free() the return string. Returns NULL
+ * on error
+ *
+ * The caller must hold the lock on the privateData
+ * associated with the 'conn' parameter.
+ */
+char * xenStoreDomainGetSerialConsolePath(virConnectPtr conn, int domid) {
+ return virDomainDoStoreQuery(conn, domid, "serial/0/tty");
+}
+
/*
* xenStoreDomainGetNetworkID:
int domid);
char * xenStoreDomainGetConsolePath(virConnectPtr conn,
int domid);
+char * xenStoreDomainGetSerialConsolePath(virConnectPtr conn,
+ int domid);
char * xenStoreDomainGetNetworkID(virConnectPtr conn,
int id,
const char *mac);