User`s guide

Advanced Tasks 181
Using EZ OS Template Set
Another way of creating customized Containers is to make a non-base OS EZ template (also
known as an OS EZ template set) differing from the corresponding base OS EZ template in the
number of packages included in this template. For example, if you wish your Container to run
Red Hat Enterprise Linux 4 and to function as a Linux-based server only, you can create the
redhat-as4-x86-server OS EZ template set and include only those packages in it that
are needed for performing main server tasks. So, you can specify packages to be used for setting
up file and print sharing and exclude all the packages for graphical interfaces (GNOME and
KDE).
To create a non-base OS EZ template, you should complete the following tasks:
1 Create a metafile that will serve as the basis for your non-base OS EZ template. Any
metafile for this kind of EZ template must contain the following information:
%osname: the name of the Linux distribution for which you are creating the OS EZ
template set. This name must correspond to that specified in the base OS EZ template.
For example, if you are creating an OS template set of the base OS EZ template for
RHEL 4, you must set the value of this parameter to redhat.
%osver: the version of the Linux distribution specified as the value of the %osname
parameter. This name must correspond to that specified in the base OS EZ template. For
example, if you are creating an OS template set of the base OS EZ template for RHEL 4,
you must set the value of this parameter to as4.
%osarch: the system architecture where the EZ template is to be run. This name must
correspond to that specified in the base OS EZ template. For example, if you are creating
an OS template set of the base OS EZ template for RHEL 4, you must set the value of
this parameter to x86.
%setname: the name to be assigned to your non-base OS EZ template. You can specify
any name you like for your OS template set:
a This name will be added to the name of the base OS EZ template after the indication of
the architecture where the OS EZ template is to be run. For example, if you are creating
an OS template set of the base OS EZ template for RHEL 4 which is supposed to run on
x86 platforms, the name of your non-base OS EZ template should look like the
following - redhat-as4-x86-Template_Name-ez-1.0-1.noarch.rpm -
where Template_Name is the name you specify as the value of the %setname
parameter.
b This name will also be assigned to the directory which will store the meta data of your
non-base OS EZ template after the template installation on the server. For example, it
will have the name of
/vz/template/redhat/as4/x86/config/os/my_non_base_template/
after you set the value of this parameter to my_non_base_template, created a non-
base OS EZ template for RHEL 4, and installed it on the server.
%packages: a list of RPM packages to be included in the non-base OS EZ template.
This parameter allows you to specify what applications will be present inside your
Containers based on this OS EZ template set right after their installation. The names of
the packages listed as the value of this parameter must correspond to the names of real
RPM packages (without indicating the package version, release, architecture, and the
.rpm extension) that are stored in the repository used for managing your EZ templates.