Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015

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. Become an administrator.

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

  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:
      global# zoneadm -z my-zone install
    • Install the zone from the repository:
      global# zoneadm -z my-zone install -m manifest -c [ profile | dir ]
    • 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

    The system will display that a ZFS file system 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 list -v
    # zoneadm list -cvd
      ID NAME             STATUS      PATH                      BRAND    IP
       0 global           running     /                         solaris  shared
       - my-zone          configured  /zones/my-zone            solaris  excl
    • 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

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

  4. (Optional) If a storage object contains any preexisting partitions, zpools, or UFS file systems, the install fails and an error message is displayed.

    The source zone must be in the uninstalled state before the force subcommand can be used:

    zoneadm -z my-zone uninstall

    Then, continue the installation and overwrite any preexisting data by using the –x option to zoneadm install.

    -x force-zpool-import
    -x force-zpool-create=zpoolname
    -x force-zpool-create=zpoolname1,zpoolname2,zpoolname3
    -x force-zpool-create-all

    This option is similar to the zpool create –f command.

    -x force-zpool-create=zpoolname can be used one or more times.

  5. 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      /                              solaris    shared
     -  my-zone  installed    /zones/my-zone                 solaris    excl  


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 3, Administering Services, in Managing System Services in Oracle Solaris 11.2 by default. You can switch to the open network configuration, or enable or disable individual services, when you log in to the zone. See Enabling a Service for details.