Configuring A Zone By Command File Or Template; Automatic Quick Installation Of Zones - Sun Microsystems SOLARIS 10 Manual

Container guide
Table of Contents

Advertisement

Version 3.1-en
Solaris 10 Container Guide - 3.1 5. Cookbooks

5.1.13. Configuring a zone by command file or template

[dd] Zones can be configured by using command files for zo ne c fg or by the use of templates. This
allows quick and automatic configuration of many zones avoiding errors.
Using the z o n e c f g command file
A command file is set up for automatic configuration of the zone.
1. Create zonecfg command file
- with z o n e c f g - z < z o n e > e x po rt -f < f il e> of an existing zone
- alternatively: create the zone config file with a text editor, one command per line
2. Use the command file to configure a new zone
zo n e c f g - z < z o n e > - f < f il e>
Using templates
A new zone is configured by using an already configured zone. Any necessary configuration
changes are done after that
z o n e c f g - z < z o n e > c r ea t e -t <t em p la te - zo ne >

5.1.14. Automatic quick installation of zones

[ug] The installation of zones takes just a few to several minutes, depending on the speed of the file
system (disks) and the zone software to be copied. This can be reduced considerably if many zones
are to be created that are identical with respect to their configuration (essential criteria for this are the
i nh eri t- pk g - d i r settings).
Preparation:
1. zo nec f g of a template zone with the desired configuration,
which must not be used later on (for example with the name t em p la te 1).
In so doing, z o n e p a t h must be set, the configuration of the network address should be
absent because the zone merely serves as a template after all and is not to become
operational.
2. Install the zone t e m p l a t e 1 with z o n ea dm .
3. Save the contents of the zone t e m p l at e1 in a tar file t em p la te 1 .t ar .
(Note: cp -r is not suitable for copying zones!)
Creation of duplicated zones:
1. Configure with z o n e c f g using the template function
(cre at e - t t e m p l a t e 1 ).
(The in h e r i t - p k g - d i r settings must not be changed!)
2. Change z o n e p a t h with z o n e c f g (can be done by script)
3. Enter the network address(es) with z o n ec fg .
4. Unpack t e m p l a t e 1 . t a r below z o n ep at h of the new zone.
5. <zone> attach
6. Boot the new zone for operation.
Since the template zone cannot be started up directly, the following procedure is required to install
patches:
1. Configure the zone t e m p l a t e 1 (manually or with sy s id cf g file)
2. Install the patches (it is best to have all configured zones booted up)
3. De-configure the zone t e m p l a t e 1 with the command
zl ogi n t e m p l a t e 1 s y s - u n c o n fi g
4. Re-create the zone content file t e m p la t e1 .t a r .
Alternatively, the command z o n e a d m
manual copy.
c lo ne can be used instead of a
- z
t em p la te 1
Effective: 30/11/2009
79

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SOLARIS 10 and is the answer not in the manual?

Table of Contents