Archive for the ‘ Xen ’ Category

Opensolaris on Xen with debian Lenny

Installing OpenSolaris (2009.06) with the default Xen tools in debian Lenny is quite challenging.
First, you need to upgrade the pygrub bootloader to one that supports zfs. The package can be found in my repository:

echo "deb http://www.nemeziz.net/debian lenny main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get install xen-pygrub

If you haven’t already done so, you have to download the Opensolaris iso.

Then, create the xen config file:

name = "opensolaris"
vcpus = 1
memory = "1024"
bootloader = "/usr/bin/pygrub"
bootargs = "--kernel=/platform/i86xpv/kernel/amd64/unix --ramdisk=/boot/amd64/x86.microroot"
disk = [
 'file:/root/osol-0906-x86.iso,6:cdrom,r', # Change this path to match the location where you put the iso
 'phy:/dev/storage/opensolaris-disk,0,w',  # Change this path to the disk/image you want to use for opensolaris
vif = ['']

Now we can create the domU ( xm create -c )

When prompted, you can login with username “jack”, password “jack”

The easiest way to run the graphical installer is with vnc:

mkdir .vnc
cp .Xclients .vnc/xstartup
vncserver

You can now connect to the vnc server and complete the installation.

After the installation, you need to modify your domU config file:

name = "opensolaris"
vcpus = 1
memory = "1024"
bootloader = "/usr/bin/pygrub"
disk = [ 'phy: /dev/storage/opensolaris-disk,0,w', ]
vif = ['']

ip aliases on a routed network

When using a routed netword xen setup ( network-route ), every domU needs an entry in the routing table to be accessible.
So, in addition to configuring the ip on the domU, you also need to tell xen which ip’s you want to use.
In the domU config file:
vif = [ 'ip=10.0.0.1 10.0.0.2 10.0.0.3']
Will route 10.0.0.1 10.0.0.2 and 10.0.0.3 to this domU

Hot plugging memory

Hot plugging memory is possible, but you can only increase the amount.
By adding
maxmem = ’4096′
in your domU config, you can dynamically increase the amount of memory up to this limit with xm mem-set