Creating Sparse Root Zone in Solaris
Monday Mar 17, 2008
CREATING SPARSE ROOT ZONE IN SOLARIS 10
Introduction
This page gives a list of command to define and install a S10 Zone.
The characteristics of the created zone is the following.
IP address : 10.12.147.71 (This machine should be down and we will be using this IP for the zone)
root path : /space/zone-jes
/usr, /lib, /sbin and /platform paths are not inherited from the global, but copied when the zone is installed, the new packages can be installed using this directory.
Prerequisites
In the following configurations, you have to enter some values and configure some tools to have a correct configuration.
Physical address : interface for external communication. You can retrieved used port by using 'ifconfig -a' command on the global zone.
The IP address must be unique on the network
A DNS or NIS has to contain this new virtual machine (IP address/Name)
Zonepath is pointing on a partition with 1Gb free space
Configuration
bash-2.05b# zonecfg -z zone-jes
zone-jes: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone-jes> create
zonecfg:zone-jes> set zonepath=/space/zone-jes
zonecfg:zone-jes> set autoboot=true
zonecfg:zone-jes> add net
zonecfg:zone-jes:net> set address=10.12.147.71 zonecfg:zone-jes:net> set physical=eri0 ( use ifconfig -a on the host machine and give the interface name obtained, in this case it is eri0 )--This will be displayed in the second line
zonecfg:zone-jes:net> end
zonecfg:zone-jes> info
zonepath: /space/zone-jes
autoboot: true
pool:
net:
address:10.12.147.71
physical: eri0
zonecfg:zone-jes> exit
Installation
bash-2.05b# zoneadm -z zone-jes install
Preparing to install zone
Creating list of files to copy from the global zone.
Copying <54268> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <769> packages on the zone.
Post-Installation
The first phase is to configure the zone in the network.
Either you use a configuration file with all informations regarding the node
Create sysidfile in the root of the zone
Path to use : /space/zone-jes/root/etc/sysidcfg
Content of the file:
system_locale=C
terminal=dtterm
network_interface=primary {
hostname=Hostname of the machine which is down
}
security_policy=NONE
name_service=DNS {
domain_name=eg:india.sun.com
name_server=129.158.227.31(FOR India)
}
timezone=Asia/Calcutta
root_password=(Login to the host machine and copy the encrypted password from /etc/shadow file)
Create the defaultdomain file
echo india.sun.com > /export/home1/zone-jes/root/etc/defaultdomain
Be carefull, the hostname must be defined in the DNS(It should be added to /etc/hosts file)
Acces management :
Put in comment the line
CONSOLE=/dev/console
In the /space/zone-jes/root/etc/default/login file
Or answer to questions after booting the zone (following paragraph) and connecting to the console
Starting the zone
bash-2.05b# zoneadm -z zone-jes boot
Update the /space/zone-jes/root/etc/hosts file with name and IP addresses
of the new host name.
You can log in the console of the zone from the global one using
zlogin -C zone-jes
(NB: if the zone is not configured, a list of question is requested to configure it)











Hi Prabhakar,
Thanks for your effort on Zone cre...