Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: August 2021
 
 

How to Recover From a Failure While Committing Live Zone Configuration Changes

The configuration of a running zone can change externally while a live zone configuration is being edited. When this conflict occurs, the zonecfg commit command returns an error.

Perform this procedure to correct the error by reloading the zone configuration to show the updated version and then making your edits again.

  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. Issue the reload subcommand, make the correct configuration changes, and commit the change.

    This step assumes that you are still in the zonecfg session that failed to commit your temporary configuration changes.

    zonecfg:kzone> reload
    zonecfg:kzone> temporary-configuration-changes
    zonecfg:kzone> commit
Example 30  Recovering From Failed Temporary Zone Configuration Changes

The following example shows temporary configuration changes, an error message that the changes failed, recovery steps, and output confirming that the changes now succeeded.

Example configuration change in live mode
global$ pfbash zonecfg -z kzone1 -r
zonecfg:kzone1> add anet;set lower-link=net1;set maxbw=2G;end
zonecfg:kzone1> commit
zone 'kzone1': error: the live configuration has changed externally.
Trying to commit changes to externally changed live configuration
Please use reload to start again. Your local changes will be lost.

Reload the configuration 
zonecfg:kzone1> reload
Are you sure you want to reload (y/[n])? y

Repeat the configuration changes you previously attempted
zonecfg:kzone1> add anet;set lower-link=net1;set maxbw=2G;end
zonecfg:kzone1> commit

Command output shows the configuration changes now succeed
zone 'kzone1': Checking: Adding anet id=2
zone 'kzone1': Applying the changes
…