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?

link|improve this question

75% accept rate
feedback

3 Answers

up vote 1 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.

link|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
1  
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
feedback

From the Xen xmexample1 file:

# To create one using the VNC backend and sensible defaults:
#
# vfb = [ 'type=vnc' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID.  You can override both address and N:
#
# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
#
# Or you can bind the first unused port above 5900:
#
# vfb = [ 'type=vnc,vnclisten=0.0.0.0,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.

link|improve this answer
feedback

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}
link|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
feedback

Your Answer

 
or
required, but never shown

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