Wednesday, January 23, 2008


Setting up VNC for F7 DomU at Solaris (SNV78) Dom0



OpenSolaris discussions often reference F7 as Linux DomU at SNV Dom0.
F7 is Xen 3.0.4 enabled distro, what looks as the most suitable for
OpenSolaris Dom0 (build <=78).
At mean time installation for Linux DomUs (F7,F8,CentOS 5.0) is possible only in
text mode. File ~/.vnc/xstartup will be created automatically by running vncserver.


Create Fedora7 DomU at SNV78 Dom0 :-



# lofiadm -a /export/home/isos/f7.iso
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# share -F nfs /mnt
# virt-install -n FDR7PVM -p -r 1024 --nographics -x "console=hvc0" \
-f /second_root/images/f7pvm.img -l nfs:<IP-ADDRESS Dom0>:/mnt




As was noticed by Mark Jonson file ~/.vnc/xstartup may be created
on F7 DomU automatically.
Login as root and run:-



# mkdir .vnc
# cd .vnc
# vncserver :1




Vnc password will be requested by the last command.
Edit ~/.vnc/xstartup and uncomment first two lines.
Make this file as follows bellow:



#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

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




Copy xstartup file to /etc/vnc directory.
Make following changes to /etc/sysconfig/vncservers file:-



VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"




Then run:-



# chkconfig vncserver on
# reboot




Snapshots:-














References.
http://mail.opensolaris.org/pipermail/xen-discuss/2007-July/000979.html