Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: August 2021
 
 

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.

Before You Begin

  1. On the kernel zone host, become an administrator.

    For more information, see Using Rights Profiles to Install and Manage Zones in Creating and Using Oracle Solaris Zones.

  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. (Optional) 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.

Troubleshooting

If the commit operation reports an error, see How to Recover From a Failure While Committing Live Zone Configuration Changes.