Monday, November 16, 2009

ZONE CONFIGURATION

Solaris zones provide virtual operating systems that look like different solaris instance to users and application.
zone allow the root user of the global zone to dedicate system resources to individual zones.each zone maintains their own root password and user information,separate from other zones and the global systems.Each zone exists with separate process and file system space and only can monitor and interact with local processes.
ZONE FEATURES:--
1) Security
2) Isolation
3) Virtualization
4) Granularity
5) Transparency

ZONE TYPE
Two types of zones
1) Global zone (Default zone) ZONE ID 0
2) Non-global zone

ZONE DAEMONS
1) zoneadmd:- primary process for managing the zone virtual platform. this deamons responsible for zone booting & shutting down. allocate zone ID and start zsched system process. setting zone-wide resource controls. plumbing virtual network interface & mounting loopback and conventional file systems.
2) zsched :- this process enables the zone subsystem to keep track of per-zone kernel threads.

Zone Configuration

1 global# zonecfg -z work-zone
2 zonecfg:work-zone> create
3 zonecfg:work-zone> set zonepath=/export/work-zone
4 zonecfg:work-zone> set autoboot=true
5 zonecfg:work-zone> add fs
6 zonecfg:work-zone:fs> set dir=/mnt
7 zonecfg:work-zone:fs> set special=/dev/dsk/c0t0d0s7
8 zonecfg:work-zone:fs> set raw=/dev/rdsk/c0t0d0s2
9 zonecfg:work-zone:fs> set type=ufs
10 zonecfg:work-zone:fs> add options [logging]
11 zonecfg:work-zone:fs> end
12 zonecfg:work-zone> add inherit-pkg-dir
13 zonecfg:work-zone:inherit-pkg-dir> set dir=/usr/sfw
14 zonecfg:work-zone:inherit-pkg-dir> end
15 zonecfg:work-zone> add net
16 zonecfg:work-zone:net> set physical=ce0
17 zonecfg:work-zone:net> set address=192.168.0.1
18 zonecfg:work-zone:net> end
19 zonecfg:work-zone> add device
20 zonecfg:work-zone:device> set match=/dev/sound/*
21 zonecfg:work-zone:device> end
22 zonecfg:work-zone> add attr
23 zonecfg:work-zone:attr> set name=comment
24 zonecfg:work-zone:attr> set type=string
25 zonecfg:work-zone:attr> set value="The work zone."
26 zonecfg:work-zone:attr> end
27 zonecfg:work-zone> verify
28 zonecfg:work-zone> commit
29 zonecfg:work-zone> exit

VIEW THE ZONE CONF FILE
#more /etc/zones/work-zone.xml

FOR VIEW ZONE
#zoneadm list -iv
FOR VERIFY
#zoneadm -z work-zone verify
INSTALLING CONFIGURED ZONE
#zoneadm-z wok-zone install
BOOTING A ZONE
#zoneadm -z work-zone ready
#zoneadm -z work-zone boot
#zoneadm list -iv
HALTING A ZONE
#zoneadm -z work-zone halt
REBOOTING A ZONE
#zoneadm -z work-zone reboot
LOGGING INTO AND WORKING WITH ZONE
#zlogin -C work-zone
DELETING A ZONE
#zoneadm list -cp
#zoneadm -z work-zone halt
#zoneadm list -cp
#zoneadm -z work-zone uninstall
#zonecfg -z work-zone delete
#zoneadm list –cp

No comments:

Post a Comment