Perform this procedure to make live zone configuration changes that persist across reboots of the zone.
Before You Begin
Review the following documentation:
For more information, see Using Rights Profiles to Install and Manage Zones in Creating and Using Oracle Solaris Zones.
global$ pfbash zonecfg -z kzone "zonecfg-commands"
Specify one or more zonecfg subcommands.
For the format, see the zonecfg(8) man page.
global$ pfbash zoneadm -z kzone apply
This example shows a running kernel zone kz1 that has 16 virtual CPUs configured. The persistent configuration is changed to set the number of VCPUs to 8 and applied to the live configuration. The output shows what happens if the kernel zone cannot stop using some of the CPUs. This might occur if the kernel zone contains a solaris zone that is configured with the dedicated-cpu resource type, for instance.
The live zone reconfiguration tries to satisfy the request by skipping those CPUs that cannot be removed from the kernel zone (the guest) while trying to remove others. When the specified number of CPUs cannot be removed, the operation succeeds partially and the output shows the new number of virtual CPUs.
global$ pfbash zonecfg -z kz1 -r info virtual-cpu virtual-cpu: ncpus: 16 global$ zonecfg -z kz1 'select virtual-cpu;set ncpus=8;end’ global$ zoneadm -z kz1 apply zone 'kz1': Checking: Modifying virtual-cpu ncpus=8 zone 'kz1': Applying the changes zone 'kz1': error: dr-cpu failed for cpu id=15: Operation was blocked zone 'kz1': error: status: CPU is configured for use by the guest zone 'kz1': error: dr-cpu failed for cpu id=14: Operation was blocked zone 'kz1': error: status: CPU is configured for use by the guest ... operation continues to try to remove 8 virtual CPUs ... zone 'kz1': warning: operation succeeded partially for virtual cpus (requested: 8, final: 12) global$ zonecfg -z kz1 -r info virtual-cpu virtual-cpu: ncpus: 12