Sunday, November 20, 2011

Solaris Zone Part 2 ( Sparse Solaris zone )



This tutorial describe how to create sparse Solaris zone.

 Solaris Zone Part 1 ( Concepts and theory )
Solaris Zone Part 2 ( Sparse Solaris zone )
Solaris Zone Part 3 ( whole Solaris zone )
Solaris Zone part 4  ( Zone Configuration )


➊ at the command prompt type
 bash-3.00# zonecfg -z zone1 
where zonecfg is the command used to set up zone configuration, zone1 is the name of the zone.

➋ type create command to create the zone
 zonecfg:zone1>create 
➌ set zonepath parameter
 zonecfg:zone1>set zonepath=/workzone/zone1 
zonepath is the Path that the zone will be installed, the directory you select must have 700 permission. type chmod 700 /yourdirectory to change directory path.

➍ set autoboot parameter 
 zonecfg:zone1> set autoboot=true 
to boot the zone automatically

➎ add file system using fs parameter
 zonecfg:zone1> add fs 
to determine how and where to mount file systems.

➏ set dir parameter
 zonecfg:zone1:fs> set dir=/zone1 
Specifies the mount point for the file system

➐ set block device
 zonecfg:zone1:fs> set special=/dev/dsk/c1d1s0 
Specifies the block special device name or directory from the global zone to mount

➑ set raw device
 zonecfg:zone1:fs> set raw=/dev/rdsk/c1d1s0 
Specifies the raw device on which to run fsck before mounting the file system

➒ set file system type
 zonecfg:zone1:fs> set type=ufs 
Specifies the file system type

 zonecfg:zone1:fs> end 

➓ add network configuration
 zonecfg:zone1> add net 
add network configuration

➊➊ set the physical network card
 zonecfg:zone1:net> set physical=e1000g1 
the network card name is used for the physical interface.

➊➋ set IP address
 zonecfg:zone1:net> set address=10.109.9.233 
the ip address of zone

 zonecfg:zone1:net> end 

➊➌ verify your configuration
 zonecfg:zone1> verify 
Determine whether the resources and properties specified are valid

➊➍ save your configuration
 zonecfg:zone1> commit 
save your configuration

 zonecfg:zone1> exit 

➊➎ check zone status 

 zoneadm list -cv 
ID NAME       STATUS   PATH              BRAND  IP    
   0 global      running  /               native  shared  
   - zone1      installed /workzone/zone1        native  shared 
to see the zone status, you can see zone1 status is configured.
zone status can be :
1- Configured
2- Incomplete
3- Installed
4- Ready
5- Running


➊➏ to install the zone at the command prompt type
 bash-3.00# zoneadm -z zone1 install 
this will take some time, now check zone status

➊➐ check zone status
 bash-3.00# zoneadm list -cv   

 ID NAME STATUS PATH BRAND IP
 0 global running / native shared 
 - zone1 installed /workzone/zone1 native shared 

you can see that zone status is changed from confiugrd to installed

now boot solaris zone, at the command prompt type:-
 bash-3.00# zoneadm -z zone1 boot 

check your zone status :-
bash-3.00# zoneadm list -cv 

 ID NAME       STATUS   PATH              BRAND  IP    
   0 global      running  /               native  shared  
   3 zone1      running  /workzone/zone1        native  shared  
it is now running. the zone status has changed form configured => installd => running

use the command zlogin -C zone1 to complete the zone configuration:-
bash-3.00# zlogin -C zone1 
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: 
 Select 13

1- the first screen will ask you about hostname:- type the host name. then press (esc+2)
2- select No for Kerberos Security then press (esc+2).
3- select your Name service type then press (esc+2)
4- select your country and password ... etc .

the zone is rebooting now, after rebooting login to your zone normally.

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes