Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Paravirtualized OpenSolaris 2008.11 domU Using Debian Lenny


This guide will help you to create an OpenSolaris paravirtualized Xen guest under Debian Lenny.

 

Installation

Download the OpenSolaris 2008.11 Live CD:

cd /xen/opensolaris ; wget http://dlc.sun.com/osol/opensolaris/2008/11/osol-0811.iso

mount -o loop osol-0811.iso /mnt/loop

cp /mnt/loop/platform/i86xpv/kernel/amd64/unix /xen/opensolaris

cp /mnt/loop/boot/x86.microroot /xen/opensolaris

This creates a 10GB image for use as the root:

dd if=/dev/zero of=/xen/opensolaris/disk.img bs=1024k count=1 seek=10000

vi /xen/opensolaris/opensolaris.cfg

name = “opensolaris”
vcpus = 1
memory = 1024
kernel = “/xen/opensolaris/unix”
ramdisk = “/xen/opensolaris/x86.microroot”
extra = “/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text”
disk = [‘file:/xen/opensolaris/osol-0811.iso,6:cdrom,r’,’file:/xen/opensolaris/disk.img,0,w’]
#disk = [‘file:/xen/opensolaris/osol-0811.iso,6:cdrom,r’,’phy:/dev/sdc1,0,w’]
vif = [”]
on_shutdown = “destroy”
on_reboot = “destroy”
on_crash = “destroy”

Start the install procedure starting the domU with a console:

xm create -c opensolaris.cfg

Using config file “./opensolaris.cfg”.
Started domain opensolaris
v3.2-1 chgset ‘unavailable’
SunOS Release 5.11 Version snv_101b 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: opensolaris
Remounting root read/write
Probing for device nodes …
WARNING: g.e. still in use!
Preparing live image for use
Done mounting Live image
USB keyboard
1. Albanian 22. Latvian
2. Belarusian 23. Macedonian
3. Belgian 24. Malta_UK
4. Bulgarian 25. Malta_US
5. Croatian 26. Norwegian
6. Czech 27. Polish
7. Danish 28. Portuguese
8. Dutch 29. Russian
9. Finnish 30. Serbia-And-Montenegro
10. French 31. Slovenian
11. French-Canadian 32. Slovakian
12. Hungarian 33. Spanish
13. German 34. Swedish
14. Greek 35. Swiss-French
15. Icelandic 36. Swiss-German
16. Italian 37. Traditional-Chinese
17. Japanese-type6 38. TurkishQ
18. Japanese 39. TurkishF
19. Korean 40. UK-English
20. Latin-American 41. US-English
21. Lithuanian
To select the keyboard layout, enter a number [default 41]:

Here you can just press enter to continue if you are using a US keyboard.

1. Chinese – Simplified
2. Chinese – Traditional
3. English
4. French
5. German
6. Italian
7. Japanese
8. Korean
9. Portuguese – Brazil
10. Russian
11. Spanish
To select desktop language, enter a number [default is 3]:

Here you can press enter again for English.

User selected: English
Configuring devices.
Mounting cdroms
Reading ZFS config: done.
opensolaris console login:

Log in with the credentials jack/jack (username/password):

opensolaris console login: jack
Password:
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
jack@opensolaris:~$

Run the VNC server and set up a VNC password:

mkdir .vnc

cp .Xclients .vnc/xstartup

vncserver

ifconfig -a

Now you can VNC from any client to IPADDRESS:1.

Go through the install steps and wait until you get to the screen that it asks for a reboot. Before rebooting you will need to find the ZFS ID for the bootfs in rpool. Open the terminal in the VNC session (along the top bar) and type:

pfexec zdb -vvv rpool | grep bootfs

You will see a line that appears below that will say:

bootfs = NUMBER

Note: that after the bootfs line comes up you can press Ctrl+C to cancel or you will wait for quite a while.

Now you can restart the guest, when you click restart the opensolaris domain should shut down.

Now that the OpenSolaris system is installed on the disk image, we can use that to boot from. As of OpenSolaris 2008.11, the root volume is ZFS.

vi /xen/opensolaris/opensolaris.cfg

name = “opensolaris”
vcpus = 1
memory = 1024
kernel = “/xen/opensolaris/unix”
ramdisk = “/xen/opensolaris/x86.microroot”
extra = ‘/platform/i86xpv/kernel/amd64/unix -B console=ttya,zfs-bootfs=rpool/56,bootpath=”/xpvd/xdf@0:a”‘
#disk = [‘phy:/dev/sdc1,0,w’]
disk = [‘file:/xen/opensolaris/disk.img,0,w’]
vif = [”]
on_shutdown = “destroy”
on_reboot = “destroy”
on_crash = “destroy”

Now this is where the rpool ZFS ID comes in handy. In the extra line you will see that there is an entry that says “bootfs=rpool/56”, this is what my ID is so just replace 56 with whatever your ID was.
Links

http://blogs.sun.com/mrj/
http://bderzhavets.blogspot.com/2008/05/install-opensolaris-200805-domu-at-xen.html
http://www.opensolaris.com/
http://www.debian.org/

Comments

comments