Go to main content

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

Updated: December 2018

Configuring the Oracle Solaris Kernel Zone

This section describes how to configure an Oracle Solaris kernel zone.

How to Configure a Kernel Zone

This procedure describes how to configure a kernel zone using the default kernel zone template, SYSsolaris-kz.This template configures four virtual CPUs and four Gbytes of memory. An additional template, SYSsolaris-kz-minimal, is available to configure a minimal kernel zone with one virtual CPU and two Gbytes of memory.

For an overview of zone template properties, see zonecfg template Property and Tokens in Oracle Solaris Zones Configuration Resources . For general information regarding zone configuration, see Chapter 1, How to Plan and Configure Non-Global Zones in Creating and Using Oracle Solaris Zones.

Before You Begin

Confirm kernel zone hardware support, software support, and memory configuration on your host system. See Verifying Hardware and Software Support on Kernel Zone Hosts and Tuning the ZFS ARC to Reserve Memory for Kernel Zones.

  1. Become a zone administrator.

    For more information, see Assigning Rights to Non-Root Users to Manage Zones in Creating and Using Oracle Solaris Zones.

  2. Create a new kernel zone configuration.

    The default solaris-kz branded zone template is SYSsolaris-kz. For example, on the system global, to create a new kernel zone configuration for the kernel zone, kzone1:

    global$ zonecfg -z kzone1
    Use 'create' to begin configuring a new zone.
    zonecfg:kzone1> create -t SYSsolaris-kz

    The remaining configuration steps in this procedure use the kernel zone kzone1.

  3. Add any additional kernel zone resources.

    You can set some kernel zone resources now or after the zone is configured. For more information, see About Configuring and Customizing Kernel Zone Resources.

  4. Commit the zone configuration.
    zonecfg:kzone1> commit
  5. Exit zonecfg.
    zonecfg:kzone1> exit
  6. (Optional) Verify the zone configuration.

    You can verify a zone prior to installation. If you skip this step, the verification is performed automatically when you install the zone. See How to Verify a Configured Zone Before It Is Installed in Creating and Using Oracle Solaris Zones.

    $ zoneadm -z zonename verify

    For example, to verify the kernel zone kzone1 on the system global:

    global$ zoneadm -z kzone1 verify

    If you see an error message 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.