|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Oracle Solaris 9 Containers Oracle Solaris Legacy Containers|
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:
Verify a zone
Install a zone
Boot a zone
Display information about a running zone
Halt a zone
Reboot a zone
Uninstall a zone
Relocate a zone from one point on a system to another point on the same system
Provision a new zone based on the configuration of an existing zone on the same system
Migrate a zone, used with the zonecfg command
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.
You can use an image of a Solaris 9 system that has been fully configured with all of the software that will be run in the zone. See Creating the Image for Directly Migrating Solaris 9 Systems Into Zones.
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 - You must use either the -p option or the -u option. If you do not specify one of these two options, an error results.
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.
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.
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.
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
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.