3.3. EZ Template Management Utilities¶
This section describes the utilities you can use to manage OS and application templates.
3.3.1. vzpkg¶
The vzpkg
utility is used to manage OS and application EZ templates either inside your containers or on the server itself. This tool can also be used to manage standard software packages (e.g., mysql.rpm
) inside containers.
vzpkg <command> [<options>] {<CT_name>|<object>}
vzpkg --help
Subcommands:
Name |
Description |
---|---|
|
Installs OS and application EZ templates on the server. |
|
Updates OS and application EZ templates installed on the server. |
|
Removes OS and application EZ templates from the server. |
|
Outputs a list of EZ templates, OS template caches with preinstalled application templates, or software packages either on the server or inside a particular container. |
|
Outputs information on any EZ templates or software packages available on the server or inside the container. |
|
Outputs information on updates for the packages installed inside a container. |
|
Adds application EZ templates to or to install software packages inside the container. |
|
Updates application EZ templates and software packages inside the container. |
|
Removes application EZ templates or software packages from the container. |
|
Creates a tarball (cache) for the given OS EZ template. |
|
Updates the existing tarball (cache) for the given OS EZ template. |
|
Removes a tarball (cache) for the given OS EZ template. |
|
Creates a cache of an OS EZ template with preinstalled application templates. |
|
Updates or recreates a cache of an OS EZ template with preinstalled application templates. |
|
Removes a cache of an OS EZ template with preinstalled application templates. |
|
Installs a software package inside a container from the corresponding file on the server. |
|
Updates the software packages installed inside your container(s) by means of the |
|
Upgrades an OS EZ template the container is based on to a newer version. |
|
Downloads packages included in EZ templates to the server and to store them in the |
|
Removes all locally cached data from the template directories on the server. |
|
Updates the local metadata on the server. |
3.3.2. vzpkg install template¶
This command is used to install an OS or application EZ template on the server from an RPM package or Virtuozzo Hybrid Server repositories.
vzpkg install template [<options>] <object> [...]
where <object>
is a path to an RPM package or an EZ template name.
Name |
Description |
---|---|
|
Disables logging to the screen and to the log file. |
|
Forces installation of the EZ template on the server. |
Note
To install multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces.
3.3.3. vzpkg update template¶
This command is used to update an OS or application EZ template on the server from an RPM package or Virtuozzo Hybrid Server repositories.
vzpkg update template [<options>] <object> [...]
where <object>
is a path to an RPM package or an EZ template name.
Name |
Description |
---|---|
|
Disables logging to the screen and to the log file. |
|
Forces update of the EZ template. |
Note
To update multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces.
3.3.4. vzpkg remove template¶
This command removes an OS or application EZ template from the server.
vzpkg remove template [<options>] <template_name> [...]
Name |
Description |
---|---|
|
Specifies the OS EZ template to delete the application EZ template from. |
|
Disables logging to screen and file. |
|
Forces deletion of the EZ template. |
When executed, the vzpkg remove template
command removes the specified OS EZ template from the server. To delete an application EZ template, additionally specify the name of the OS EZ template (<OS_template>
) under which this application template is to be run.
3.3.5. vzpkg list¶
The vzpkg list
command is used to list
EZ templates installed on the server, in a container, or available in remote EZ template repositories
YUM software groups or individual packages installed in a container
vzpkg list [<options>] [<OS_template>|<CT_name> [...]]
If you indicate a container name, the command will list all EZ templates applied to the specified container. If you indicate an OS EZ template, vzpkg list
will display a list of application EZ templates available for this OS EZ template. Without any options, the utility lists all EZ templates installed on the server.
Name |
Description |
---|---|
|
Lists the software packages installed in the container or included in the OS EZ template. |
|
Lists the YUM software groups installed in the container or available for the OS EZ template. The |
|
Displays the OS EZ template the container is based on. |
|
Displays the application EZ templates installed in the container or included in the OS EZ template. |
|
Lists the packages included in the specified EZ template or applied to the specified container from the
local |
|
If the elapsed time from the last |
|
Displays a list of packages that are applied to the specified container but absent from the repository set to handle the EZ template(s) where these packages are included. |
|
Displays the ID assigned to the EZ template instead of its name; these IDs are unique within the given
system. If the |
|
In addition to listing the EZ templates available either in the container (if the |
|
This option has no effect if the |
|
Outputs a list of OS EZ template caches with preinstalled applications. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
3.3.6. vzpkg info¶
This command displays information about EZ templates, YUM software packages, and individual software packages.
vzpkg info [-F {<OS_template>|<CT_name>} -q|-d <app_template> [<parameters> ...]
vzpkg info -p|-g [-C|-r] [-F {<OS_template>|<CT_name>} -q|-d {<package_name>|<yum_package_group>} [<parameters> [...]]
Name |
Description |
---|---|
|
Container name. |
|
OS EZ template. |
|
Application EZ template. |
|
Software package name. |
|
YUM software group name. |
|
Displays information on the application EZ template or the software package (if the
|
|
Displays information about the specified software package. Must be used with the
|
|
Displays information about the packages included in the specified YUM software group. |
|
Displays the information on the specified package from the local |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
While executed, vzpkg info
parses the subdirectories and files located in the /vz/template/<os_name>/<os_version>/<arch>/config
directory and containing the EZ template meta data. To run the command, you should specify either the OS EZ template or the container name. In either case, detailed information on the corresponding OS EZ template is displayed. You can also use the -F
option to get the necessary information on any application EZ template included into the OS EZ template or applied to the container.
By default, vzpkg info
displays all meta data on the EZ template/package specified. However, you can reduce the amount of the output information by using special parameters (<parameters>
) listed in the table below.
Output Parameters
Name |
Description |
---|---|
|
The name of the EZ template/package. |
|
The packages included in the EZ template. For EZ templates only. |
|
The repository where the packages comprising the EZ template are stored. For EZ templates only. |
|
The URL to the file containing a list of repositories from where the packages comprising the EZ template are to be downloaded. For EZ templates only. |
|
The Linux distribution on the basis the OS EZ template has been created or under which the application EZ template is to be run. For EZ templates only. |
|
Brief information on the EZ template/package. |
|
Detailed information on the EZ template/package. As distinct from |
|
For EZ templates only. Displays the following information:
|
|
The version of the software package. |
|
The release of the software package. |
|
The system architecture where the EZ template/package is to be used. It can be one of the following:
|
|
Displays the path to the EZ template configuration directory containing the template meta data where the
meta data for the base OS EZ template are stored (the default directory path is
|
|
For EZ templates only. The packaging system used to handle the packages included in the specified EZ template. It can be one of the following:
|
|
The package manager type for managing the packages included in the specified EZ template. It can be one of the following:
|
3.3.7. vzpkg status¶
This command is used to check the status of the packages either installed inside a container or included in an OS EZ template.
vzpkg status [<options>] {<CT_name>|<OS_template>}
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, the command performs the following operations:
Checks all the packages installed inside the specified container or included in the specified OS EZ template.
Checks the repository used to install/update packages inside the container/OS EZ template.
Compares the packages in the repository with those inside the container/OS EZ template.
Lists the found packages updates for the container/OS EZ template, if any, or informs you that the container/OS EZ template is up-to-date.
Note
The vzpkg status
command can be executed for running containers only.
3.3.8. vzpkg install¶
This command is used to install application EZ templates, YUM software groups, or individual software packages into containers.
vzpkg install [<options>] <CT_name> <object> [...]
The vzpkg install
command will add an <object>
to the specified container. An object can be an application EZ template, a YUM software group, or a standard software package. You can specify several objects to install into the container by separating them by spaces.
When executed, vzpkg install
automatically handles the interdependencies among the packages to be installed into a container and ensures that all dependencies are satisfied. If the package dependencies cannot be resolved, the installation process fails and the corresponding message is displayed.
Name |
Description |
---|---|
|
Installs a software package instead of an EZ template. |
|
Installs a YUM software group instead of an EZ template. The |
|
Forces the EZ template/package installation. |
|
Makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, the specified object is treated by vzpkg install
as an application EZ template. However, you can use the -p
or -g
option to explicitly specify the type of the object.
Note
A container has to be running in order to apply an application EZ template to or install a package inside this container.
3.3.9. vzpkg update¶
The vzpkg update
command is used to update the following components of a container:
OS EZ template
application EZ templates
YUM software groups
individual software packages
vzpkg update [<options>] <CT_name> [<object> [...]]
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Updates the packages installed in the container by using the |
|
Updates the YUM software group in the container. The |
|
Forces the EZ template/package update procedure. |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
Without any options specified, vzpkg update
updates all EZ templates (including the OS EZ template) in the specified container. However, you can make the command update a particular EZ template by specifying its name as <object>
. You can also use the -p
or -g
option to update YUM software groups or individual software packages in the container.
3.3.10. vzpkg remove¶
This command is used to remove an application EZ template, YUM software group, or a software package from a container.
vzpkg remove [<options>] <CT_name> <object> [...]
This command will remove <object>
from the container with the name <CT_name>
. The <object>
can be an application EZ template, a YUM software group, or a software package installed with the vzpkg install
command. You may specify a number of objects for removing.
Name |
Description |
---|---|
|
Removes the specified package(s) from the container. |
|
Removes the specified YUM software group from the container. The |
|
Removes also the packages having dependencies with the object specified. |
|
Forces the EZ template/package deletion. |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, the specified object is treated by vzpkg remove
as an application EZ template. However, you can use the -p
or -g
option to explicitly specify the type of the object.
Note
A container has to be running in order to remove an application EZ template/package from it.
3.3.11. vzpkg create cache¶
This command is used to create tarballs (caches) for OS EZ templates. You should execute this command before you start using a newly installed OS EZ template for creating containers.
vzpkg create cache [<options>] [<OS_template> [...]]
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
|
Forces the process of the cache creation. |
vzpkg create cache
checks the template area on the server (by default, the /vz/template
directory is used) and if it finds an OS EZ template for which no tar archive exists, it creates a gzipped tarball for the corresponding OS EZ template and places it to the /vz/template/cache
directory. When a container is being created, prlctl
just unpacks the tar archive.
By default, vzpkg create cache
checks the tar archive existence for all OS EZ templates installed on the server and creates some, if necessary. However, you can explicitly indicate what OS EZ template should be cached by specifying its name as <OS_template>
. If the cache of the OS template specified already exists on the server, the command will fail and you will be presented with the corresponding error message.
3.3.12. vzpkg update cache¶
This command is used to update tarballs (caches) of the OS EZ templates installed on the server.
vzpkg update cache [<options>] [<OS_template> [...]]
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
The vzpkg update cache
command checks the cache directory in the template area (by default, the template area is located in the /vz/template
directory on the server) and updates all existing tarballs in this directory. However, you can explicitly indicate what OS EZ template tarball is to be updated by specifying its name as <OS_template>
. Upon the vzpkg update cache
execution, the old tarball is renamed by receiving the -old
suffix (e.g., centos-6-x86_64.tar.gz-old
).
If the vzpkg update cache
command does not find a tarball for one or more OS EZ templates installed on the server, it creates the corresponding tar archive(s) and puts them to the /vz/template/cache
directory.
3.3.13. vzpkg remove cache¶
This command removes the cache for the OS EZ templates specified.
vzpkg remove cache [<options>] [<OS_template> [...]]
Name |
Description |
---|---|
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, vzpkg remove cache
deletes all caches located in the /vz/template/cache
directory on the server. However, you can explicitly indicate what OS EZ template tar archive is to be removed by specifying its name as <OS_template>
.
Note
The OS EZ template caches having the -old
suffix are not removed from the /vz/template/cache
directory. You should use the -rm
command to delete these caches from the server.
3.3.14. vzpkg create appcache¶
This command combines an OS EZ template cache and one or more application EZ templates into a new OS and applications cache. If the OS EZ template cache has not been created yet, this will be done before application templates are added.
vzpkg create appcache --config <config> [<options>]
Name |
Description |
---|---|
|
Specifies the path to the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template to use in cache creation. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies one or more application EZ templates (comma-separated) to be added to the resulting cache.This option redefines the application EZ templates specified in the configuration file. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
3.3.15. vzpkg update appcache¶
This command updates an existing OS EZ template cache with preinstalled application templates if the --update-cache
option is provided. Otherwise, the cache is created anew.
vzpkg update appcache --config <config> [<options>]
Name |
Description |
---|---|
|
Specifies the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template, cache of which needs to be recreated or updated. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies all application EZ templates (comma-separated) preinstalled in the cache which needs to be updated. This option redefines the application EZ templates specified in the configuration file. |
|
Instructs the command to check for updates for the existing OS and application cache. Otherwise, the cache is created anew. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
3.3.16. vzpkg remove appcache¶
This command removes an existing OS EZ template cache with preinstalled application templates.
vzpkg remove appcache --config <config> [<options>]
Name |
Description |
---|---|
|
Specifies the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template, cache of which needs to be removed. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies all application EZ templates (comma-separated) preinstalled in the cache which needs to be removed. This option redefines the application EZ templates specified in the configuration file. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
3.3.17. vzpkg localinstall¶
The vzpkg localinstall
command is used to install a software package inside a container from the corresponding file on the server.
vzpkg localinstall [<options>] <CT_name> <rpm_file_path> [...]
Name |
Description |
---|---|
|
When handling the package interdependencies, makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, the command installs the package, the full path to which is specified as <rpm_file_path>, inside the container with the name <CT_name>
. You may specify multiple packages to be installed inside the container.
During its execution, vzpkg localinstall
automatically handles the interdependencies among the packages to be installed inside a container and ensures that all dependencies are satisfied. If the package dependencies cannot be resolved, the installation process will fail and the corresponding message will be displayed.
3.3.18. vzpkg localupdate¶
The vzpkg localupdate
command is used to update the software packages installed inside your container(s) by means of the vzpkg install
or vzpkg localinstall
commands.
vzpkg localupdate [<options>] <CT_name> <rpm_file_path> [...]
Name |
Description |
---|---|
|
When handling the package interdependencies, makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, vzpkg localupdate
compares the file on the server the full path to which is specified as <rpm_file_path>
with the corresponding package inside the container with the name <CT_name>
and updates it, if necessary. You may specify a number of packages at once to be updated inside your container.
3.3.19. vzpkg upgrade¶
The vzpkg upgrade
command is used to upgrade an OS EZ template the container is based on to a newer version.
vzpkg upgrade [<options>] <CT_name>
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last local |
|
Simulates the same operations as |
|
Forces the upgrade of the OS EZ template. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
3.3.20. vzpkg fetch¶
This command is used to download packages included in the corresponding OS EZ template or their updates from the remote repository to the vzpkg
local cache on the server and to prepare them for installation.
vzpkg fetch [<options>] <OS_template>
Name |
Description |
---|---|
|
Download packages/updates for the specified EZ OS template. |
|
Download packages/updates for EZ application templates used with the EZ specified OS template. |
|
Makes the |
|
If the elapsed time from the last |
|
Forces the process of downloading packages and/or their updates to the server. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
You can make vzpkg fetch
run as a cron
job (e.g., nightly) checking for available packages or packages updates for your EZ templates and keeping them in the local cache. Having all the necessary packages in the vzpkg
local cache can greatly speed up the execution of the vzpkg install
, vzpkg update
, or vzpkg create cache
commands since the packages are available locally and there is no need to check for them in the corresponding remote repositories.
3.3.21. vzpkg clean¶
This command is used to remove the software packages, their headers, and metadata downloaded to the server from the repository during the vzpkg
execution (e.g., while caching an OS EZ template or adding an application EZ template to a container for the first time).
vzpkg clean [<options>] [<OS_template> [...]]
Name |
Description |
---|---|
|
Removes the packages, headers, and metadata of the specified EZ OS template from the local |
|
Checks the template area for the specified EZ OS template (the template area has the default path of
|
|
Removes both:
|
|
Forces the |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
3.3.22. vzpkg update metadata¶
This command is used to update the OS EZ template local metadata on the server.
vzpkg update metadata [<options>] [<OS_template> [...]]
Name |
Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed without any options, the command updates the metadata of all OS EZ templates installed on the server. If you specify one or more OS EZ templates, the command will update the metadata of the indicated OS templates only. You can run this command a cron job at regular intervals to be sure that your OS EZ templates metadata are always up-to-date.