Subject: Solaris 10 - Zones - HOW-TO From: "fundu_gang" <deepak.cutinha at gmail dot com> Newsgroups: comp.unix.solaris Date: 9 Mar 2005 02:32:08 -0800 Hi All, I thought I should like to share this with all of you .. An exciting feature of Solaris 10 are Zones... In simple words a zone means of partitioning a single Solaris instance into isolated application environments called "zones." Each zone can be separately administered and each zone can run an independent set of applications. Zones allow one or more processes to run in isolation from other activity on the system. Processes running in a given zone cannot monitor or affect processes running in other zones. For example, a process running in a zone will only be able to send signals to other processes in the same zone, regardless of user id and other credential information. After going through the documentation and with some success I was able to create my first zone on our Solaris 10. I have listed the steps involved if you are interested to have a look. root@merenge # zoneadm list -cv ID NAME STATUS PATH 0 global running / root@merenge # zonecfg -z deepak deepak: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:deepak> create zonecfg:deepak> set zonepath=/deepak zonecfg:deepak> set autoboot=true zonecfg:deepak> add inherit-pkg-dir zonecfg:deepak:inherit-pkg-dir> set dir=/opt zonecfg:deepak:inherit-pkg-dir> end zonecfg:deepak> add net zonecfg:deepak:net> set address=10.10.1.22 zonecfg:deepak:net> set physical=eri0 zonecfg:deepak:net> end zonecfg:deepak> verify zonecfg:deepak> commit zonecfg:deepak> root@merenge # zoneadm list -cv ID NAME STATUS PATH 0 global running / - deepak configured /deepak root@merenge # zoneadm -z deepak install Preparing to install zone <deepak>. Creating list of files to copy from the global zone. Copying <2432> files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize <905> packages on the zone. Initialized <905> packages on zone. Zone <deepak> is initialized. Installation of <1> packages was skipped. Installation of these packages generated warnings: <SUNWcsr> The file </deepak/root/var/sadm/system/logs/install_log> contains a log of the zone installation. root@merenge # zoneadm -z deepak boot root@merenge # zoneadm list -cv ID NAME STATUS PATH 0 global running / 1 deepak running /deepak root@merenge # zlogin -C deepak [NOTICE: Zone rebooting] SunOS Release 5.10 Version Generic 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: deepak deepak console login: This completes the creation of a zone and can be used as an individual virtual OS inside my Solaris 10 box called merenge. Interesting stuff... Best Regards, Deepak Cutinha
Thanks, see also Dennis Clarke's review from about a year ago http://www.blastwave.org/docs/Solaris-10-b51/DMC-0002/dmc-0002.html
Also, see James Dickens' blog. http://uadmin.blogspot.com; I think he's added some things that Dennis didn't think of -- add-inherit-pkg-dir, for example.