Solaris 10 offers many virtualization technologies and zones are one among them.Here we are going to see about sparse root zone.Sparse root zone shares as a read-only file system from the global zone of the /usr, /lib, /sbin and /platform directories.So compare to whole to root zone ,it will consume very less disk space.But you can’t modify the those shared directories since its shared on read only mode from global zone level.Performance wise,there is no difference compare to whole root zone according to oracle.
Here we are going to see how to create new sparse root zone. Beginning the zone creation with the zone name of zarena.
Creating new zone:
Arena-Node1#zonecfg -z zarena zarena: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:zarena> create zonecfg:zarena> info zonename: zarena zonepath: brand: native autoboot: false bootargs: pool: limitpriv: scheduling-class: ip-type: shared hostid: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr zonecfg:zarena> set zonepath=/zoravol1 zonecfg:zarena> add net zonecfg:zarena:net> set address=192.168.2.8 zonecfg:zarena:net> set physical=e1000g0 zonecfg:zarena:net> end zonecfg:zarena> info zonename: zarena zonepath: /zoravol1 brand: native autoboot: false bootargs: pool: limitpriv: scheduling-class: ip-type: shared hostid: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 192.168.2.8 physical: e1000g0 defrouter not specified zonecfg:zarena> verify zonecfg:zarena> commit zonecfg:zarena> exit
Checking the new zone status using the below command.
Arena-Node1#zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zarena configured /zoravol1 native shared
Modifying the zone’s root directory permission.
Arena-Node1#chmod 700 /zoravol1
Installing the zone.
Arena-Node1#zoneadm -z zarena install Preparing to install zone . Creating list of files to copy from the global zone. Copying <5623> files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize <1112> packages on the zone. Initialized <1112> packages on zone. Zone is initialized. Installation of <3> packages was skipped. The file contains a log of the zone installation. Arena-Node1#zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zarena i nstalled /zoravol1 native shared
Booting the zone
Arena-Node1#zoneadm -z zarena boot
Login in to zone’s console to complete the post installation steps.
Arena-Node1#zlogin -C zarena [Connected to zone 'zarena' console] Reading ZFS config: done. 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) CDE Terminal Emulator (dtterm) 14) Other Type the number of your choice and press Return: 3 Creating new rsa public/private host key pair Creating new dsa public/private host key pair Configuring network interface addresses: e1000g0. - Host Name for e1000g0:1 --------------------------- Enter the host name which identifies this system on the network. The name must be unique within your domain; creating a duplicate host name will cause problems on the network after you install Solaris. A host name must have at least one character; it can contain letters, digits, and minus signs (-). Host name for e1000g0:1 zarena ---------------------------------------------------- F2_Continue F6_Help 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) CDE Terminal Emulator (dtterm) 14) Other Type the number of your choice and press Return: 3 Creating new rsa public/private host key pair Creating new dsa public/private host key pair Configuring network interface addresses: e1000g0.
Complete the rest of the post installation steps by selecting default and selecting the proper time zone .
To terminate the zone’s console , use ~.
From global zone,verifying the zone status.
Arena-Node1#zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 2 zarena running /zoravol1 native shared
your zone is ready.Now you can Login in to zone using zlogin.
Arena-Node1#zlogin zarena [Connected to zone 'zarena' pts/3] Last login: Mon Jul 30 01:17:39 on pts/4 Oracle Corporation SunOS 5.10 Generic Patch January 2005 # bashbash-3.00# ifconfig -a lo0:1: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0:1: flags=1000843 mtu 1500 index 2 inet 192.168.2.8 netmask ffffff00 broadcast 192.168.2.255
For your information ,from Solaris 11 onwards we do not have sparse root zone .we will have only whole root zone in order to manage system individually.
Thank you for reading this article.Please leave a comment if you have any doubt ,i will get back to you as soon as possible.
rohith says
HI ,
I have configured a zone with exclusive ip,I would like to change the ip address of that non-globals-zone can you walk me trough the process.
thanigaivel says
Hi lingeshwaran,
1. How can we configure Solaris Whole root zone with single cpu with ZFS filesystem. (Note: global zone also ZFS)?
2. We are going to use this zone has Database server with Oracle 12G
Below is the server congfiguration.
HP DL360 – 32 GB Ram, Solaris 10- zfs, Global zone ram size – 12GB, whole root zone ram size – 10GB with Oracle 12G installed.
thanks in advance
thanigaivel
Lingeswaran R says
I think …autoboot set to false in zonecfg.
Try the below
# zonecfg -z zonename
> info
"If the autoboot is set false,then"
>set autoboot=true
>commit
>exit
#
nikhil pant says
Hi
good post. can you tell me how to make the zone boot persistent on reboot. whenevr i reboot the host my zone doesn't boot and goes to installed state and i have to unplumb the nic and then boot it manually. Have you faced this?
unix@admin says
thanx,
can u send the brandedzone installation method…..
Lingeswaran R says
it will do the system call translation…from one version to another
Now i come to know that we can install RHEL on solaris 10 X86….
For more information see http://en.wikipedia.org/wiki/Solaris_Containers
unix@admin says
Thanx,
While discussing of any zone we say that the the underlying kernel is only one , then how ca u install different version of Solaris?
Can u explain it how the system call are attended of a branded zone?
Lingeswaran R says
Sparse root zone will consume less disk space compare to whole root zone.It will share the /usr, /lib, /sbin and /platform from global zone in read-only mode.
But whole root zone will have its own /usr, /lib, /sbin and /platform directories.
Branded zone:Branded zone supported only in SPARC.This concept is to run other version of solaris as zone.Ex:In solaris 10 global zone ,we can install solaris 9 ,8 as branded zone. I will post the installation method soon.
unix@admin says
ya its good stuff…
But what are advantages of sparse root zone over whole root zone?
What is a branded zone and how do we create it?