Installing and Administering Solaris Container Manager 3.6

Chapter 6 Managing Zones

This chapter contains procedures for creating, using, and managing zones on Solaris 10 systems.

The following topics are discussed:

Zones Overview

A Solaris 10 feature, zones provide an isolated and secure environment for running applications. Zones give you a way to create virtualized operating system environments within an instance of Solaris. Zones allow one or more processes to run in isolation from other processes on the system. For example, a process that runs in a zone can send signals only to other processes in the same zone, regardless of user ID and other credential information. If an error occurs, it affects only the processes that run within the zone.

Each zone can have its own IP address, file system, unique root user name and password file, and name server.

Every Solaris 10 system contains a global zone. The global zone is the default zone for the system and is used for system-wide administration. The global zone cannot be configured, installed, or uninstalled.

The upper limit for the number of zones on a system is 8192. The number of zones that can be effectively hosted on a single system is determined by the total resource requirements of the application software running in all of the zones.

Container Manager enables you to create, delete, modify, copy, halt and reboot non-global zones. Container Manager also can discover existing zones, detect zone changes, monitor and archive a zone's CPU, memory and network utilization, and generate zone up or zone down alarms.


Note –

You must be a zone administrator to manage (create, modify, copy, delete, boot, shut down) non-global zones. The zone administrators are specified while setting up the Solaris Container Manager software.


For more information about zones, see Chapter 16, Introduction to Solaris Zones, in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

Non-Global Zone States

You can use Container Manager to create non-global zones.

A non-global zone can be in one of the following states:

For more information about zone states, see Non-Global Zone State Model in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.


Note –

A global zone is always in “running” state.


Creating Non-Global Zones

You can create a non-global zone to keep the applications running inside this zone isolated from other applications.

Before You Begin

You must have a resource pool with available CPU shares. For instructions about creating a new resource pool, see Creating New Resource Pools.

ProcedureTo Create a Non-Global Zone

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Hosts view by selecting the Hosts tab in the navigation window.

    A list of hosts is displayed in the navigation window.

  3. Select a Solaris 10 host.

  4. Select the Zones tab.

  5. Click the New Zone button.

    The New Zone wizard appears.

    Figure 6–1 Zone Creation Parameters Window

    Parameters for Zone Creation

  6. Type the appropriate values for the fields: zone name, zone host name, zone path, IP address, and network interface.

    The zone host name is the unique name for the zone as a virtual host. It is not the host name or the machine name.

    The zone path is an absolute path and starts from the root (/) directory.


    Note –

    If the directory given in the zone path field exists, the permission for the root directory must be 700. Otherwise, the zone is not created.

    If the directory given in the zone path field does not exist, the Solaris Container Manager creates a directory with this name and assigns 700 permission to the root directory.


    Each zone can have network interfaces that should be configured when the zone transitions from the “installed” state to the “ready” state.

  7. (Optional) Select the Enabled check box, if you want the zone to automatically reboot when the system reboots.

  8. Type the root user name.

    Figure 6–2 Zone Attributes Window

    Attributes for Zones

  9. (Optional) Select the appropriate values in the Locale, Terminal Type, Naming Service, and Time Zone lists.

    Locale specifies the language that will be used for this zone.

    Terminal type specifies the type of the terminal.

    Naming service translates host names to IP addresses and IP addresses to host names.

    Time zone specifies the time zone for the zone.

  10. Select a resource pool for the zone.

  11. Type the appropriate values in the CPU Shares and Project CPU Shares fields.

    Figure 6–3 CPU Shares Window

    CPU Shares for Zones

    The CPU Shares field specifies the number of CPU shares that is allocated to this zone from the resource pool. This number must be less than or equal to the CPU shares that are available for the resource pool.

    The Project CPU Shares field specifies the number of CPU shares that is allocated to the projects in the zone.

  12. (Optional) Type the minimum input bandwidth and output bandwidth for the IP quality of service feature.

    Figure 6–4 IPQoS Attributes Window

    Attributes for IPQoS feature

  13. Choose whether to configure additional attributes for the zone.

    • If you want to configure additional attributes for the zone, select the Yes option and click Next.

      Type the additional IP addresses for this zone and select the appropriate network interfaces.

      Type the device directories that are to be configured for this zone.

      Type the details of the additional file systems that are to be mounted in this zone.

      Type the directories that contain packaged software that this zone shares with the global zone.

      For more information about these additional zone attributes, see Zone Configuration Data in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

      Review the selections that you made for the zone and Click Finish to save your changes.

    • If you do not want to configure additional attributes for the zone, select the No option and click Next.

      Review the selections that you made for the zone and Click Finish to save your changes.

    The information in the zones table is updated with the new zone. When a zone is created, it will be in an “incomplete” state. After inheriting certain packages from the global zone, the zone will be changed to the “running” state.

Copying Non-Global Zones

When a non-global zone is copied, its properties are inherited to the new zone.

ProcedureTo Copy a Non-Global Zone

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Hosts view by selecting the Hosts tab in the navigation window.

    A list of hosts is displayed in the navigation window.

  3. Select a Solaris 10 host.

  4. Select the Zones tab.

  5. Select the option button next to the non-global zone name.

  6. Click the Zone Copy button.

  7. Type the appropriate parameters and click OK.

    Figure 6–5 Zone Copy Window

    Attributes for Zone Copy

    During zone copy, the following attributes take their default values.

    Attribute 

    Default Value 

    Terminal type 

    dtterm 

    Locale 

    Time zone 

    GMT 

    You can change the default values of these attributes when the zone is copied and is in “running” state.

    The information in the zones table is updated with the new zone. When a zone is copied, it will be in the “configured” state. After inheriting certain packages from the global zone, the zone will be changed to the “running” state.

Deleting, Booting, or Shutting Down Non-Global Zones

You can change the state of a zone according to your needs.

ProcedureTo Delete, Boot, or Shut Down a Non-Global Zone

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Hosts view by selecting the Hosts tab in the navigation window.

    A list of hosts is displayed in the navigation window.

  3. Select a Solaris 10 host.

  4. Select the Zones tab.

  5. Select the option button next to the non-global zone name.

  6. Click the Delete, Boot, or Shutdown button.

    When a zone is booted, it will be changed to the “running” state from the ”installed” state. When a zone is shut down, it will be changed to the “installed” state from the ”running” state.

Viewing the Log Files of Zones

ProcedureTo View the Log File of a Zone

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Hosts view by selecting the Hosts tab in the navigation window.

    A list of hosts is displayed in the navigation window.

  3. Select a Solaris 10 host.

  4. Select the Zones tab.

  5. Type the name of the zone in the field (located beneath the Zones table.)

  6. Click the Zone Log button.

    The log file for this zone appears.