Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: April 2019
 
 

How to Set zone.cpu-shares in the Global Zone

Use this procedure to persistently set shares in the global zone.

  1. Become a zone administrator.

    For more information, see Assigning Limited Rights to Zone Administrators.

  2. Ensure that the resource-mgmt service is enabled.
    $ svcs svc:/system/resource-mgmt:default
    STATE          STIME    FMRI
    disabled       Jan_08   svc:/system/resource-mgmt:default

    If the service is not online, enable it and check again.

    $ svcadm enable resource-mgmt:default
    $ svcs svc:/system/resource-mgmt:default
    STATE          STIME    FMRI
    online         Jan_12   svc:/system/resource-mgmt:default
  3. Use the zonecfg command.
    $ zonecfg -z global
  4. Set 5 shares for the global zone.
    zonecfg:global> set cpu-shares=5
  5. Exit zonecfg.
    zonecfg:global> exit