Sunday, June 22, 2008

Step By Step Guide ~ How to Install Solaris 9 as a container on a Solaris 10 System Using Zones

Hello folks, I finally managed to successfully install a Solaris 9 Container Zone on my Solaris 10 System. I would like to share the relevant information here.

MY HARDWARE -

Sun Fire 280R (2 x Ultra SPARC III+ at 1200MHz, 6GB RAM, 2 x 80GB HDD)
5 network interfaces - eri0, ce0, ce1, ce2, ce3

though i used only eri0 and ce0. Remaining, i will use later as and when the need arises.

MY SOFTWARE -

Solaris 10 OS - Update 5 (downloaded from sun.com and burned this sol-10-u5-ga-sparc-dvd.iso on a DVDROM)

Solaris 9.0 Container Application - (downloaded from sun.com this file named - s9containers-1_0-rr-solaris10-sparc.tar.gz)

Solaris 9.0 OS Image file - (downloaded from sun.com this file named - solaris9-image.flar)

MY OBJECTIVE -

To install Solaris 9 OS as a container on a Solaris 10 zone. We have some native apps on Solaris 9, so i need to check if that would work fine.

STEPS I FOLLOWED -

STEP 1 - Solaris 10 OS Installation on the System

Installed Solaris 10 update 5 on my Sun Fire 280R. Chose Entire Distribution and allocated my second 80GB HDD only for storing Zone data. So i formatted and mounted /zones on my second hard disk c1t1d0s2. I dedicated my first disk (c1t0d0) to run Solaris 10 exclusively. Installation was successful without a hitch. Below is my install configuration -

hostname - sol10
ip address - 10.10.8.46/24 (on eri0 interface)

plumbed my ce0 interface so that i can dedicate this to my solaris 9 zone that i would be creating in the next step.

globalzone # cat /etc/release
Solaris 10 5/08 s10s_u5wos_10 SPARC
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 March 2008

globalzone #ifconfig ce0 plumb

STEP 2 - Install Solaris 9 Container Application 1.0

I uploaded the file s9containers-1_0-rr-solaris10-sparc.tar.gz to my home directory. Followed by which i gave the below commands to install the application.

globalzone # gunzip s9containers-1_0-rr-solaris10-sparc.tar.gz
globalzone # tar -xvf s9containers-1_0-rr-solaris10-sparc.tar
globalzone # cd ./s9containers-1_0-rr/Product
globalzone # pkgadd -d ./

The following packages are available:
1 SUNWs9brandk Solaris 9 Containers: solaris9 brand support RTU
(sparc) 11.10.0,REV=2008.04.24.03.37
2 SUNWs9brandr Solaris 9 Containers: solaris9 brand support (Root)
(sparc) 11.10.0,REV=2008.04.24.03.37
3 SUNWs9brandu Solaris 9 Containers: solaris9 brand support (Usr)
(sparc) 11.10.0,REV=2008.04.24.03.37

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

(select all and accept all the default parameters. the installation was successful.)

STEP 3 - Create Solaris 9 branded zone

After the system booted, i followed the below commands to create a branded solaris 9 zone.

globalzone # zonecfg -z solaris9
solaris9: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:solaris9> create -b
zonecfg:solaris9> set brand=solaris9
zonecfg:solaris9> set autoboot=false
zonecfg:solaris9> set zonepath=/zones/solaris9
zonecfg:solaris9> add net
zonecfg:solaris9:net> set physical=ce0
zonecfg:solaris9:net> set address=10.10.8.91/24
zonecfg:solaris9:net> end
zonecfg:solaris9> info
zonename: solaris9
zonepath: /zones/solaris9
brand: solaris9
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
net:
address: 10.10.8.91/24
physical: ce0
zonecfg:solaris9> verify
zonecfg:solaris9> commit
zonecfg:solaris9> exit

STEP 4 - Installed Solaris 9 on the Branded Zone

I uploaded the file solaris9-image.flar to my home directory and performed the below commands to Install solaris 9 zone.

globalzone # zoneadm -z solaris9 install -u -a /export/home/vishal/solaris9-image.flar
Log File: /var/tmp/solaris9.install.846.log
Source: /export/home/vishal/solaris9-image.flar
Installing: This may take several minutes...


Postprocessing: This may take several minutes...

Result: Installation completed successfully.
Log File: /zones/solaris9/root/var/log/solaris9.install.846.log
globalzone #
globalzone #
globalzone # zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- solaris9 installed /zones/solaris9 solaris9 shared

globalzone # cat /var/tmp/solaris9.install.846.log
[Mon Jun 23 12:09:03 SGT 2008] Log File: /var/tmp/solaris9.install.846.log
[Mon Jun 23 12:09:03 SGT 2008] Product: Solaris 9 Containers 1.0
[Mon Jun 23 12:09:03 SGT 2008] Installer: solaris9 brand installer 1.21
[Mon Jun 23 12:09:03 SGT 2008] Zone: solaris9
[Mon Jun 23 12:09:03 SGT 2008] Path: /zones/solaris9
[Mon Jun 23 12:09:03 SGT 2008] Starting pre-installation tasks.
[Mon Jun 23 12:09:03 SGT 2008] Installation started for zone "solaris9"
[Mon Jun 23 12:09:03 SGT 2008] Source: /export/home/vishal/solaris9-image.flar
[Mon Jun 23 12:09:03 SGT 2008] Media Type: flash archive
[Mon Jun 23 12:09:03 SGT 2008] Installing: This may take several minutes...
[Mon Jun 23 12:09:03 SGT 2008] cd /zones/solaris9/root &&
[Mon Jun 23 12:09:03 SGT 2008] do_flar < "/export/home/vishal/solaris9-image.flar"
[Mon Jun 23 12:13:58 SGT 2008] Sanity Check: Passed. Looks like a Solaris 9 system.
[Mon Jun 23 12:13:58 SGT 2008] Postprocessing: This may take several minutes...
[Mon Jun 23 12:13:58 SGT 2008] running: p2v -u solaris9
[Mon Jun 23 12:13:58 SGT 2008] Postprocess: Gathering information about zone solaris9
[Mon Jun 23 12:13:58 SGT 2008] Postprocess: Creating mount points
[Mon Jun 23 12:13:58 SGT 2008] Postprocess: Processing /etc/system
[Mon Jun 23 12:13:58 SGT 2008] Postprocess: Booting zone to single user mode
[Mon Jun 23 12:14:11 SGT 2008] Postprocess: Applying p2v module S20_apply_patches
[Sun Jun 22 21:14:12 PDT 2008] S20_apply_patches: Unpacking patch: 115986-03
[Sun Jun 22 21:14:12 PDT 2008] S20_apply_patches: Installing patch: 115986-03

Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...

Patch number 115986-03 has been successfully installed.
See /var/sadm/patch/115986-03/log for details

Patch packages installed:
SUNWesu
SUNWesxu

[Sun Jun 22 21:14:29 PDT 2008] S20_apply_patches: Unpacking patch: 112963-32
[Sun Jun 22 21:14:29 PDT 2008] S20_apply_patches: Installing patch: 112963-32

Checking installed patches...
Patch 112963-32 has already been applied.
See patchadd(1M) for instructions.

Patchadd is terminating.
[Mon Jun 23 12:14:33 SGT 2008] Postprocess: Applying p2v module S31_fix_net
[Mon Jun 23 12:14:33 SGT 2008] Postprocess: Applying p2v module S32_fix_nfs
[Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S33_fix_vfstab
[Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S34_fix_inittab
[Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S35_fix_crontab
[Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S36_fix_pam_conf
[Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S40_setup_preload
[Mon Jun 23 12:14:35 SGT 2008] Postprocess: Performing zone sys-unconfig
[Mon Jun 23 12:15:00 SGT 2008] Postprocess: Postprocessing successful.
[Mon Jun 23 12:15:00 SGT 2008] Result: Postprocessing complete.
[Mon Jun 23 12:15:01 SGT 2008] Service Tag: Gathering information about zone solaris9
[Mon Jun 23 12:15:01 SGT 2008] Service Tag: Adding service tag: urn:st:f703f244-18f1-cf25-a9db-fdd4ea20ffe6
Solaris 9 Containers 1.0 added
Product instance URN=urn:st:f703f244-18f1-cf25-a9db-fdd4ea20ffe6
[Mon Jun 23 12:15:01 SGT 2008] Service Tag: Operation successful.
[Mon Jun 23 12:15:01 SGT 2008]
[Mon Jun 23 12:15:01 SGT 2008] Result: Installation completed successfully.
[Mon Jun 23 12:15:01 SGT 2008] Log File: /zones/solaris9/root/var/log/solaris9.install.846.log
globalzone #

STEP 5 - Configuring the Solaris 9 zone

Configuration process involves booting your zone, setting up your hostname, IP Address Configuration, TimeZone Settings, Naming Configuration etc.

globalzone # zoneadm -z solaris9 boot

globalzone # zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
3 solaris9 running /zones/solaris9 solaris9 shared
globalzone # zlogin -C solaris9

[zlogin solaris console]

After this you will be asked to set up your hostname, IP Address, TimeZone Settings, Naming Configuration etc. After successfully completing this, the zone would reboot. After the system has rebooted, you are all set to go.

globalzone # zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
3 solaris9 running /zones/solaris9 solaris9 shared
globalzone #


SOME QUICK TESTS I PERFORMED

After all this, i was able to connect to my Solaris 9 container that i just created using SSH. Just to test out, i performed the following commands -

solaris9-zone # uname -a
SunOS solaris9 5.9 Generic_Virtual sun4u sparc SUNW,Sun-Fire-280R

solaris9-zone # cat /etc/release
Solaris 9 9/05 HW s9s_u9wos_06b SPARC
Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 25 September 2006
solaris9-zone # df -h
Filesystem size used avail capacity Mounted on
/ 67G 1.9G 65G 3% /
/.SUNWnative/lib 9.6G 162M 9.4G 2% /.SUNWnative/lib
/.SUNWnative/platform
9.6G 162M 9.4G 2% /.SUNWnative/platform
/.SUNWnative/usr 29G 3.1G 25G 11% /.SUNWnative/usr
/dev 67G 1.9G 65G 3% /dev
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 11G 16K 11G 1% /etc/svc/volatile
/dev/ksyms 29G 3.1G 25G 11% /dev/ksyms
fd 0K 0K 0K 0% /dev/fd
swap 11G 0K 11G 0% /tmp

solaris9-zone # psrinfo
0 on-line since 06/23/2008 11:52:30
1 on-line since 06/23/2008 11:52:31
solaris9-zone #

I hope the above would be useful to you guys. Do feel free to comment, if you happen to have any questions.

0 comments:

BLOG Maintained by - Vishal Sharma | GetQuickStart