Installing OpenSolaris on Xen

Here are some quick instructions on how to install a DHCP based PV OpenSolaris guest/domU on a hypervisor based on the Xen open source community.

First, download the OpenSolaris CDROM.

Here's the py file I'm using... Your path to pygrub will differ if your using a linux dom0.

: alpha[1]#; cat pv.py
name = "opensolaris-pv-install"
vcpus = 1
memory = "1024"
bootloader = "/usr/lib/xen/bin/pygrub"
kernel = "/platform/i86xpv/kernel/amd64/unix"
ramdisk = "/boot/x86.microroot"
extra = "/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text"
disk = ['file:/tank/guests/install/opensolaris/os200805.iso,6:cdrom,r',
        'file:/tank/guests/opensolaris/disk.img,0,w']
vif = ['']
on_shutdown = "destroy"
on_reboot = "destroy"
on_crash = "preserve"
: alpha[1]#; 

Setup your paths correctly, create your disk, etc. Boot the OpenSolaris LiveCD

: alpha[1]#; xm create -c pv.py
Using config file "./pv.py".
Started domain opensolaris-pv-install
v3.1.4-xvm chgset 'Fri May 02 10:23:19 2008 -0700 15873:3e3bd3d19023'
SunOS Release 5.11 Version snv_86 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 ...
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]:

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
12. Swedish
To select the desktop language, enter a number [default 3]:
Configuring devices.
Mounting local partitions/cdroms
Reading ZFS config: done.

opensolaris console login: 
 May  5 08:06:30 opensolaris in.routed[639]: route 0.0.0.0/8 --> 0.0.0.0 nexthop ...
opensolaris console login: 

Log into LiveCD (jack/jack). Make sure your networking is up (it can take a minute or two until the DHCP client runs).

opensolaris console login: jack
Password: 
Last login: Mon May  5 08:07:00 on console
Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
jack@opensolaris:~$ 
jack@opensolaris:~$ ifconfig xnf0
xnf0: flags=201004843 mtu 1500 index 2
        inet 192.168.0.117 netmask ffffff00 broadcast 192.168.0.255

Start up a VNC Server, connect to it on port 5901, and run through the install.

jack@opensolaris:~$ mkdir .vnc;cp .Xclients .vnc/xstartup 
jack@opensolaris:~$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth:  creating new authority file /jack/.Xauthority

New 'opensolaris:1 ()' desktop is opensolaris:1

Starting applications specified in /jack/.vnc/xstartup
Log file is /jack/.vnc/opensolaris:1.log

Once your install has completed, create a py file for the your new guest, and you are ready to go...

name = "opensolaris"
vcpus = 1
memory = "512"
disk = ['file:/tank/guests/opensolaris/disk.img,0,w']
vif = ['']
on_shutdown = "destroy"
on_reboot = "restart"
on_crash = "destroy"

Have Fun!

Comments:

I guess this doesn't work on a Linux Xen 3.2 dom0?

I get: v3.2-1 chgset 'unavailable'

panic[cpu0]/thread=fffffffffbc3cbe0: BAD TRAP: type=e (#pf Page fault) rp=fffffffffbc6ea00 addr=fffffe000c025420

Posted by Philipp Schmid on May 06, 2008 at 07:12 AM EDT #

I'd need to see the entire stack trace.. But I think that's a known bug in 3.2 which was fixed in 3.2.1.

Posted by Mark Johnson on May 06, 2008 at 07:19 AM EDT #

Hi,

yes that could be, we are using 3.2. This is the console output:

Started domain xenvm194
v3.2-1 chgset 'unavailable'
SunOS Release 5.11 Version snv_86 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

panic[cpu0]/thread=fffffffffbc3cbe0: BAD TRAP: type=e (#pf Page fault) rp=fffffffffbc6ea00 addr=fffffe000c025420

#pf Page fault
Bad kernel fault at addr=0xfffffe000c025420
pid=0, pc=0xfffffffffb885da3, sp=0xfffffffffbc6eaf8, eflags=0x10046
cr0: 80050033<pg,wp,ne,et,mp,pe> cr4: 2620<vmxe,xmme,fxsr,pae>
cr2: fffffe000c025420
rdi: fffffe000c025420 rsi: 0 rdx: 80000000cf91e673
rcx: 3 r8: 0 r9: ffffff0084c84000
rax: 0 rbx: 80000000cf91e673 rbp: fffffffffbc6eb90
r10: 0 r11: ffffffffc0000000 r12: 0
r13: 1 r14: fffffe000c025420 r15: 80000000cf91e673
fsb: 200000000 gsb: fffffffffbc3e030 ds: 0
es: 0 fs: 0 gs: 0
trp: e err: 3 rip: fffffffffb885da3
cs: e030 rfl: 10046 rsp: fffffffffbc6eaf8
ss: e02b

fffffffffbc6e8e0 unix:die+ea ()
fffffffffbc6e9f0 unix:trap+13cf ()
fffffffffbc6ea00 unix:_cmntrap+12f ()
fffffffffbc6eb90 unix:atomic_cas_64+3 ()
fffffffffbc6ec30 unix:hati_pte_map+153 ()
fffffffffbc6ecb0 unix:hati_load_common+15a ()
fffffffffbc6ed70 unix:hat_devload+13c ()
fffffffffbc6edc0 unix:gnttab_init+dd ()
fffffffffbc6edd0 unix:startup_modules+f9 ()
fffffffffbc6ede0 unix:startup+3f ()
fffffffffbc6ee10 genunix:main+27 ()
fffffffffbc6ee20 unix:_locore_start+80 ()

skipping system dump - no dump device configured
rebooting...

Posted by Philipp Schmid on May 06, 2008 at 07:27 AM EDT #

Hi Mark,

I tried to use it on Debian dom0. After few hours I finally have the OpenSolaris running ;-). I summarized all of the changes in this blogpost:
http://www.mobilnews.cz/blog/?p=42

Thank you for the intstructions!

Jan

Posted by Jan Krupa on May 09, 2008 at 02:06 AM EDT #

Post a Comment:
Comments are closed for this entry.
About

mrj

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today