You must be the global administrator or a user with the appropriate authorizations in the global zone to perform this procedure.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .
global# zonecfg -z s10-zone
If this is the first time you have configured this zone, you will see the following system message:
s10-zone: No such zone configured Use 'create' to begin configuring a new zone.
zonecfg:s10-zone> create -b set brand=solaris10
zonecfg:s10-zone> set zonepath=/zones/s10-zone
If set to true, the zone is automatically booted when the global zone is booted. Note that for the zones to autoboot, the zones service svc:/system/zones:default must also be enabled. The default value is false.
zonecfg:s10-zone> set autoboot=true
zonecfg:my-zone> set ip-type=shared
zonecfg:my-zone> add net
zonecfg:my-zone:net> Set physical=net0
zonecfg:my-zone:net> Set address=10.6.10.233/24
zonecfg:my-zone:net> end
This step can be performed more than once to add more than one network interface.
zonecfg:s10-zone> add fs
zonecfg:s10-zone:fs> set type=zfs
zonecfg:s10-zone:fs> set special=share/zone/s10-zone
zonecfg:s10-zone:fs> set dir=/opt/shared
zonecfg:s10-zone:fs> end
This step can be performed more than once to add more than one file system.
zonecfg:my-zone> add dataset
zonecfg:my-zone> set name=tank/sales
zonecfg:my-zone> end
zonecfg:my-zone> set hostid=80f0c086
zonecfg:s10-zone> verify
zonecfg:s10-zone> commit
zonecfg:s10-zone> exit
Note that even if you did not explicitly type commit at the prompt, a commit is automatically attempted when you type exit or an EOF occurs.
global# zonecfg -z s10-zone info
global# zonecfg -z s10-zone info hostid
Next Steps
global# zonecfg -z s10-zone export > s10-zone.config
See also
For additional components that can be configured using zonecfg, see Chapter 2, Non-Global Zone Configuration Overview, in Introduction to Oracle Solaris Zones . This guide also provides information on using the zonecfg command in either command-line or command-file mode. Note that for shared-IP zones, a static address must be assigned in a zonecfg net resource. For more information about adding ZFS file systems, see Adding ZFS File Systems to a Non-Global Zone in Managing ZFS File Systems in Oracle Solaris 11.2 .