By default, a kernel zone is given one virtual CPU upon creation. You can alter the number of virtual CPUs by adding and modifying the virtual-cpu resource.
Use the dedicated-cpu zonecfg resource property to dedicate a host CPU to the kernel zone.
Note that if you have already defined the dedicated-cpu zonecfg resource, the default number of virtual CPUs configured in the virtual platform matches the lower value of the ncpus range inside the dedicated-cpu zonecfg resource. If both resources exist, they are cross-checked for consistency. See the zonecfg(1M) man page for further information.
See Chapter 1, How to Plan and Configure Non-Global Zones, in Creating and Using Oracle Solaris Zones for general information on how to set the virtual-cpu and dedicated-cpu zone resources.
Example 1-1 Adding Additional Virtual CPUs to a Kernel ZoneThis example shows how to add additional virtual CPUs to the kernel zone kzone1.
global# zonecfg -z kzone1 zonecfg:kzone1> info virtual-cpu zonecfg:kzone1> add virtual-cpu zonecfg:kzone1:virtual-cpu> set ncpus=8 zonecfg:kzone1:virtual-cpu> end zonecfg:kzone1> info virtual-cpu virtual-cpu: ncpus: 8 zonecfg:kzone1> exitExample 1-2 Adding a Dedicated CPU to a Kernel Zone
This example shows how to add a dedicated CPU to the kernel zone kzone1.
global# zonecfg -z kzone1 zonecfg:kzone1> info dedicated-cpu zonecfg:kzone1> add dedicated-cpu zonecfg:kzone1:dedicated-cpu> set ncpus=8 zonecfg:kzone1:dedicated-cpu> end zonecfg:kzone1> info dedicated-cpu ncpus: 8 zonecfg:kzone1> exit
zonecfg:kzone1> info dedicated-cpu dedicated-cpu: ncpus: 8