Contenues dansTrouver plus de documentationRessources d'assistance comprises | Télécharger cet ouvrage au format PDF (836 Ko)
Chapter 5 Installing the solaris8 ZoneThis chapter covers installing a solaris8 branded zone. The zoneadm CommandThe 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 ProcessIn addition to unpacking files from the Solaris 8 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. solaris8 Zone Installation ImagesTypes of Images
Image sysidcfg StatusThe sample Solaris 8 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 8 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. You must use either the -p option or the -u option. If you do not specify one of these two options, an error results.
|
global# zoneadm -z s8-zone install -u -a /net/server/s8_image.flar |
You will see various messages as the installation completes. This can take some time.
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.
(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 - s8-zone configured /export/home/s8-zone solaris8 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.
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 - s8-zone installed /export/home/s8-zone solaris8 shared |
# zoneadm -z s8-zone install -a /net/machinename/s8_image.flar
Log File: /var/tmp/s8-zone.install.21207.log
Source: /net/machinename/s8_image.flar
Installing: This may take several minutes...
Postprocessing: This may take a minute...
Result: Installation completed successfully.
Log File: /export/home/s8-zone/root/var/log/s8-zone.install.21207.log
|
|
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. |
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: Solaris Containers-Resource Management and Solaris Zones for more information.