Use Live Zone Reconfiguration to reconfigure or report on the live configuration of kernel zones while the zones are running.
This section covers the following information:
Use the zonecfg utility edit modes to make configuration changes to the zone. You can change either the persistent stored configuration or the running live configuration. The zonecfg utility supports the following edit modes for use with Live Reconfiguration:
Create, modify, and list the persistent zone configuration stored on the stable storage. Parameters you changed in the default mode do not affect a running zone at the time you make the changes. The default mode is the primary way to maintain the zone configuration. This mode is backwards compatible.
To have the changes made in default mode take effect in the running zone, you must issue one of the following zoneadm commands:
Use the zoneadm apply command to load the updated persistent zone configuration so it is applied to the running zone.
Use the zoneadm reboot command to reboot the zone and read the updated persistent zone configuration.
Retrieve, inspect and edit the running live zone configuration. The live mode is available for a running zone only. Parameters you change in live mode take effect immediately after you use the commit subcommand to enable them in the live zone configuration.
Changes made in live mode are temporary. The changes remain active until the next zone reboot. For more information, see Temporary Changes to the Live Zone Configuration.
To make live zone configuration changes permanent, you apply the changes to the persistent zone configuration with the zoneadm apply command. For more information, see Persistent Changes to the Live Zone Configuration.
To enable live mode, use the –r option with the zonecfg command, which retrieves the live zone configuration instead of the persistent zone configuration.
global$ pfexec zonecfg -z kzone -r
You can work with the zonecfg -r command just as you do in default mode. The full set of zonecfg subcommands and both the interactive and the batch mode are supported.
Not all resources can be reconfigured in the live configuration. For a list of supported resource types and properties, see Live Zone Reconfiguration Support or Restriction for Resource Types and Global Properties in Oracle Solaris Zones Configuration Resources.
Use Live Zone Reconfiguration to perform the following tasks on a running kernel zone:
Report on and inspect the current live zone configuration
Make temporary changes in the live zone configuration
Apply changes made in the persistent configuration to the live zone configuration
Use the zonecfg and zoneadm commands to administer Live Zone Reconfiguration. You can make temporary or persistent changes to the zone configuration. Temporary changes are active until the next reboot. You do not need to reboot for changes to be applied to the persistent configuration.
Services are available within the zone with no downtime when you make the following configuration changes:
Changing resource controls
Changing network configuration
Changing the CPU resource pool
Adding or removing file systems
Adding or removing virtual and physical devices
For a list of supported resource types and properties during live zone reconfiguration, see Live Zone Reconfiguration Support or Restriction for Resource Types and Global Properties in Oracle Solaris Zones Configuration Resources.
You might want to make only temporary changes in the configuration of a running zone. For example, you might want to remove a resource from a zone temporarily while maintenance is performed on a device, or allocate a resource temporarily for a special purpose but not have it be present for the entire run of the zone. Such removals or additions of resources should not be done in the persistent zone configuration because they would cause a failure when the zone reboots and the resource is no longer available.
Parameters changed temporarily in live mode take effect immediately after you issue the zonecfg commit command. These changes are valid until the next zone reboot.
You use the zoneadm apply command to apply changes from the persistent zone configuration to the live zone configuration. You do not have to reboot for the changes to affect the running zone. For an example, see How to Make Persistent Configuration Changes to a Live Zone.
You can test run the effects of changes to the live zone configuration before putting those changes into effect by using the following options to the zonecfg commit and zoneadm apply commands:
Dry run mode. The command shows the effects of the changes to the configuration, but applies no changes to the running zone. Use the dry run mode to preview the actions that would be performed if you issued the zonecfg commit or zoneadm apply command to impact the live zone configuration.
Quiet mode. This mode suppresses all system messages and returns a status code only.
If the configuration of a running zone changes externally while you are modifying the configuration in either default mode or live mode, the zonecfg commit command will return an error. Some scenarios where this might occur include another administrator modifying the configuration, modifying resource controls, or changing network parameters of the zone using network administration commands.
If the configuration of a running zone changes during live reconfiguration, use the zonecfg reload subcommand to load the external configuration changes:
If you issue the zonecfg reload command in default mode, the command discards any uncommitted changes you have made and reloads the configuration from persistent storage.
If you issue the zonecfg reload command in live mode (the –r option), the command discards any uncommitted changes and retrieves an up-to-date live configuration of the running zone.
After the configuration is reloaded, you can repeat the configuration changes and commit.
See How to Recover From a Failure While Committing Live Zone Configuration Changes for an instructions to reload a zone configuration.