Configure Solaris Container (Zoning) in Solaris 10

Solaris Container is a virtualization technology that come from SUN, from my experience you can only make virtualization for Solaris I don’t know if for another OS. We usually call it with SUN Zone CMIIW. With this container we can manage resource for application and services, another virtualization can do it too, I think…

The bottom line is that my experience with Solaris Container is to deploy some application (Web Application) inside those container in one server, like SUN T5220, so later this server “seems” to have so many OS, each with its own IP address, file, processor, and another resources.

In my case I’m using T5220 which has 64 thread that is equal having 64 CPU, and my application need at least 4 CPU. This would make one T5220 can have around 16 application with their own separated environment (not completely). Because if the server is being shut down, the container is shut down too. But when the server is up we can easily boot, reboot the container. If you want to have the real virtualization, I mean when the server is broken but you don’t want your container broken you have to use SUN Fire E25K server, it will cost you around 1 up to 4 million US dollars 😛

Now we can continue with the configuration. First thing to do is to set the resource management, we can do it by creating a resource pool. Resource pool is is a logical entity that owns a subset of the system resources, like CPU and Memory. Basically in this resource we will define what is the maximum and minimum value of resources that can be used by one zone/domain/container. The subset of that resource pool is processor set, every one resource pool is associated to one processor set. So if you want to give this pool its own unique CPUs, you will need to define the processor set, the number of processors it contains, and associate it with a pool. Here is how to do it:

  • Enable the resource pool feaeture

pooladm -e

  • Save the current configuration

pooladm -s

  • See if there any existing pool on the system


  • Create a processor set containing how many CPU that you want for me min = 2 max = 3

poolcfg -c ‘create pset zone-name-pset (uint pset.min=2; uint pset.max=3)’

  • Create a resource pool for the processor set

poolcfg -c ‘create pool zone-name-pool’

  • Associate the pool to the processor set, and this pool will be used to the zone-name server

poolcfg -c ‘associate pool zone-name-pool (pset zone-name-pset)’

  • Activate the configuration

pooladm -c

  • Check if your pool already exist


After you create the pool resource you can start to make the zone/container.

  • Enter the zone configuration

zonecfg -z zone-name-zone

  • If you type the command it will tell you that the zone doesn’t exist, if that so you need to type


  • After that you need to specify the directory in the main server where the file of that zone will be exist.

set zonepath=/export/home/zones/zone-name-zone

  • You need to decide if the zone should be boot automatically at system boot time or not, if you want to make it boot able automatically you can type

set autoboot=true

  • Then you need to specify the network configuration for your zone

add net

set address=

set physical=e1000g0


  • You need to assign the zone to the pool that we already created before

set pool=zone-name-pool

  • Verify the configuration, for the syntax


  • Then you can commit your configuration



  • After that you can install your zone

zoneadm -z zone-name-zone install

  • If the installation already finish you can boot the zone

zoneadm -z zone-name-zone boot

  • You need to login to the zone to do some pre installation for the solaris setting

zlogin -C zone-name-zone

After you login you can configure your zone like configuring the Solaris OS after fresh installment.

That’s it for the configuration of Solaris Containers, you can read from the source if you have any confusion.


8 thoughts on “Configure Solaris Container (Zoning) in Solaris 10

  1. HI

    I’m faizal from india. Could you please help me to configure additional Interface and ip_forwarding in zone server.

    i have T5220, which has 5 non-global and 1 global zone. all zone having shared IP. so in this case how to configure additional interface and also ip_forwarding in non-global zone.

    thanks in advance

  2. hi Faizal,

    If you want to configure another device on your zone you can do the same thing like when you add the first interface, you can attach it to any physical interface. while for ip forwarding, currently there are nothing particular about it, just do the samething like you configure ip forwarding in typical host. Hope it can help you 😀

  3. I have an active-active cluster consists of two Sun Fire V490 server running Solaris 9 and are connected to an EMC disk array which is a database and I want to virtualize the cluster on a server T5220 on Solaris 10. How do I do?

  4. Hi Shane,

    If that is the requirement, then you can start by creating two zones, and to make it as active-active cluster you can configure it using SUN Cluster or any other cluster software. For cluster configuration you need to find the how to some where, since I don’t have the knowledge 😀

  5. Hi and thank you tazlambert! But if I create images for directly migrating solaris 9 systems into zones on the T5220, do you think there will be no worries about configuration? Although that is not the same platform

  6. is there any particular reason that you need to create the image? I mean what configuration that you need to bring to the new server. For me I prefer to create from scratch using Solaris 10, then try to migrate all the settings in Solaris 9.

    Anyway you can create a branded zone, where it can host different OS version.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s