Sunday, September 07, 2008

Vncserver on SNV97 DomU at Xen 3.3 CentOS 5.2 Dom0 (64-bit)

Sun Xvnc implementation for Nevada, committed in build 76 provides 3 options. Third one is to start vncserver by hands. It allocates two ports 580(X) and 590(X),where (X) is available display number.Port 580(X) may be used for http://IP-DomU:580(X) connection to DomU , port 590(X) may be used by vncviewer IP-DomU:(X) connection.Both ways initiate loading Java Applets from DomU into Dom0. Connection via vncviewer has been selected on CentOS 5.2 Dom0 (with Sun JDK 6.0 installed) due to issue with Java Web Start and FireFox on 64-bit Linux. By some reasons first and second options provided by official Sun Xvnc failed on SNV97 DomU, successfully installed via pygrub in text mode as usual.Following bellow is a snapshot of DomU start up.

[root@RHEL52 vm]# uname -a
Linux RHEL52 2.6.18-92.1.6.el5xen #1 SMP Wed Jun 25 14:13:10 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
[root@RHEL52 vm]# xm info|grep xen_
xen_major : 3
xen_minor : 3
xen_extra : .0
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
xen_changeset : unavailable
[root@RHEL52 vm]# xm create -c snv97.pygrun
Using config file "./snv97.pygrun".
Started domain Solaris79PV
v3.3.0 chgset 'unavailable'
SunOS Release 5.11 Version snv_97 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
NOTICE: xdf@0: failed to read feature-barrier
Hostname: Solaris97pvm
/dev/rdsk/c0d0s7 is clean
Reading ZFS config: done.

Solaris97pvm console login: root
Last login: Sun Sep 7 15:38:08 on console
Sep 7 15:43:31 Solaris97pvm login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_97 November 2008
# bash
bash-3.2# export PATH=/opt/SUNWtvnc/bin:/usr/openwin/bin:$PATH
bash-3.2# vncserver

New 'X' desktop is Solaris97pvm:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/Solaris97pvm:1.log

bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet netmask ff000000
xnf0: flags=201000843 mtu 1500 index 2
inet netmask ffffff00 broadcast
ether 0:16:3e:31:51:50
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128

File ~/.vnc/xstartup generated by vncviewer in this case looks like:-


OS=`uname -s`
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
if [ $OS = 'SunOS' -a -f $HOME/.dt/sessions/lastsession ]; then
exec `cat $HOME/.dt/sessions/lastsession`
if [ -f /usr/dt/config/Xsession.jds ]; then
exec /usr/dt/config/Xsession.jds
if [ -f /usr/dt/bin/Xsession ]; then
exec /usr/dt/bin/Xsession
if [ -x /opt/sfw/bin/fvwm2 ]; then
which fvwm2 && {
} || {
which twm && {
xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
} || {
echo No window manager found!

In case of replacement packages SUNWvncviewer,SUNWxvnc from any recent Nevada build
less than 97. Standard Xvnc gets back in place. However same file xstartup in this
case looks like:-


[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

What provides just X-terminal window instead of gnome desktop

Issue vncviewer from another terminal session.

Web Login to SNV97 DomU from Windows HVM at the same Xen 3.3 CentOS 5.2 Dom0.

Regarding same task at SNV97 Dom0 view:-
Setting up VNC on SNV97 DomU at SNV97 Dom0