1. Identify the server OS that will be used inside zone
(container). Create flar image and keep it in any NFS mount which can be
accessible from Global.
#flarcreate -n mathiyam-flar-image -c -S -X
/var/tmp/flar-exclude-list.out /lhotse2/mathiyam/mathiyam-flar-image.flar
An example of exclude file list would be
(exclude /var/tmp, /tmp, /home, any NFS mount and all other non-root
filesystem)
/tmp
/var/tmp
/form
/Application
………
…
2. Install corresponding Solaris Legacy Container per OS
version package from
paris: /export/install/SOL_10_0811_SPARC/solarislegacycontainers/1.0.1/Product in global. Note that this legacy package is
required for branded zones only.
SUNWs9brandk à Solaris 9 Containers: solaris9
brand support RTU
SUNWs8brandk à Solaris 8 Containers: solaris8
brand support RTU
Login to Global and install the package.
#pkgadd –d . SUNWs8brandk
On successful brand legacy package installation,
it will list on the system these packages
root@roja-global # pkginfo |grep SUNWs8brand
system
SUNWs8brandk Solaris 8
Containers: solaris8 brand support RTU
system
SUNWs8brandr Solaris 8
Containers: solaris8 brand support (Root)
system
SUNWs8brandu Solaris 8
Containers: solaris8 brand support (Usr)
root@roja-global #
Above Root and Usr packages are installed with Solaris 10 by default in global.
3. Create a diskgroup “zonedg” using any unused free disk
and create a filesystem of size at least twice the size of flar image. If more
space is possible, add more to it for zone installation. Note that zone will
see root (/) and /var out of this filesystem only.
/dev/vx/dsk/zonedg/f4tuna_s8vol
104857600 15672919 83612809 16%
/s8_f4tuna_zone_volume
/dev/vx/dsk/zonedg/lpdb9_s8vol
104857600 12616796 86478102 13%
/s8_lpdb9_zone_volume
root@pagubali-global
4. Create a directory for zone path under the above
filesystem by zone name which will be used in zone creation time.
Ex. #mkdir /s8_lpdb9_zone_volume/maari ; chmod 700 /s8_lpdb9_zone_volume/maari
5. Create Zone now
root@pagubali-global # zonecfg -z maari
maari: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:maari> create -b
zonecfg:maari> set
zonepath=/s8_lpdb9_zone_volume/maari
zonecfg:maari> set brand=solaris8
zonecfg:maari> set autoboot=false
zonecfg:maari> set bootargs="-m
verbose"
zonecfg:maari> set
limitpriv=default,dtrace_user,graphics_access,graphics_map,net_rawaccess,proc_priocntl,proc_lock_memory,sys_ipc_config
zonecfg:maari> set
scheduling-class="" ßWe are using Time Scheduler (TS)**
zonecfg:maari> set
ip-type=shared ßNIC is shared between two containers
zonecfg:maari> add net
zonecfg:maari:net>
zonecfg:maari:net> set
physical=nxge4 ßThat’s the physical NIC will be used for sharing
zonecfg:maari:net> set
address=10.41.138.41
zonecfg:maari:net> end
zonecfg:maari> add capped-memory
zonecfg:maari:capped-memory> set
physical=44G
ßAllocating 44gb memory to Maari.
zonecfg:maari:capped-memory> end
zonecfg:maari> add rctl
zonecfg:maari:rctl> set name=zone.max-swap
zonecfg:maari:rctl> add value
(priv=privileged,limit= 4294967296,action=deny)
zonecfg:maari:rctl> end
zonecfg:maari> add rctl
zonecfg:maari:rctl> set
name=zone.max-locked-memory
zonecfg:maari:rctl> add value
(priv=privileged,limit=4294967296,action=deny)
zonecfg:maari:rctl>end
zonecfg:maari> verify
zonecfg:maari> exit
Verify that Maari container is created and
status shows configured.
root@pagubali-global # zoneadm list -cv
ID
NAME
STATUS
PATH
BRAND IP
0
global
running
/
native shared
4
pagubali
running /s8_f4tuna_zone_volume/pagubali solaris8 shared
-
maari configured /s8_lpdb9_zone_volume/maari
solaris8 shared
6. Install the Flar image now in the designated zone path
location.
root@pagubali-global # zoneadm -z maari
install -p -a /lhotse2/lpdb9/lpdb9-flar-image.flar
Log File:
/var/tmp/maari.install.853.log
Source:
/lhotse2/lpdb9/lpdb9-flar-image.flar
Installing: This may take
several minutes...
Postprocessing: This may take several
minutes...
Result: Installation completed successfully.
Log File:
/s8_lpdb9_zone_volume/maari/root/var/log/maari.install.853.log
root@pagubali-global #
After Flar image is installed, verify that
status shows “installed”.
root@pagubali-global # zoneadm list -cv
ID
NAME
STATUS PATH
BRAND IP
0
global
running
/
native shared
4
pagubali
running /s8_f4tuna_zone_volume/pagubali solaris8 shared
-
maari installed /s8_lpdb9_zone_volume/maari
solaris8 shared
root@pagubali-global #
7. Creating pool set for CPU allocation to individual
container. Here in this example, creating pset and pool for pagubali container.
Pooladm –s ß create default poolcfg.conf file
root@pagubali-global # poolcfg -c 'create
pset pset_pagubali (uint pset.min=32; uint pset.max=32)'
root@pagubali-global # poolcfg -c 'create
pool pool_pagubali'
root@pagubali-global # poolcfg -c 'associate
pool pool_pagubali (pset pset_pagubali)'
root@pagubali-global #pooladm -c ß To commit
8. Add the pool name in zone configuration as shows in this
example for pagubali.
root@pagubali-global # zonecfg -z pagubali
zonecfg:pagubali> set pool=pool_pagubali
zonecfg:pagubali> verify
zonecfg:pagubali> commit
zonecfg:pagubali> exit
9. Boot now zone
#zoneadm –z maari boot
ßFrom Global
#zoneadm list
–cv ßVerify zone status shows “running”
#zlogin –z
maari ßlogin to container from Global