Assigning CPUs to the Zone

This example shows how to dedicate specific CPUs or assign a range of CPUs for the zone to use.

global$ zonecfg -z zoneA
zonecfg:zoneA> add dedicated-cpu
zonecfg:zoneA:dedicated-cpu> set ncpus=1-2
zonecfg:zoneA:dedicated-cpu> set importance=10
zonecfg:zoneA:dedicated-cpu> end
zonecfg:zoneA> info
...
dedicated-cpu:
      ncpus: 1-2
      importance: 10
...
zonecfg:zoneA> exit
global$ Reboot or run zoneadm apply command.

Example 3-1 Making Persistent Changes to a Running Zone

This example specifies zonecfg commands to set the cpu-shares resource, clear the pool resource settings, and add an anet resource for the running zone zone1, then applies the changes to the persistent zone configuration.

global$ pfbash zonecfg -z zone1 "set cpu-shares=4;clear pool;add anet;"
global$ zoneadm -z zone1 apply
    zone1: Checking: set property cpu-shares=4
    zone1: Checking: clear property pool
    zone1: Checking: add anet linkname=myanet0
    zone1: Applying changes