Monday, August 31, 2015

Solaris 10 Zone creation.

For easy management a mount point /zoneroot is created for all the zone installations.



#Zone Creation#
root@global # zonecfg -z <zonename>
<zonename>: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:<zonename>> create -b
zonecfg:<zonename>> set zonepath=/zoneroot/<zonename> ( Path where the zone will be installed)
zonecfg:<zonename>> set autoboot=true
zonecfg:<zonename>> set ip-type=exclusive

(Exclusive-IP zones have separate TCP/IP stacks, so the separation reaches down to the data-link layer.)

# Add Network #
zonecfg:<zonename>> add net
zonecfg:<zonename>:net> set physical=nxge1
zonecfg:<zonename>:net> end
(IP specified during the Zone console login)

# Add Filesystem #
zonecfg:<zonename>> add fs
zonecfg:<zonename>:fs> set dir=/u01
zonecfg:<zonename>:fs> set special=/dev/dsk/cxtxdxsx
zonecfg:<zonename>:fs> set raw=/dev/rdsk/ cxtxdxsx
zonecfg:<zonename>:fs> set type=ufs
zonecfg:<zonename>:fs> end
 ( Repeat the above steps to add more filesystem )

# Verifying the configuration #
zonecfg:<zonename>> verify

zonecfg:<zonename>> info ( Shows the information about zone you just created)

zonename: <zonename>
zonepath: /zoneroot/<zonename>
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid:
net:
        address not specified (IP specified during the Zone console login)
        physical: nxge1
        defrouter not specified ( can be specified during the Zone console login)


# Committing the configuration #
zonecfg:<zonename>> commit


zonecfg:<zonename>> verify
zonecfg:<zonename>> exit

#Zone Install#
zoneadm -z <zonename> install

#Zone Boot#
zoneadm -z <zonename> boot

#Zone Console login for setup# ( -C is specified only for first time after the install and boot to configure the initial setup.
 
zlogin -C <zonename>
192.168.x.x

 
                          Host name: <zonename>
                         IP address: 192.168.x.x
            System part of a subnet: Yes
                            Netmask: 255.255.255.0
                        Enable IPv6: No
                      Default Route: Specify one
                  Router IP Address: 192.168.x.x