How to Create and Deploy a Non-Global Zone
If you plan to install other packages in addition to the default solaris-small-server
package, make sure that you have properly prepared the manifest. Also, if you want to automate the system configuration of the zone, make sure that you have created and prepared the configuration profile. See Using Manifests and Configuration Profiles.
Unless specified otherwise, all the procedures in this guide assume that you are not working directly on the server system that hosts the zones. Rather, you are remotely connected to the system through a secure shell session.
Example 2-1 Creating a Non-Global Zone With a System Configuration Profile
This example shows how a zone named zoneA
is created based on the following assumptions:
-
The zone uses the default
solaris
brand. -
The properties
zonepath
andautoboot
are set. -
The
physical
property of thenet
resource is set. -
For its root file system,
zoneA
will userpool/zones/
, whose mountpoint is/zones
. -
A profile is used to automate the zone's system configuration.
-
Only the default package is installed, and therefore, no special manifest is created.
-
All necessary rights, both zone related and non-zone related, have been granted.
global$ pfbash Create the profile. Provide information in the SCI tool. global$ sysconfig create-profile -o /var/tmp Create the zone and set zone properties. global$ zonecfg -z zoneA Use ‘create’ to begin configuring a new zone. zonecfg:zoneA> create create: Using system default template ‘SYSdefault’ zonecfg:zoneA> set autoboot=true zonecfg:zoneA> set zonepath=/zones/zoneA zonecfg:zoneA> add net zonecfg:zoneA:net> set physical=net1 zonecfg:zoneA:net> end zonecfg:zoneA> exit global$ Install the zone. global$ zoneadm -z zoneA install -c /var/tmp/sc_profile.xml Boot the zone. global$ zoneadm -z zoneA boot global$
Example 2-2 Creating a Non-Global Zone With Default Settings
This example shows how a zone named zoneB
is created with default settings and based on the following assumptions:
-
The zone uses the default
solaris
brand. -
Only the default package is installed, and therefore, no special manifest is created.
-
All necessary rights, both zone related and non-zone related, have been granted.
-
Because no configuration profile is used, system configuration of the zone is completed manually.
global$ pfbash Create the zone. global$ zonecfg -z zoneB create global$ Install the zone. global$ zoneadm -z zoneB install Boot the zone. global$ zoneadm -z zoneB boot Connect to console then configure system. global$ zlogin -C zoneB [Connected to zone 'zoneB' console] ... SC profile successfully generated as /etc/svc/profile/incoming/config/sc_profile.xml Exiting System Configuration Tool. Log is available at logfilename Booting to milestone "all". Hostname: zone-hostname zone-hostname console login: username Password: password username@zone-hostname:~$ Log out of zone. username@zone-hostname:~$ exit logout zone-hostname console login: ~. zone-hostname console login: Connection to global-zone is closed.