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

Does every VM in XEN have a VNC server running for it? If so, how do I connect to this VNC session, this would be VERY helpful for me!

I'd like to be able to tunnel a connection to my server via SSH, in a manner, ssh -L localportX:localhost:vncportnumber to i can use my VNC client, and connect to localhost:localportX and get the screen of the VM.

Am I understanding the VNC wrong here?

share|improve this question
up vote 2 down vote accepted

This would depend on how you're managing your Xen VMs?

If you are using libvirt, it should be a simple matter of connecting to the host with virt-manager and opening up the specific VM. The details of opening up the VNC to listen to a port and tunneling the client connection over to it will be handled in the background.

share|improve this answer
I generally use virt-manager but when I'm remote or using a slow connection, virt-manager stops being my friend! :) and it becomes very slow, I just wanted to check out using VNC. – Mister IT Guru Jan 28 '11 at 13:20
Might be caused by all the other things that virt-manager is doing. Have you just tried virt-viewer stand-alone? – sybreon Jan 28 '11 at 13:35
virt-viewer, I have not tried, (feel very embarrassed) - I will try this! – Mister IT Guru Jan 30 '11 at 13:08
If it works, let us know. :) – sybreon Jan 30 '11 at 14:58
It gives me what I need :) Thank You – Mister IT Guru Jan 31 '11 at 11:18

From the Xen xmexample1 file:

# To create one using the VNC backend and sensible defaults:
# vfb = [ 'type=vnc' ]
# The backend listens on port 5900+N by default, where N is
# the domain ID.  You can override both address and N:
# vfb = [ 'type=vnc,vnclisten=,vncdisplay=1' ]
# Or you can bind the first unused port above 5900:
# vfb = [ 'type=vnc,vnclisten=,vncunused=1' ]
# You can override the password:
# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
# Empty password disables authentication.  Defaults to the vncpasswd
# configured in xend-config.sxp.

So put something like vfb = [ 'type=vnc' ] in your VM config file.

share|improve this answer

I'm not 100% sure about opensource Xen, but with Citrix XenServer (based on OSS Xen) the Host machine is running VNC (vncterm) for each VM. I believe with OSS Xen you can use:

xm list

to find the DOM id of the VM. The connect to it using:

xm console {domID}
share|improve this answer
Is this only from the CLI of the host system, can I not VNC from any desktop via an SSH tunnel or similar? – Mister IT Guru Jan 26 '11 at 17:35

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.