Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: April 2019

How to Obtain the UUID of an Installed Non-Global Zone

A universally unique identifier (UUID) is assigned to a zone when it is installed. Obtain the UUID by using zoneadm with the list subcommand and the –c –p options. The UUID is the fifth field of the display.

  1. Become a zone administrator.

    For more information, see Assigning Limited Rights to Zone Administrators.

  2. View the UUIDs for zones that have been installed.
    global$ zoneadm list -cp

    You will see a display similar to the following:

Example 1  How to Obtain the UUID for a Specific Zone

Use the following command to obtain the UUID for test_zone:

$ zoneadm list -cp | grep test_zone | cut -f 5 -d:

You will see a display similar to the following:

Example 2  How to Use the test_zone UUID in a Command
global$ zoneadm -z test_zone -u 95180a6d-fab2-4363-ee33-81ba6e84a84f list -v

You will see a display similar to the following:

ID NAME             STATUS      PATH                         BRAND      IP
3 test_zone         running     -                            solaris-kz excl

If both –u uuid-match and –z zonename are present, the match is done based on the UUID first. If a zone with the specified UUID is found, that zone is used, and the –z parameter is ignored. If no zone with the specified UUID is found, then the system searches by the zone name.

About the Zone UUID

Zones can be uninstalled and reinstalled under the same name with different contents. Zones can also be renamed without the contents being changed. For these reasons, the UUID is more reliable than the zone name.

See Also

For more information, see zoneadm(1M) and libuuid(3LIB).