WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

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

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Fixed ports (or domID port) for VNC connections
From: Angel de Vicente <angelv@xxxxxx>
Date: 18 Feb 2007 12:08:48 +0000
Delivery-date: Sun, 18 Feb 2007 04:08:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1HI8dY-0006I2-R6@host-192-168-0-1-bcn-london>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <E1HI8dY-0006I2-R6@host-192-168-0-1-bcn-london>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Fixed ports (or domID port) for VNC connections, Angel de Vicente <=