November 12, 2012

How to create branded containers with Oracle software and Solaris

Posted in Solaris at 3:24 pm by alessiodini

Before Sun acquisition from Oracle , there was Etude project aka Solaris Migration Assistant (SMA).
It was a tool for physical to virtual migration ( p2v ) , using it was possibile to migrate a physical system to a branded container hosted on a Solaris 10 global zone.

Looking on the web i found that there is no trace about Etude or SMA. Oracle changed that name in “Oracle Solaris Legacy Containers”. In these days i’m planning to patch some branded container so i tought about to create a test-patching-environment. For this purpose i used that software and maked a Solaris 8 branded container.

Follow the steps:

1) download the software “Oracle Solaris Legacy Containers” from http://www.oracle.com/technetwork/indexes/downloads/index.html

The software is composited by solaris 8/9 images ( flars ) and the software packages framework ( SUNWbrand* )

2) I saw the instructions at http://docs.oracle.com/cd/E22645_01/html/820-2914/gftrg.html

3) Before to start check any Solaris release or kernel patch requirements ( all is listed in the link above )

4) # unzip -q V24150-01.zip
# pwd
/sun-temp/solarislegacycontainers/1.0/Product

5) i should add the packages , but i want to check if the system already haves it
# pkginfo | grep -i brand
system FJSVs8brandr FUJITSU Solaris 8 Containers: solaris8 brand support (Root) <– don't needed
system FJSVs9brandr FUJITSU Solaris 9 Containers: solaris9 brand support (Root) <– don't needed
system SUNWs8brandr Solaris 8 Containers: solaris8 brand support (Root) <– ok
system SUNWs8brandu Solaris 8 Containers: solaris8 brand support (Usr) <– ok
system SUNWs9brandr Solaris 9 Containers: solaris9 brand support (Root) <– ok
system SUNWs9brandu Solaris 9 Containers: solaris9 brand support (Usr) <– ok

6) It seems packages SUNWs9brandk and SUNWs8brandk are missing , so let's install them
# pkgadd -d `pwd` SUNWs9brandk

Processing package instance from

Solaris 9 Containers: solaris9 brand support RTU(sparc) 11.10.0,REV=2008.04.24.03.37
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using as the package base directory.
## Processing package information.
## Processing system information.
8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing Solaris 9 Containers: solaris9 brand support RTU as

## Installing part 1 of 1.
/usr/lib/brand/solaris9/files/patches/112963-32.zip
/usr/lib/brand/solaris9/files/patches/115986-03.zip
/usr/lib/brand/solaris9/files/patches/order
/usr/share/man/man5/solaris9.5
[ verifying class ]

Installation of was successful.

# pkgadd -d .

The following packages are available:
1 SUNWs8brandk Solaris 8 Containers: solaris8 brand support RTU <– i need this
(sparc) 11.10.0,REV=2008.09.20.18.50
2 SUNWs9brandk Solaris 9 Containers: solaris9 brand support RTU
(sparc) 11.10.0,REV=2008.09.20.18.50

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

Processing package instance from

Solaris 8 Containers: solaris8 brand support RTU(sparc) 11.10.0,REV=2008.09.20.18.50
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using as the package base directory.
## Processing package information.
## Processing system information.
8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
/usr/share/man/man5/solaris8.5

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing Solaris 8 Containers: solaris8 brand support RTU as

## Installing part 1 of 1.
/usr/lib/brand/solaris8/files/patches/109147-44.zip
/usr/lib/brand/solaris8/files/patches/109221-01.zip
/usr/lib/brand/solaris8/files/patches/111023-03.zip
/usr/lib/brand/solaris8/files/patches/111431-01.zip
/usr/lib/brand/solaris8/files/patches/112050-04.zip
/usr/lib/brand/solaris8/files/patches/112605-04.zip
/usr/lib/brand/solaris8/files/patches/order
/usr/share/man/man5/solaris8.5
[ verifying class ]

Installation of was successful.
#

7) Let’s setup the zone
# mkdir /s8test
# chmod 700 /s8test

# zonecfg -z s8test
s8test: No such zone configured
Use ‘create’ to begin configuring a new zone.
zonecfg:s8test> create -t SUNWsolaris8
zonecfg:s8test> set zonepath=/s8test
zonecfg:s8test> set autoboot=false
zonecfg:s8test> verify
zonecfg:s8test> commit
zonecfg:s8test> exit
#

8) i want to verify s8test zone
# zonecfg -z s8test info
zonename: s8test
zonepath: /s8test
brand: solaris8
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:

# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
– s8test configured /s8test solaris8 shared

9) Zone installation
( i have the software stored in /sun-temp , it comes from download )
# zoneadm -z s8test install -u -a /sun-temp/solaris8-image.flar
Log File: /var/tmp/s8test.install.22513.log
Source: /sun-temp/solaris8-image.flar
Installing: This may take several minutes…
Postprocessing: This may take several minutes…

Result: Installation completed successfully.
Log File: /s8test/root/var/log/s8test.install.22513.log

# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
– s8test installed /s8test solaris8 shared

10) Let’s boot the zone!
# zoneadm -z s8test boot
#

11) Let’s connect to zone’s console
# zlogin -C s8test
[Connected to zone ‘s8test’ console]

You did not enter a selection.
What type of terminal are you using?
1) ANSI Standard CRT
2) DEC VT52
3) DEC VT100
4) Heathkit 19
5) Lear Siegler ADM31
6) PC Console
7) Sun Command Tool
8) Sun Workstation
9) Televideo 910
10) Televideo 925
11) Wyse Model 50
12) X Terminal Emulator (xterms)
13) Other
Type the number of your choice and press Return: 3

( … )
after a couple of minutes i selected the voices , i waited the last reboot and i had access to the system!

# bash
bash-2.03# uname -a
SunOS s8test 5.8 Generic_Virtual sun4v sparc SUNW,Sun-Fire-T200
bash-2.03#

Advertisements

5 Comments »

  1. Hi,

    Can you help me on this error?

    [Jumaat, 2015 April 24 19:55:02 MYT] Log File: /var/tmp/s9-test.install.6997.log
    [Jumaat, 2015 April 24 19:55:02 MYT] Product: Solaris 9 Containers 1.0
    [Jumaat, 2015 April 24 19:55:02 MYT] Installer: solaris9 brand installer 1.21
    [Jumaat, 2015 April 24 19:55:02 MYT] Zone: s9-test
    [Jumaat, 2015 April 24 19:55:02 MYT] Path: /export/home/sparc
    [Jumaat, 2015 April 24 19:55:02 MYT] Starting pre-installation tasks.
    [Jumaat, 2015 April 24 19:55:02 MYT] Installation started for zone “s9-test”
    [Jumaat, 2015 April 24 19:55:02 MYT] Source: /export/s9-system.flar
    [Jumaat, 2015 April 24 19:55:02 MYT] Media Type: flash archive
    [Jumaat, 2015 April 24 19:55:02 MYT] Installing: This may take several minutes…
    [Jumaat, 2015 April 24 19:55:02 MYT] cd /export/home/sparc/root &&
    [Jumaat, 2015 April 24 19:55:02 MYT] do_flar < "/export/s9-system.flar"
    [Jumaat, 2015 April 24 19:56:02 MYT] Postprocessing: This may take several minutes…
    [Jumaat, 2015 April 24 19:56:02 MYT] running: p2v s9-test
    [Jumaat, 2015 April 24 19:56:02 MYT] Postprocess: Gathering information about zone s9-test
    [Jumaat, 2015 April 24 19:56:02 MYT] Postprocess: Creating mount points
    touch: cannot create /export/home/sparc/root/etc/mnttab: No such file or directory
    chmod: WARNING: can't access /export/home/sparc/root/etc/mnttab
    [Jumaat, 2015 April 24 19:56:02 MYT] Postprocess: Processing /etc/system
    cp: cannot access /export/home/sparc/root/etc/system
    [Jumaat, 2015 April 24 19:56:02 MYT] Result: Postprocessing failed.
    [Jumaat, 2015 April 24 19:56:02 MYT]
    [Jumaat, 2015 April 24 19:56:02 MYT] Result: *** Installation FAILED ***
    [Jumaat, 2015 April 24 19:56:02 MYT] Log File: /var/tmp/s9-test.install.6997.log

    • alessiodini said,

      Hi,
      can you explain me what did you do? Describe me the whole scenario and ur goal!
      Alessio.

    • Please verify the zonepath permissions:

      This is the path to zone’s root directory that is relative to the global zone’s root directory. Zone root must be owned by root user with the mode 700. This will be used in setting the zonepath property, during the zone creation process

      # cd /export/home
      # rm -fr sparc
      # mkdir sparc
      # chmod 700

      # ls -l
      total 2
      drwx—— 2 root root 512 Feb 17 12:46 sparc

      Re-try the Solaris 9 Branded Zone by your flar /export/s9-system.flar

      HTH
      Michele V.

  2. rodrigo carreno said,

    hola quisiera saber como puedo descargar

    SUNWs9brandr
    SUNWs8brandu
    SUNWs8brandk

    saludos

    • alessiodini said,

      Hello,
      thank you for your reply!
      Can u write me the question in english?

      Regards
      Alessio Dini


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: