Knowledge Base

Solaris 10 Zones

Aug 3rd 2008
No Comments

This section provides an introductions to zones within the Solaris 10 operating environment. A zone is Sun’s answer to providing an isolated environment in which a set of service daemons can operate. It’s easy to think of a zone as an advanced ‘chroot jail’ with additional functionality and benefits.

Zone States

A zone can be in one of six states: configured, installed, ready, running and shutdown.

Administering and Configuring Zones

As with many of the recent administrative commands to be made available from Sun in recent years, zone administration can be achieved using the single zoneadm command. This command has a range of parameters allowing you to administer a given zone. Similarly, configuration of a zone can be achieved using the zonecfg command.

Listing zones on a given system:

# zoneadm list -iv

Configuring Zones

Configuring a zone:

# zonecfg -z gibbsie-zone
zonecfg:gibbsie-zone> create
zonecfg:gibbsie-zone> set zonepath=/export/zones/gibbsie-zone
zonecfg:gibbsie-zone> set autoboot=true
zonecfg:gibbsie-zone> add net
zonecfg:gibbsie-zone:net> set address=
zonecfg:gibbsie-zone:net> set physical=hme0
zonecfg:gibbsie-zone:net> end
zonecfg:gibbsie-zone> commit
zonecfg:gibbsie-zone> exit

Installing a Zone

Once configured, a zone can be installed. During this phase, the zone is considered to be ‘incomplete’.

# zoneadm -z gibbsie-zone install

Verifying a Zone

Once installed, a zone can be verified.

# zoneadm -z gibbsie-zone verify

Deleting a Zone

To delete a zone, you have to first uninstall the zone using ‘zoneadm uninstall

# zoneadm -z gibbsie-zone uninstall -F

Uninstalling a Zone

Once a zone is uninstalled, you can delete the zone safely. Note, always ensure you uninstall a zone before you delete it.

# zoneadm -z gibbsie-zone delete -F

Transitioning a Zone to the ‘ready’ State

Once a zone has been installed and verified, the zone can be transitioned to the ‘ready’ state.

# zoneadm -z gibbsie-zone ready

Booting a Zone

Now the zone is in a ‘ready’ or ‘installed’ state, the zone can be booted.

# zoneadm -z gibbsie-zone boot

Halting a Zone

A zone in a ‘running’ state can be halting using:

# zoneadm -z gibbsie-zone halt

This post is tagged , , ,

No Comments

Leave a Reply