Sunday, May 25, 2008

Solaris xVM ---PV Linux domU

Solaris system is reinstalled and vanilla. Xen is working. But still something needs to do from the beginning.
  • VNC configuration
  • virt-manager
To configure VNC to let it support xen display by the following command:
# svccfg -s xvm/xend setprop config/vncpaswd = astring:\"passwd\"
# svccfg -s xvm/xend setprop config/vnc-listen=astring:\"0.0.0.0\"
# svcadm refresh xvm/xend; svcadm restart xvm/xend

To install virt-manager, download the package and use the following command:
#pkgadd -d. SUNWvirt-manager

The one thing I left undone yet is paravirtual Linux domU. Generally, we have three methods to create a PV Linux domU: virt-install, virt-manager, and xm create.
virt-manager is GUI installlation and supports Fedora well. It is network install.
virt-install is command-line style but works substantially in diverse ways: netinstall, isoinstall, cdrom, etc.
xm create is command-line style too but mainly work in iso or cdrom install, which required configuration file prehand.

First, virt-manager. Due to our specific box, only centos works and DNS in guest still doesn't work properly. So I use the path address: http://128.153.145.19/pub/centos/5/os/i386/
The screenshot for installation can be seen as below:
I am just waiting for its completion and when it restarts, it looks like this:
While it is installing, it can not probe the video card. Either the driver is not ported or the virt-manager is not complete yet.
Note: so far I have no idea of where virt-manager has stored the configuration file for the guest. As I know, in virt-manager log it did log the xml format guest configuration.

To boot the installed CentOS domU guest, you need the following configuration file
name="centosP"
#kernel="/var/lib/xen/virtinst-vmlinuz.UAktlH"
#ramdisk="/var/lib/xen/virtinst-initrd.img.XxNCk0"
disk=['file:/export/home/newbie/centosP.img,xvda,w']
memory=1024
vif=['']
root="/dev/xvda"

Note: virtinst-vmlinuz.UAktlH and virtinst-initrd.img.XxNCk0 are created by virt-manager and when booting the guest, those two lines should be removed. Grub in the image will take over and boot up the guest. BTW, xvda is required in disk option rather than 0,w]

Graphics doesn't work for Paravirtualization in Solaris yet. Also even using virt-manager, CentOS cannot detect properly the video card type, so only text mode network installation works, using a generic video driver. ParaVirtualization is still black-and-white world. Some drivers are missing and need to be ported but they are in progress and almost there.

When we tried virt-install and xm create. It cannot install from iso because cdrom is not paravirtual ported. In another word, we didn't have cdrom paravirtual drivers there. We can have the CentOS boot up, but it will keep asking you the CD-ROM device driver. When booting a Linux-made , XENBUS said block device driver, nic device driver, and the console missing. The details can be seen as below:

It is said that one way to circle around CDROM is to use NFS. But I am not familiy

2 comments:

Boris Derzhavets said...

# lofiadm -a /export/home/isos/rhel.iso
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# share -F nfs /mnt
# virt-install -n RHEL5PV -p -r 1024 --nographics \
-f /dev/zvol/dsk/nevada/disk1 -l nfs:192.168.1.35:/mnt

Setup VNC on DomU:-

# 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 &
Make following changes to /etc/sysconfig/vncservers file:-
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"
Then run:-
# chkconfig vncserver on
# reboot

Kingdom of Freedom said...

Thanks :-)