System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

ProcedureHow to Install an lx Branded Zone

This procedure is used to install a configured lx branded zone. Once the zone is installed, all software configuration and management has to be done by the zone administrator using Linux tools from inside the zone.

See Example 35–1, Example 35–2, and Example 35–3 for examples of zone installation command lines using the different distribution paths. If you install from discs or from an ISO image, you must specify Sun package cluster categories. See lx Branded Zone Installation Methods for information on package cluster categories.

Note that you can verify a zone prior to installing it. If you skip this procedure, the verification is performed automatically when you install the zone. The procedure is documented in (Optional) How to Verify a Configured Zone Before It Is Installed.

You must be the global administrator in the global zone to perform this procedure.


Note –

In Step 3, if the zonepath is on ZFS, the zoneadm install command automatically creates a ZFS file system (dataset) for the zonepath when the zone is installed. You can block this action by including the -x nodataset parameter.


  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. (Optional) If you intend to install from DVD or CD, enable volfs on your system and verify that it is running.


    global# svcadm enable svc:/system/filesystem/volfs:default
    

    global# svcs | grep volfs
    

    You will see a display similar to the following:


    online  17:30 svc:/system/filesystem/volfs:default
  3. Install the configured zone lx-zone by using the zoneadm command with the install option and the path to the archive.

    • Install the zone, automatically creating a ZFS file system if the zonepath is on ZFS.


      global# zoneadm -z lx-zone install -d archive_path
      

      The system will display:


      A ZFS file system has been created for this zone.
    • Install the zone that has a zonepath on ZFS, but do not automatically create the ZFS file system.


      global# zoneadm -z lx-zone install -x nodataset -d archive_path
      

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


    Note –

    If you do not specify archive_path, the default is CD.


  4. (Optional) If an error message is displayed and the zone fails to install, type the following to get the zone state:


    global# zoneadm -z lx-zone list -iv
    
    • 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 lx-zone uninstall
      

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

  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      /                              native     shared
     -  lx-zone  installed    /export/home/lx-zone           lx         shared

Example 35–1 Install Command Using a CentOS Compressed tar Archive


global# zoneadm -z lx-zone install -d /export/centos_fs_image.tar.bz2


Example 35–2 Install Command Using CentOS CDs

For CD or DVD installation, volfs must be enabled on your system. You must specify a software cluster package. For example, use development to install a full environment, or type the names of particular clusters. If you do not specify a cluster package, desktop is installed by default. The CD device is /cdrom/cdrom0.


global# zoneadm -z lx-zone install -d /cdrom/cdrom0 development


Example 35–3 Install Command Using CentOS ISO Images

You must specify a software cluster package. Use development to install a full environment, or specify particular clusters. If you do not specify a cluster package, desktop is installed by default. The CentOS ISO images reside in the directory /export/centos_3.7.


global# zoneadm -z lx-zone install -d /export/centos_3.7 development

See Also

For more information on datasets, see Oracle Solaris ZFS Administration Guide

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.