Zone Configuration


One of the more powerful features of Solaris 10, and later versions, are Zones, also called Containers. Their configuration is best demonstrated through a few quick examples.


    # zonecfg -z zone1
        zonecfg:zone1> create
        zonecfg:zone1> set zonepath=/zones/zone1
        zonecfg:zone1> set autoboot=true
        zonecfg:zone1> add net
        zonecfg:zone1:net> set address=
        zonecfg:zone1:net> set physical=bge0
        zonecfg:zone1:net> end
        zonecfg:zone1> verify
        zonecfg:zone1> exit
    # zoneadm list -vc

Quick creation

   * Edit /etc/zones/ZONE.xml
   * Create /zones/ZONE; chmod 700 /zones/ZONE
   * Append ZONE:configured:/zones/ZONE to /etc/zones/index
   * zonecfg -z ZONE install


    # zoneadm -z zone1 install


    # zoneadm -z zone1 boot

Login to console to complete installation

    # zlogin -C zone1

Login to zone console. Will start sysid and configure OS. Exit with “~.” .

Zone setup is complete.

Some directories (/usr, /etc, etc) are mounted read-only from the global zone.

Other Functions

With running, properly configured zones, here are a few methods for reconfiguration steps.

Remove properties

    # zonecfg -z zone1 remove 

Delete zone completely

    # zonecfg -z zone1 delete

Change IP address of an existing zone

Two methods:

zonecfg:z> select net address=
zonecfg:z:net> set address=
zonecfg:z:net> end
zonecfg:z> commit

OR Change directly in /etc/zones/my-zone.xml then from the global zone we can change the IP of the running local zone. This is done using the below command – one cannot change the IP of the local zone from inside of it.

# ifconfig bge1:1 newip netmask x.x.x.x

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>