Installation guide

21
Managing EZ Templates
Creating a Template from Official Templates
The easiest way to create a template is to base it on one of the official templates shipped by
Parallels and adjust its configuration to meet your demands:
1 Install the template you want to use as the basis for your new template (e.g., using the
vzup2date -z command).
2 Create a copy of the directory containing the template configuration files. Depending on
whether you want to create a non-base template or a self-contained template, your steps
slightly differ:
To create a non-base template, create a subdirectory in the
/vz/template/os_name/os_version/arch/config/os directory and copy to this
directory the contents of the
/vz/template/os_name/os_version/arch/config/os/default subdirectory.
For example, to make a non-base template for the official centos-5-x86_64 template
and put its configuration files to the /customized directory, you can run this command:
# cp -a /vz/template/centos/5/x86_64/config/os/{default,customized}
This command creates a new non-based template with the name of centos-5-x86_64-
customized.
To create a self-contained template, create a subdirectory in the /vz/template directory
and copy to this directory the contents of the subdirectory for the original template
(/vz/template/os_name). For example, to make a self-contained template on the basis
of the official centos-5-x86_64 template and put it to the /vz/template/centos-
customized directory, you can run these commands:
# mkdir -p /vz/template/centos-customized/5/x86_64/config
# cp -a /vz/template/centos{,-customized}/5/x86_64/config/os
The last command creates a new self-contained template with the name of centos-
customized-5-x86_64.
3 Change to the directory containing the configuration files for the new template and adjust them
to meet your demands. For example, you can change the list of packages to include in the
template by editing the packages file or configure the list of mirrors by editing the
mirrorlist file.
Creating a Template from Scratch
The process of creating a template from scratch includes completing the following tasks:
1 Installing the vztt-build package on the Node.
2 Making a metafile that will be used as the basis for creating the template.
3 Using the vzmktmpl utility to create the template from the metafile.
The following subsections describe these operations in detail.