Create new solaris zone

How to create Solaris Zone

1> Created a Zone Home directory
mkdir -p /export/zones/

2> Change premission
chmod 700 /export/zones/

3> Configure the the Zone
zonecfg -z (in our case, we call the zone_name as sunrmg
zonecfg:sunrmg> create
zonecfg:sunrmg> set zonepath=/export/home/sunrmg
zonecfg:sunrmg> add net
zonecfg:sunrmg:net> set address=xxx.xxx.xxx.xxx
zonecfg:sunrmg:net> set physical=ce0
zonecfg:sunrmg:net> end
zonecfg:sunrmg> set autoboot=true
(The above information is sufficient to configure a basic zone, with most software shared from the global zone.
Other options could have been used, for example to inherit parts of the Global zone's file system, mount directories (e.g. /software) from the Global zone, restrict the zone's resources (e.g. CPU, memory))
zonecfg:sunrmg> info
zonepath: /export/zones/sunrmg
autoboot: true
pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: xxx.xxx.xxx.xxx
physical: ce0
zonecfg:sunrmg> verify
zonecfg:sunrmg> commit
zonecfg:sunrmg> exit
(Note that a full copy of Solaris can be installed, rather than sharing directories, by using the -b flag to the create option within zonecfg.)

4> install the zone
zoneadm -z install
(it takes 10 -15 minutes depend on hardware)

5> boot the zone
zoneadm -z boot

6> Login in the zone's console
zlogin -C >zone_name>

7> The rest is to configure the OS. The procedue just like unsysconfig or the first boot into the preload solaris on the new server


dedicated CPU:
zonecfg:my-zone> add dedicated-cpu
zonecfg:my-zone:dedicated-cpu> set ncpus=1-3
zonecfg:my-zone:dedicated-cpu> set importance=2
zonecfg:my-zone:dedicated-cpu> end

Capped CPU:
zonecfg:my-zone> add capped-cpu
zonecfg:my-zone:capped-cpu> set ncpus=3.5
zonecfg:my-zone:capped-cpu> end

Capped-memory
zonecfg:my-zone> add capped-memory
zonecfg:my-zone:capped-memory> set physical=50m
zonecfg:my-zone:capped-memory> set swap=100m
zonecfg:my-zone:capped-memory> set locked=30m
zonecfg:my-zone:capped-memory> end

http://www.oracle.com/technetwork/articles/servers-storage-admin/o11-062-rac-solariszonescluster-429206.pdf

Comments

Popular posts from this blog

VIOS TIPs

Configure Solaris 10 LDOM on Solaris 11.4

Change P410i from HBA mode to Raid mdoe