Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed xcp-xapi package in Ubuntu 12.10. I have already created a PV VM in XenCenter, but I cannot access it's console -- when I choose the Console tab in XenCenter, I just got a blank page.

I tried this via console and got this:

bear@ubuntu-tmp1:~$ sudo xe vm-list params=dom-id
dom-id ( RO)    : 0

dom-id ( RO)    : 2

bear@ubuntu-tmp1:~$ sudo xenstore-ls /local/domain/2/serial
0 = ""
 limit = "65536"

According this official link, I should at least see 'tty' and 'vnc' in output, but I got neither of them... Now I completely have no way to install OS on that VM because there is no console available... :-(

share|improve this question
up vote 1 down vote accepted

There is a hidden CLI command (for which I have submitted a request to make non-hidden):

xe console uuid=<vm_uuid>

Note that this only works for PV guests. Alternatively, for both PV and HVM guests, you can use vncviewer to get a VNC console. Use xenstore to get the VNC port:

PORT=xenstore-read /local/domain/${domid}/console/vnc-port

and then call:

vncviewer -via root@${YOUR_SERVER} localhost::${PORT}

Here is a script which does this for you:


function usage () {
    echo "Usage:"
    echo "   `basename $0` -h <xenserver host> -g <guest vm name-label>"
    echo "   `basename $0` -h <xenserver host> -u <guest vm uuid>"
    echo "   `basename $0` -h <xenserver host> -d <domID>"
    exit 1

while getopts "h:g:u:d:" option
    case $option in
        h ) xs=${OPTARG} ;;
        g ) vm=${OPTARG} ;;
        u ) uu=${OPTARG} ;;
        d ) id=${OPTARG} ;;
        * ) usage

if [ -z ${xs} ]; then

if [ -z ${uu} ] && [ -z ${vm} ] && [ -z ${id} ]; then

if [ ! -z ${uu} ]; then
    domid=`ssh root@${xs} xe vm-list uuid=${uu} params=dom-id --minimal`
elif [ ! -z ${vm} ]; then
    domid=`ssh root@${xs} xe vm-list name-label=${vm} params=dom-id --minimal`
elif [ ! -z ${id} ]; then

if [ -z ${domid} ]; then
    echo "Could not find guest ${vm}${uu} on host ${xs}."
    exit 1
elif [ ${domid} -lt 0 ]; then
    echo "Guest ${vm}${uu} has no dom-id. Is your vm running?"
    exit 1

port=`ssh root@${xs} xenstore-read /local/domain/${domid}/console/vnc-port`

if [ -z ${port} ]; then
    echo "Couldn't read VNC port from xenstore. Is your vm running?"
    exit 1

echo "Connecting to vnc port ${port} on host ${xs}..."
set -x
vncviewer -via root@${xs} localhost::${port}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.