Tuesday, May 3, 2011

Install zones


The zoneadm command is the primary tool used to install and administer non-global zones.

After you have configured a non-global zone, you should verify that the zone can be installed safely on your system's configuration. You can then install the zone. The files needed for the zone's root file system are installed by the system under the zone's root path.

A non-global zone is installed with the open networking configuration (generic_open.xml). The zone administrator can switch the zone to the limited networking configuration (generic_limited_net.xml) by using the netservices command. Specific services can be enabled or disabled by using SMF commands.

A successfully installed zone is ready for initial login and booting.
The method used to initially install packages in a Solaris installation is also the method used to populate a non-global zone.
The global zone must contain all the data necessary to populate a non-global zone. Populating a zone includes creating directories, copying files, and providing configuration information.
Only the information or data that was created in the global zone from packages is used to populate the zone from the global zone
Data from the following are not referenced or copied when a zone is installed:
·         Non-installed packages
·         Patches
·         Data on CDs and DVDs
·         Network installation images
·         Any prototype or other instance of a zone
In addition, the following types of information, if present in the global zone, are not copied into a zone that is being installed:
·         New or changed users in the /etc/passwd file
·         New or changed groups in the /etc/group file
·         Configurations for networking services such as DHCP address assignment, UUCP, or sendmail
·         Configurations for network services such as naming services
·         New or changed crontab, printer, and mail files
·         System log, message, and accounting files
If Solaris auditing is used, modifications to auditing files copied from the global zone might be required.
The following features cannot be configured in a non-global zone:
·         Solaris Live Upgrade boot environments
·         Solaris Volume Manager metadevices
·         DHCP address assignment in a shared-IP zone
·         SSL proxy server
The resources specified in the configuration file are added when the zone transitions from installed to ready. A unique zone ID is assigned by the system. File systems are mounted, network interfaces are set up, and devices are configured. Transitioning into the ready state prepares the virtual platform to begin running user processes. In the ready state, the zsched and zoneadmd processes are started to manage the virtual platform.
·         zsched, a system scheduling process similar to sched, is used to track kernel resources associated with the zone.
·         zoneadmd is the zones administration daemon.
A zone in the ready state does not have any user processes executing in it. The primary difference between a ready zone and a running zone is that at least one process is executing in a running zone.
How to Install a Configured Zone
You must be the global administrator in the global zone to perform this procedure.
1.      Become superuser, or assume the Primary Administrator role.

2.      Install the configured zone my-zone by using the zoneadm command with the -z
install option.
global# zoneadm -z my-zone install
3.      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.
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 my-zone list -v
·         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.
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
6.      You will see a display that is similar to the following:

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

No comments:

Post a Comment