JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Oracle Solaris Zones, Oracle Solaris 10 Containers, and Resource Management     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Part I Oracle Solaris Resource Management

1.  Introduction to Resource Management

2.  Projects and Tasks (Overview)

3.  Administering Projects and Tasks

4.  Extended Accounting (Overview)

5.  Administering Extended Accounting (Tasks)

6.  Resource Controls (Overview)

7.  Administering Resource Controls (Tasks)

8.  Fair Share Scheduler (Overview)

9.  Administering the Fair Share Scheduler (Tasks)

10.  Physical Memory Control Using the Resource Capping Daemon (Overview)

11.  Administering the Resource Capping Daemon (Tasks)

12.  Resource Pools (Overview)

13.  Creating and Administering Resource Pools (Tasks)

14.  Resource Management Configuration Example

Part II Oracle Solaris Zones

15.  Introduction to Oracle Solaris Zones

16.  Non-Global Zone Configuration (Overview)

17.  Planning and Configuring Non-Global Zones (Tasks)

18.  About Installing, Halting, Uninstalling, and Cloning Non-Global Zones (Overview)

19.  Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)

Zone Installation (Task Map)

Installing and Booting Zones

(Optional) How to Verify a Configured Zone Before It Is Installed

How to Install a Configured Zone

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

How to Mark an Installed Non-Global Zone Incomplete

(Optional) How to Transition the Installed Zone to the Ready State

How to Boot a Zone

How to Boot a Zone in Single-User Mode

Where to Go From Here

Halting, Rebooting, Uninstalling, Cloning, and Deleting Non-Global Zones (Task Map)

Halting, Rebooting, and Uninstalling Zones

How to Halt a Zone

How to Reboot a Zone

How to Uninstall a Zone

Cloning a Non-Global Zone on the Same System

How to Clone a Zone

How to Clone a Zone from an Existing Snapshot

Deleting a Non-Global Zone From the System

How to Remove a Non-Global Zone

20.  Non-Global Zone Login (Overview)

21.  Logging In to Non-Global Zones (Tasks)

22.  Moving and Migrating Non-Global Zones (Tasks)

23.  About Packages on an Oracle Solaris 11 Express System With Zones Installed

24.  Oracle Solaris Zones Administration (Overview)

25.  Administering Oracle Solaris Zones (Tasks)

26.  Troubleshooting Miscellaneous Oracle Solaris Zones Problems

Part III Oracle Solaris 10 Zones

27.  Introduction to Oracle Solaris 10 Zones

28.  Assessing an Oracle Solaris 10 System and Creating an Archive

29.  (Optional) Migrating an Oracle Solaris 10 native Non-Global Zone Into an Oracle Solaris 10 Container

30.  Configuring the solaris10 Branded Zone

31.  Installing the solaris10 Branded Zone

32.  Booting a Zone and Zone Migration

33.  solaris10 Branded Zone Login and Post-Installation Configuration

Glossary

Index

Installing and Booting Zones

Use the zoneadm command described in the zoneadm(1M) man page to perform installation tasks for a non-global zone. You must be the global administrator or a user with appropriate authorizations to perform the zone installation. The examples in this chapter use the zone name and zone path established in Configuring, Verifying, and Committing a Zone.

(Optional) How to Verify a Configured Zone Before It Is Installed

You can verify a zone prior to installing it. One of the checks performed is a check for sufficient disk size. If you skip this procedure, the verification is performed automatically when you install the zone.

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Verify a configured zone named my-zone by using the -z option with the name of the zone and the verify subcommand.
    global# zoneadm -z my-zone verify

    This message regarding verification of the zone path will be displayed:

    Warning: /zones/my-zone does not exist, so it cannot be verified.
    When 'zoneadm install' is run, 'install' will try to create
    /zones/my-zone, and 'verify' will be tried again,
    but the 'verify' may fail if:
    the parent directory of /zones/my-zone is group- or other-writable
    or
    /zones/my-zone overlaps with any other installed zones.

    However, if an error message is displayed and the zone fails to verify, make the corrections specified in the message and try the command again.

    If no error messages are displayed, you can install the zone.

How to Install a Configured Zone

This procedure is used to install a configured non-global zone. For information on installation options, see How Zones Are Installed.

The zone must reside on its own ZFS dataset. Only ZFS is supported. The zoneadm install command automatically creates a ZFS file system (dataset) for the zonepath when the zone is installed. If a ZFS dataset cannot be created, the zone is not installed.

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Install the configured zone my-zone by using the zoneadm command with the install subcommand, automatically creating a ZFS dataset for the zonepath ZFS. Note that the parent directory of the zone path must also be a dataset, or the file system creation will fail.
    • Install the zone from the repository, also using the -e option to install additional packages:
      global# zoneadm -z my-zone install -c certificate_file -k key_file -P publisher=uri -e pkgA -e pkgB ...
    • Install the zone from an image:
      global# zoneadm -z my-zone install -a archive -s -u
    • Install the zone from a directory:
      global# zoneadm -z my-zone install -d path -p -v
    • Install the zone from an incorporation, such as the approximately 3–gigabyte slim_install incorporation:
      global# zoneadm -z my-zone install -e slim_install

      Then, remove the slim_install incorporation:

      global# pkg -R /zones/my-zone/root uninstall slim_install

      Removing the slim_install incorporation does not remove any of the dependent software installed by this incorporation. It removes the incorporation from the zone so that the zone matches what would be seen on a physical system.

    The system will display that a ZFS dataset has been created for this zone.

    You will see various messages as the files and directories needed for the zone's root file system are installed under the zone's root path.

  3. (Optional) If an error message is displayed and the zone fails to install, type the following to get the zone state:
    global# zoneadm -z my-zone list -v
    • If the state is listed as configured, make the corrections specified in the message and try the zoneadm install command again.

    • If the state is listed as incomplete, first execute this command:

      global# zoneadm -z my-zone uninstall

      Then make the corrections specified in the message, and try the zoneadm install command again.

  4. When the installation completes, use the list subcommand with the -i and -v options to list the installed zones and verify the status.
    global# zoneadm list -iv

    You will see a display that is similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              ipkg       shared
     -  my-zone  installed    /zones/my-zone                 ipkg       shared
Troubleshooting

If a zone installation is interrupted or fails, the zone is left in the incomplete state. Use uninstall -F to reset the zone to the configured state.

Next Steps

This zone was installed with the minimal network configuration described in Chapter 12, Managing Services (Tasks), in System Administration Guide: Basic Administration by default. You can switch to the open network configuration, or enable or disable individual services, when you log in to the zone. See Switching the Zone to a Different Networking Service Configuration or Enabling a Service for details.

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. The UUID can be obtained by using zoneadm with the list subcommand and the -p option. The UUID is the fifth field of the display.

Example 19-1 How to Use the Zone UUID in a Command

global# zoneadm -z my-zone -u 61901255-35cf-40d6-d501-f37dc84eb504:shared list -v

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 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 a more reliable handle than the zone name.

See Also

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

How to Mark an Installed Non-Global Zone Incomplete

If administrative changes on the system have rendered a zone unusable or inconsistent, it is possible to change the state of an installed zone to incomplete.

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Mark the zone testzone incomplete.
    global# zoneadm -z testzone mark incomplete
  3. Use the list subcommand with the -i and -v options to verify the status.
    global# zoneadm list -iv

    You will see a display that is similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              ipkg       shared
     -  my-zone  installed    /zones/my-zone                 ipkg       shared
     -  testzone incomplete   /zones/testzone                ipkg       shared
Marking a Zone Incomplete

The -R root option can be used with the mark and list subcommands of zoneadm to specify an alternate boot environment. See zoneadm(1M) for more information.


Note - Marking a zone incomplete is irreversible. The only action that can be taken on a zone marked incomplete is to uninstall the zone and return it to the configured state. See How to Uninstall a Zone.


(Optional) How to Transition the Installed Zone to the Ready State

Transitioning into the ready state prepares the virtual platform to begin running user processes. Zones in the ready state do not have any user processes executing in them.

You can skip this procedure if you want to boot the zone and use it immediately. The transition through the ready state is performed automatically when you boot the zone.

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Use the zoneadm command with the -z option, the name of the zone, which is my-zone, and the ready subcommand to transition the zone to the ready state.
    global# zoneadm -z my-zone ready
  3. At the prompt, use the zoneadm list command with the -v option to verify the status.
    global# zoneadm list -v

    You will see a display that is similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              ipkg       shared
     1  my-zone  ready        /zones/my-zone                 ipkg       shared

    Note that the unique zone ID 1 has been assigned by the system.

How to Boot a Zone

Booting a zone places the zone in the running state. A zone can be booted from the ready state or from the installed state. A zone in the installed state that is booted transparently transitions through the ready state to the running state. Zone login is allowed for zones in the running state.


Tip - Note that you perform the internal zone configuration when you initially log in to the zone. This is described in Performing the Initial Internal Zone Configuration.

If you plan to use an /etc/sysidcfg file to perform initial zone configuration, as described in How to Use an /etc/sysidcfg File to Perform the Initial Zone Configuration, create the sysidcfg file and place it the zone's /etc directory before you boot the zone.


You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Use the zoneadm command with the -z option, the name of the zone, which is my-zone, and the boot subcommand to boot the zone.
    global# zoneadm -z my-zone boot
  3. When the boot completes, use the list subcommand with the -v option to verify the status.
    global# zoneadm list -v

    You will see a display that is similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              ipkg       shared
     1  my-zone  running      /zones/my-zone                 ipkg       shared

Example 19-2 Specifying Boot Arguments for Zones

Boot a zone using the -m verbose option:

global# zoneadm -z my-zone boot -- -m verbose

Reboot a zone using the -m verbose boot option:

global# zoneadm -z my-zone reboot -- -m verbose

Zone administrator reboot of the zone my-zone, using the -m verbose option:

my-zone# reboot -- -m verbose
Troubleshooting

If a message indicating that the system was unable to find the netmask to be used for the IP address specified in the zone's configuration displays, see netmasks Warning Displayed When Booting Zone. Note that the message is only a warning and the command has succeeded.

How to Boot a Zone in Single-User Mode

You must be the global administrator or a user with appropriate authorizations in the global zone to perform this procedure.

  1. Be superuser, or have equivalent authorizations.

    For more information about roles, see Configuring and Using RBAC (Task Map) in System Administration Guide: Security Services.

  2. Boot the zone in single-user mode.
    global# zoneadm -z my-zone boot -- -s

Where to Go From Here

To log in to the zone and perform the initial internal configuration, see Chapter 20, Non-Global Zone Login (Overview) and Chapter 21, Logging In to Non-Global Zones (Tasks).