Linux menu

Saturday, September 20, 2014

Solaris 11 Complete Reference of Solaris Zones


Introduction Of Solaris Zones

A zone is a virtualized OS which is created within a single instance of Solaris 10. Each environment has its own identification that is separate from the primary hardware. Each environment works independently as if running on its own system, making consolidation simple, safe, and secure. In this article, we will discuss about the Solaris Zones/container in detail.
whenever we go to the new topic, there are 3 questions will raise, what ? why ? and how? let we can find the answers...

Advantages of  ZONES
Reduce costs by running multiple instances
workloads on the same system
Better hardware utilization
Reduced infrastructure overhead
Lesser administration costs (admins/workload)
Resource controls
Security isolation
Software package administration

ZONE FEATURES
Zone Features
GranularityZones can run on any number of available CPUs and amount of available memory.
IsolateRun the Multiple application on same Global Zone.
SecurityHacking one zone does not compromise applications running in other zones.
TransparencyApplications do not need to be recompiled to run in zones (except for some privileged operations)
VirtualizationHide configuration information from applications
Memory CappingManage the memory usage of zones
Dynamic Resource PoolsAssign CPUs to Zones
Fair share schedulerGrant a zone minimal CPU usage.

 Key Points :- 
• Depends on our hardware capability we can create the non-global zones up to 8191.
• Each zone has an ID assigned by system when it's booted with the global zone, always listed as zone ID 0.
• Only the global zone contains a bootable Solaris kernel and is aware of all devices, file systems, zones.



Types Of  ZONES :  Zones come in two flavors:

Global Zone 
       • Global zones controls the hardware resources and are administrating the Non-Global Zones.

Non-Global Zone 
       • Virtualized Solaris execution environments, but that look and feel just like a normal standalone servers                                    and also its called as Local Zones. There are 3 types Of  Local Zones. 

Types Of Local Zones
Sparse Root Zones

 • Share binaries with the global zone and also called as Native Zones.
 • /usr, /platform, /sbin, /lib are the FS are shared from global zone as read-only loopback filesystem.
 • Very Less disk Space is sufficient for creating this type of Zones.
 • Quick and Very less time  is required to create this type of Zones.




Whole Root Zones 

• Contain a complete copy of the Solaris binaries that are installed in the global zone
 • Approximately its required 3 GB space for creating this type of zones.







Branded Zone
       • Supports different versions of Solaris OS. For example, you can install Solaris 8 or  9 in a branded zone.                                                                                                      
                                       
ZONE States

As shown in below image we can understand the flow of zone states clearly.






ZONE States
ConfiguredConfiguration was completed and Committed
IncompleteTransition state during install or uninstall Operations
InstalledThe packages have been successfully installed
ReadyThe virtual platform has been established
RunningThe zone booted successfully and is now running
ShuttingdownThe zone is in the process of shutting down - this is a temporary state, leading to "Down"
DownThe zone has completed the shut down process and is down - this is a temporary state, leading to "Installed"



Zone Daemons  There are 2 Daemons associated with Zone.

 Zoneadmd  
       • Zoneadmd daemon starts whenever zones requires to be managed.
        Each zones have single instance of Zoneadmd ( ie zoneadmd -z zonename)
       • Its started automatically by SMF and its stop automatically when no longer required.
       • Allocates the zone ID and starts the zsched process
       • Sets system-wide resource controls
       • Plumbs the virtual network interface
       • Mounts any loopback or conventional file systems    
  
Zsched 
      • The zsched process is started by zoneadmd.
      • The zsched job is to keep the track of kernel threads running within the zone.
      • It is also known as the zone scheduler.

Frequently Using Zone Commands 

zonecfg   • Add/Delete/Modify/info zone configuration
# zonecfg -z zone-name: Interactive mode; can be used to remove properties of the following types: fs, device, rctl, net, attr
# zonecfg -z zone-name commit
# zonecfg -z zone-name create
# zonecfg -z zone-name delete
# zonecfg -z zone-name verify
zoneadm • Change the Zone states or Administration of Zones
# zoneadm -z zone-name boot
# zoneadm -z zone-name halt
# zoneadm -z zone-name install
# zoneadm -z zone-name ready
# zoneadm -z zone-name reboot
# zoneadm -z zone-name uninstall
# zoneadm -z zone-name verify

zlogin      • Login  non-global from global zone
# zlogin zone-name
# zlogin -C zone-name  ( Login to zone console)

No comments: