Home > solaris > Creating Zones in Solaris 10

Creating Zones in Solaris 10

Zone is a virtual machine in solaris which isolates the processes. There are two kind of zones possible

1. Global zone

2. Non-Global zone ( or simply ‘zones’ or ‘containers’).

The Non-Global zones are made from the global zones. 

Now i gonna show, how to create zones in solaris 10. Lets get it started.

1. Create a separate filesystem for the zone if you want to….for my demo purpose, i’ll jus create a directory on my existing filesystem.

bash-3.00# mkdir /sunZone

bash-3.00# chmod 700 /sunZone/

2. Type in the following commands,

bash-3.00# zonecfg -z sunZone

sunZone: No such zone configured

Use ‘create’ to begin configuring a new zone.

zonecfg:sunZone> create

zonecfg:sunZone> set zonepath=/sunZone

zonecfg:sunZone> add net

zonecfg:sunZone:net> set physical=eri0

zonecfg:sunZone:net> set address=192.168.5.59

zonecfg:sunZone:net> end

zonecfg:sunZone> verify

zonecfg:sunZone> commit

zonecfg:sunZone> exit

3. You can also check all the configuration by typing info at the zone configuration mode.

zonecfg:sunZone> info

zonename: sunZone

zonepath: /sunZone/

brand: native

autoboot: false

bootargs:

pool:

limitpriv:

scheduling-class:

ip-type: shared

inherit-pkg-dir:

        dir: /lib

inherit-pkg-dir:

        dir: /platform

inherit-pkg-dir:

        dir: /sbin

inherit-pkg-dir:

        dir: /usr

net:

        address: 192.168.5.59

        physical: eri0

4. Now check whether the zone is created or not:

bash-3.00# zoneadm list -cv

  ID   NAME             STATUS           PATH                    BRAND    IP

   0   global            running           /                           native     shared

   -   sunZone        configured      /sunZone              native     shared

There is a zone state model in solaris which depicts the current state of the zone. In the above output, the staus is configured. In later part of the demo, this will change to installed and running.

IP is showing as shared coz the sunZone also is using the same NIC as the global zone. One other possible value for the IP type is exclusive.

5. Now lets install the configured zone:

bash-3.00# zoneadm -z sunZone install

Preparing to install zone <sunZone>.

Creating list of files to copy from the global zone.

Copying <2552> files to the zone.

Initializing zone product registry.

Determining zone package initialization order.

Preparing to initialize <1113> packages on the zone.

Initializing package <426> of <1113>: percent complete: 38%

-

-

-

- This will go on for a while

-

-

Initialized <1113> packages on zone.

Zone <sunZone> is initialized.

The file </sunZone/root/var/sadm/system/logs/install_log> contains a log of the zone installation.

6. Check the status of the zone:
bash-3.00# zoneadm list -cv

 ID   NAME             STATUS           PATH                 BRAND    IP

   0   global            running           /                       native     shared

   -   sunZone        installed      /sunZone              native     shared

7. Boot the zone:

bash-3.00# zoneadm -z sunZone boot

now check the status, its should be in running.

8. Login to zone:

bash-3.00# zlogin -C sunZone

This will take u to the configuration steps like, root password, time zone, language etc., 

finish all the steps, you are done creating your first zone.

9. Logout from the zone.

press ‘ ~.

 

  1. Arunprakash
    December 3, 2008 at 3:58 pm | #1

    I’m very new to Solaris field i want to know more about solaris and containers. arunpras29@gmail.com is my mail id pls send me some solaris documents.

  2. dotcom360
    December 30, 2008 at 1:45 pm | #2

    All the Solaris 10 Zones discussions has been archived here http://www.unixadmintalk.com/opensolaris-zones/

  3. AJith Nambiar
    April 28, 2009 at 11:53 pm | #3

    can you please help me how to create container in solaris 10 if any idea about this pls reply me in my email id

  4. sudarsan reddy
    December 2, 2009 at 10:46 pm | #4

    i am very beginer for the solaris. plz send solaris matirials for my id. And this is my id tsreddy1091@gmail.com

  5. vamsi
    October 12, 2010 at 3:44 pm | #5

    Hi.,
    I have seen how to create a zone. Its great and i did that. Can u help me to send the documents or materials of solaris clonig and migration briefly.

  6. Naresh
    October 12, 2010 at 3:47 pm | #6

    Hi.,
    I have seen how to create a zone. Its great and i did that. Can u help me to send the documents or materials of solaris clonig and migration briefly .

  7. Madhu
    December 18, 2010 at 12:40 pm | #7

    hi, i have seen the zones concept.it is very nice.

    please send me the jumpstart server meterials(how to configur the jupstart server)…
    and also please send the procss for NIS configuration to my mail id..
    please…..

  8. aneesh
    April 1, 2011 at 5:24 pm | #8

    hii

    i am also a beginer of solaris
    please sent basic materials to me
    anishgreysharp@gmail.com

  9. April 6, 2011 at 2:20 pm | #9

    Hi Freind,

    I read the Zones material it help me to study the Zones.

    Thanx for all.

    Regard’s
    Prashant

  10. chiranjeevi
    June 28, 2011 at 11:51 am | #10

    i am very beginer for the solaris. plz send solaris matirials for my id. And this is my id chirupandu7@gmail.com ……….ple…………………………………………

  11. Manju
    August 30, 2011 at 5:14 pm | #11

    Hi I am very new for Solaris and I am getting so many doubs on this so Pls send some simple documents ..Thanks Email: manju.gmn7@gmail.com

  12. September 5, 2011 at 4:36 pm | #12

    hi how to create big zone…

  13. Aravind
    September 15, 2011 at 3:16 pm | #13

    hi prasanna thank u so much…now i understand this concept…

  14. sunderbabu
    April 17, 2012 at 2:55 pm | #14

    hi Prasanna,

    Can u pls send me the complete docs for zones.my email is sunderbabu1@rediffmail.com

  15. moizuddin
    April 21, 2012 at 7:04 pm | #15

    Excellent presentation and explanation abut zones.Will you please send some more docs related to solaris to my mail ID : moizeng2007@gmail.com

  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

Follow

Get every new post delivered to your Inbox.