Features:
- Virtualization
- Solaris Zones can hosts only instances of Solaris. Not other OS
- Limit 8192 zones per Solaris host
- Primary (global) zone has access to ALL zones
- Non-global zones, do NOT have access to other non-global zones
- Default non-global zones derive packages from global zone
- Program isolation – zone1 (Apache), zone2 (MySQL)
- Provides ‘z’ commands to manage zones
- At least 100mb required for the creation of non-global zone
- Type:
- Sparse Root Zones – Share key files (/usr, /lib) with global zone. Default zone type.
- Whole Root Zones – Require more storage
### Global Zones ###
- Solaris ALWAYS boots to the global zone
- Knows about ALL hardware devices attached to the system
- Knows about ALL non-global zones
### Non-Global Zones ###
- Installed at a location on the file system of the Global zone ‘zone root path’ - /export/home/zones/{zone1,zone2,zone3,…}
- Share packages with the global zone
- Manage distinct hostname and tables files
- Cannot communicate with other non-global zones by default. Use standard tcpip
- GLOBAL zone admin can delegate non-global zone administration
- Requirements: hostname, zone rootpath, IP address,
Commands:
zonename Lists current zone name
zonecfg Configure zones. Can run interactively, non-interactively, command-file modes
zlogin To open the console fo zones
zoneadm To administrate the zones
Steps for configuring non-global zone:
1. mkdir /export/home/zones/testzone1 && chmod 700 /export/home/zones
2. zonecfg –z testzone1
zonecfg:testzone1> create
zonecfg:testzone1> set zonepath=/export/home/sonez/testzone1
zonecfg:testzone1> add net
zonecfg:testzone1:net> set address=192.168.1.60
zonecfg:testzone1:net> set physical=e1000g0
zonecfg:testzone1:net> end
zonecfg:testzone1> info
zonecfg:testzone1> set autoboot=true (OPTION)
zonecfg:testzone1> add attr (OPTION)
zonecfg:testzone1:attr> set name=comment
zonecfg:testzone1:attr> set type=string
zonecfg:testzone1:attr> set value=”TestZone1”
zonecfg:testzone1:attr> end
zonecfg:testzone1> verify
zonecfg:testzone1> commit
zonecfg:testzone1> exit
# zonecfg –x testzone1 info
2. To install a zone :
# zoneadm –z testzone1 install
3. To view the state of the zones :
# zoneadm list –iv
4. ReBoot the non-global zone :
# zoneadm –x testzone1 boot|reboot
5. Login to console mode :
# zlogin –C testzone1
6. Login Interactively :
# zlogin –l username zonename
7. Login Non-Interactive :
# zlogin options zonename
8. Safe mode Login :
# zlogin –S zonename
Hi Raja
ReplyDeleteThis is Avis. I has been watching you. I have learned so many concepts through your aix and linux blog. Now you started Solaris blog. Very happy. And you has been developing your skills. Through you, we are developing ourself. I am very happy and proud that i am the first person who leave a comment on your Solaris blog. Keep going.. Keep rocking... God bless you...