Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: August 2019
 
 

How to Configure Zone Properties and Resources

To configure and manage a non-global zone's resources and properties, you use zonecfg subcommands. Whether you do the configuration before or after the zone is installed, the syntax and sequence of steps remain the same.


Note -  For clarity, this procedure uses the default mode.
  1. Become a zone administrator.

    For more information, see Using Rights Profiles to Install and Manage Zones.

  2. Switch to interactive configuration.
    global$ zonecfg -z zonename
    zonecfg:zonename>
  3. For every resource, use the add, set, and end subcommands in sequence to configure the resource's properties.
    zonecfg:zonename> add resource
    zonecfg:zonename:resource> set property=value
    zonecfg:zonename:resource> end

    Use the set subcommand repeatedly as needed to configure different properties of the resource. Use the end subcommand to end the resource configuration and return to the zone's main prompt.

  4. For properties that do not belong to any resource, set them from the zone's main prompt.
    zonecfg:zonename> set property=value
    zonecfg:zonename>

    You can set multiple properties and resources in a single configuration session. Proceed to the next step if you want to terminate the session.

  5. Return to the global zone.
    zonecfg:zonename> exit
    global$ 

    Before the exit subcommand returns you to the global zone, it first performs the actions of two separate subcommands which you can also independently run: verify which checks that the settings are valid and commit which saves the settings to stable storage.

  6. Apply the settings to the zone.

    Choose one of the following methods:

    • Issue the zoneadm apply command.

      You can use this command only if the zone is running. With this command, no zone reboot is required.

      global$ zoneadm -z zonename apply
      Checking: Adding resource property=setting
      Applying the changes.
    • Reboot the zone.
      global$ zoneadm -z zonename reboot