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 Assigning Rights to Non-Root Users to Manage Zones in Creating and Using Oracle Solaris Zones.
global$ zonecfg -z s10-zone
If this is the first time you have configured this zone, you will see the following system message:
Use 'create' to begin configuring a new zone.
zonecfg:s10-zone> create -b zonecfg:s10-zone> 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:s10-zone> set ip-type=shared
zonecfg:s10-zone> add net
zonecfg:s10-zone:net> Set physical=net0
zonecfg:s10-zone:net> set address=10.6.10.233/24
zonecfg:s10-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:s10-zone> add dataset
zonecfg:s10-zone> set name=tank/sales
zonecfg:s10-zone> end
zonecfg:s10-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 1, Configuration Resources for Non-Global Zones in Oracle Solaris Zones Configuration Resources.
This guide also provides information about 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.3.