How to Make Temporary Changes to the Running Zone

Perform this procedure to temporarily change the live configuration of a running zone and then restore the persistent configuration to undo the change.

  1. On the kernel zone host, become an administrator.
  2. Change the zone configuration.

    The sample command adds a disk in live mode and shows the command output.

    Note:

    The zonecfg commit command is not required. The zonecfg utility commits the changes when the command exits.
    global$ pfbash zonecfg -z kzone -r 'add device;set storage=dev:/dev/dsk/cNtXd;end'
    zone 'kzone': Checking: Adding device storage=dev:/dev/dsk/cNtXd
    zone 'kzone': Applying the changes
  3. When you no longer need the configuration change, return the zone to the persistent zone configuration.

    The sample command removes the temporary configuration change.

    global$ zoneadm -z kzone apply
    zone 'kzone': Checking: Removing device storage=dev:/dev/dsk/cNtXd
    zone 'kzone': Applying the changes

    Alternatively, you can reboot the zone to discard the live zone configuration changes and return to the persistent zone configuration.