(redirected from ZoneConfiguation)

Solaris10 ZoneConfiguration

Useful Commands

 zonecfg -z zone1 (for creating the zone for instance)
 zonecfg -z zone1 info
 zoneadm list -cvi # show the list of all the zones and their status
 zoneadm -z zone1 install
 zoneadm -z zone1 boot

Create

 bash-2.05b# zonecfg -z zone1
 zone1: No such zone configured
 Use 'create' to begin configuring a new zone.
 zonecfg:zone1> create
 zonecfg:zone1> set zonepath=/zone/1
 zonecfg:zone1> set autoboot=true
 zonecfg:zone1> add net
 zonecfg:zone1:net> set address=192.168.35.210
 zonecfg:zone1:net> set physical=hme1
 zonecfg:zone1:net> end
 zonecfg:zone1> info
 zonecfg:zone1> verify
 zonecfg:zone1> commit
 zoneadm -z zone1 install
 zoneadm -z zone1 boot

Delete

 zoneadm -z testzone uninstall
 zonecfg -z testzone delete
 # you may want to delete or archive the zonepath

Clone

 zonecfg -z cognos1 export > cognos2.cfg
 vi cognos2.cfg  # change mount point, IP number etc
 zonecfg -z cognos2 -f cognos2.cfg 
 zoneadm -z cognos1 halt
 zoneadm -z cognos2 clone cognos1  # (wait 5 minutes)
 zoneadm -z cognos1 boot
 zoneadm -z cognos2 boot
 zlogin -C cognos2 # and set the location parameters

Move To Another Machine

Both machines must be at the same patch level or things won't work well.

On the old machine:

 zoneadm -z cognos2 halt
 zoneadm -z cognos2 detach

(now move the files over -- rsync --archive is OK, or cpio or tar) Now, on the new machine

 zonecfg -z cognos2
   create -a /zone/cognos2
   info

(you may need to change physical interface, IP number)

   commit
   exit
 zoneadm -z cognos2 attach (-u will update patches; -F will force it)
 zoneadm -z cognos2 boot

Admin

Cluster

Verify the cluster resource group status.. The Status column should be at "Online" for all zones.

 clrg status
 clrs enable oradb-lh
 clrs enable oradb-hastp

Unfiled

 sc> poweron_

Verify using the console command.

 sc> console_
 Verify the status of the current zones.