[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Fixed ports (or domID port) for VNC connections


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Angel de Vicente <angelv@xxxxxx>
  • Date: 18 Feb 2007 12:08:48 +0000
  • Delivery-date: Sun, 18 Feb 2007 04:08:27 -0800
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Hi,

I've seen some threads about people having difficulties choosing the connecting
ports to VNC. In case it can be useful, I put here my settings for a
fully-virtualized domain. The documentation for these is not great, but I got
this by a mixture of looking at the example hvm files and experimentation. (My
Xen is 3.0.4_1)

If I want to have a fixed port for my domain, I have:

vnc=1
vncconsole=1
vncunused=0
vncdisplay=5
vnclisten="0.0.0.0"
#vncpasswd='test'

vncconsole=1 is to open the vncviewer automatically on domain start-up, so
perhaps you don't want this.

vncdisplay=5 fixes the port to VNC and

vncunused=0 seems to be the key point for this. If commented out, then the
domains will ignore the vncdisplay stuff and the ports will be assigned from 0
upwards. 

vnclisten="0.0.0.0" allows me to connect to this machine from anywhere


You can check if it worked by doing
angelv@arce:~$ sudo netstat -lpn | grep qemu
tcp        0      0 0.0.0.0:5905            0.0.0.0:*               LISTEN     
9067/qemu-dm
angelv@arce:~$ 

Ports are 5900 + your vncdisply, so this worked.

With this in place, I can connect a viewer to it by doing:

angelv@arce:~$ vncviewer arce:5

-------------

If I want to connect to my domain according to their ID, I just comment out the
vncdisplay line, so I have in the domain config file:

vnc=1
vncconsole=1
vncunused=0
#vncdisplay=5
vnclisten="0.0.0.0"

With this in place, after creating the doamin, I check the ID with 'xm list',
and I can verify that is the port being used:

angelv@arce:~$ sudo xm create Xen-Configs/CentOS-4.4.ServerCD-i386.hvm
Using config file "./Xen-Configs/CentOS-4.4.ServerCD-i386.hvm".
Started domain centos-386
angelv@arce:~$ sudo xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0   256     2     r-----   3215.4
centos-386                                17   520     1     r-----     12.8
angelv@arce:~$ sudo netstat -lpn | grep qemu
tcp        0      0 0.0.0.0:5917            0.0.0.0:*               LISTEN     
9409/qemu-dm
angelv@arce:~$ 


As said, I got this partially by experimentation. If someone more knowledgeable
about this can shed light to all the possible VNC settings, please do.

Cheers,
Angel de Vicente

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.