Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015
 
 

How to Rename a Zone by Using the zonecfg Command

This procedure can be used to rename zones that are in either the configured state or the installed state.

Note that zones with either rootzpool or zpool resources cannot be renamed in the installed state because the zonename is part of the existing zpool name. To rename these zones, see “Renaming Zones on Shared Storage” at the end of this procedure.

You must be the global administrator in the global zone or a user with the correct rights profile to perform this procedure.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Select the zone to be renamed, my-zone in this procedure.
    global# zonecfg -z my-zone
  3. Change the name of the zone, for example, to newzone.
    zonecfg:my-zone> set zonename=newzone
  4. Commit the change.
    zonecfg:newzone> commit
  5. Exit the zonecfg command.
    zonecfg:newzone> exit

    Committed changes made through zonecfg take effect the next time the zone is booted.