Archive for February, 2008

OpenSolaris in XEN

Saturday, February 9th, 2008

So I took on to put (open)Solaris in a Suse Linux 10.3 Dom0 with xen 3.1 64bit. I made a LOT of silly mistakes along the way, the first and most time wasting mistake was trying to work off the first CD instead of the DVD. The reason this was such a waste of time is because the CD doesn’t come with the 64 bit miniroot(boot_archive) so the kernel cant be loaded properly(look out for panic[cpu0]/thread=d30cfe00: HYPERVISOR_mmu_update() failed) , this wouldnt have been a problem if I was using 32 bit but unfortunately I wasn’t.

The general procedure after you download the DVD is as follows. As I’m using suse they like to bastardise things so it doesn’t come with pygrub, which is needed for a simpler install, so i had to fetch the kernel and the boot archive myself by mounting the ISO loop back and fetching the following files:

mount -o loop /home/dmarkey/sol.iso /mnt
mkdir /xen/solaris

cp /mnt/boot/amd64/x86.miniroot /xen/solaris

cp /mnt//platform/i86xpv/kernel/amd64/unix /xen/solaris

OK so now me have our kernel and our boot archive, now to generate our XEN configuration file.

name = ’solaris’
memory = ‘1024′
disk = [ 'file:/home/dmarkey/sol.iso,6:cdrom,r','file:/home/dmarkey/solaris.disk,0,w' ]
vif = [ 'mac=00:16:3e:00:20:11' ]
on_shutdown = ‘destroy’
on_reboot = ‘restart’
on_crash = ‘destroy’
kernel = ‘/xen/solaris/unix’
ramdisk = ‘/xen/solaris/x86.miniroot’
extra = ‘/platform/i86xpv/kernel/amd64/unix -B install_media=cdrom’

Because the boot archive is so bloated, you need a LOT of ram to get it booted, thats why I’m allocating 1024 meg of RAM. So now we have to generate the hard disk file, use something like DD to create a >8G file in /home/dmarkey/solaris.disk or wherever you want to put it, remember to change all the file paths in you configuration. I named this configuration file /xen/solaris/solaris.

So now we should be able to boot, so we do:

xm create -c /xen/solaris/solaris

And fingers crossed we should be able to perform a Solaris setup. When the setup is finished we need to edit the config file. First uncomment the #root=’/dev/dsk/c0d0s0′ line, and then we change the extra line to simply extra = ‘/platform/i86xpv/kernel/amd64/unix’ and you can reduce the amount of ram to 512 if you want.

The performance of Solaris under XEN is i would say near to native. The only problem is that solaris need 512mb of ram to even attempt to boot. This is because of the huge boot_archive (x86.miniroot). In another entry I will go through the steps to make a smaller boot_archive and now my Solaris under Xen will successfully boot with 96M of ram!

Copyright © 2018 All Rights Reserved.
No computers were harmed in the 0.039 seconds it took to produce this page.