System Administration Guide: Oracle Solaris 9 Containers

Chapter 5 Installing the solaris9 Zone

This chapter covers installing a solaris9 branded zone.

The zoneadm Command

The zoneadm command described in the zoneadm(1M) man page is the primary tool used to install and administer non-global zones. Operations using the zoneadm command must be run from the global zone. The following tasks can be performed using the zoneadm command:

Migration Process

In addition to unpacking files from the Solaris 9 archive, the install process performs checks, required postprocessing, and other functions to ensure that the zone is optimized to run on the host. If you are migrating a zone to a new host, see Zone Migration and Initial Boot.

solaris9 Zone Installation Images

Types of Images

Image sysidcfg Status

The sample Solaris 9 image provided by Sun has been processed using the sys-unconfig command described in sys-unconfig(1M). That is, it does not have a hostname or name service configured, which is also known as "as-manufactured." See How to Log In to the Zone Console to Complete System Identification.

If you created a Solaris 9 system archive from an existing system and use the -p (preserve sysidcfg) option when you install the zone, then the zone will have the same identity as the system used to create the image.

If you use the -u (sys-unconfig) option when you install the target zone, the zone produced will not have a hostname or name service configured.


Caution – Caution –

You must use either the -p option or the -u option. If you do not specify one of these two options, an error results.


ProcedureHow to Install the Zone

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


Note –

This example procedure uses the blank archive image, solaris9-image.flar. This archive is in the sys-unconfig state. See Software Download to obtain this file.

For information on creating images of Solaris 9 systems, see Creating the Image for Directly Migrating Solaris 9 Systems Into Zones.


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

  2. Install the configured zone s9-zone by using the zoneadm command with the install -a option and the path to the archive.


    global# zoneadm -z s9-zone install -u -a /net/server/s9_image.flar
    

    You will see various messages as the installation completes. This can take some time.


    Note –

    To retain the sysidcfg identity from a system image that you created without altering the image, use the -p option after the install subcommand. To remove the system identity from a system image that you created without altering the image, use the -u option. The sys-unconfig occurs to the target zone.


  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 -cv
    

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              native     shared
     -  s9-zone  configured   /export/home/s9-zone         solaris9     shared
    • 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      /                              native     shared
     -  s9-zone  installed    /export/home/s9-zone         solaris9     shared

Example 5–1 solaris9 Zone Installation


# zoneadm -z s9-zone install -a /net/machinename/s9_image.flar
      Log File: /var/tmp/s9-zone.install.21207.log
        Source: /net/machinename/s9_image.flar
    Installing: This may take several minutes...
Postprocessing: This may take a minute...

        Result: Installation completed successfully.
      Log File: /export/home/s9-zone/root/var/log/s9-zone.install.21207.log

Installer Options

Option 

Description 

-a

Location of archive from which to copy system image. Full flash archive and cpio, gzip compressed cpio, bzip compressed cpio, and level 0 ufsdump are supported. Refer to the gzip man page available in the SUNWsfman package.

-d

Location of directory from which to copy system image. 

-p

Preserve system identity. 

-s

Install silently. 

-u

sys-unconfig the zone.

-v

Verbose output. 

Troubleshooting

If an installation fails, review the log file. On success, the log file is in two places: /var/tmp in the global zone, and /var/log inside the zone. On failure, the log file is in /var/tmp.

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. See How to Uninstall a Zone in System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones for more information.