EZ Template Management Utilities

This section describes the utilities you can use to manage OS and application templates.

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.

1
2
vzpkg <command> [<options>] {<CT_name>|<object>}
vzpkg --help

Subcommands:

NameDescription
install templateInstalls OS and application EZ templates on the server.
update templateUpdates OS and application EZ templates installed on the server.
remove templateRemoves OS and application EZ templates from the server.
listOutputs a list of EZ templates, OS template caches with preinstalled application templates, or software packages either on the server or inside a particular container.
infoOutputs information on any EZ templates or software packages available on the server or inside the container.
statusOutputs information on updates for the packages installed inside a container.
installAdds application EZ templates to or to install software packages inside the container.
updateUpdates application EZ templates and software packages inside the container.
removeRemoves application EZ templates or software packages from the container.
create cacheCreates a tarball (cache) for the given OS EZ template.
update cacheUpdates the existing tarball (cache) for the given OS EZ template.
remove cacheRemoves a tarball (cache) for the given OS EZ template.
create appcacheCreates a cache of an OS EZ template with preinstalled application templates.
update appcacheUpdates or recreates a cache of an OS EZ template with preinstalled application templates.
remove appcacheRemoves a cache of an OS EZ template with preinstalled application templates.
localinstallInstalls a software package inside a container from the corresponding file on the server.
localupdateUpdates the software packages installed inside your container(s) by means of the vzpkg install or vzpkg localinstall commands.
upgradeUpgrades an OS EZ template the container is based on to a newer version.
fetchDownloads packages included in EZ templates to the server and to store them in the vzpkg local cache.
cleanRemoves all locally cached data from the template directories on the server.
update metadataUpdates the local metadata on the server.
sync_vzpackagesUpdates container checking all installed software packages (not just those in the vzpackages file).

vzpkg install template

This command is used to install an OS or application EZ template on the server from an RPM package or Virtuozzo Server repositories.

1
vzpkg install template [<options>] <object> [...]

where <object> is a path to an RPM package or an EZ template name.

NameDescription
-q, --quietDisables logging to the screen and to the log file.
-f, --forceForces installation of the EZ template on the server.
To install multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces.

Back to top

vzpkg update template

This command is used to update an OS or application EZ template on the server from an RPM package or Virtuozzo Server repositories.

1
vzpkg update template [<options>] <object> [...]

where <object> is a path to an RPM package or an EZ template name.

NameDescription
-q, --quietDisables logging to the screen and to the log file.
-f, --forceForces update of the EZ template.
To update multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces.

Back to top

vzpkg remove template

This command removes an OS or application EZ template from the server.

1
vzpkg remove template [<options>] <template_name> [...]
NameDescription
-F, --for-os <OS_template>Specifies the OS EZ template to delete the application EZ template from.
-q, --quietDisables logging to screen and file.
-f, --forceForces 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.

Back to top

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
1
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.

NameDescription
-p, --packageLists the software packages installed in the container or included in the OS EZ template.
-g, --groupsLists the YUM software groups installed in the container or available for the OS EZ template. The -g option works only for containers running RPM-based Linux distributions.
-O, --osDisplays the OS EZ template the container is based on.
-A, --appDisplays the application EZ templates installed in the container or included in the OS EZ template.
-C, --cacheLists the packages included in the specified EZ template or applied to the specified container from the local vzpkg cache. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file. Should be used along with the -p option.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg list list the packages included in the specified EZ template or applied to the specified container in the remote repositories. Should be used along with the -p option.
-u, --custom-pkgDisplays 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.
-i, --pkgidDisplays the ID assigned to the EZ template instead of its name; these IDs are unique within the given system. If the <CT_name> argument is given, the command shows the IDs of the EZ templates available inside the container. If the <OS_template> argument is given, the command displays the IDs of the OS EZ template specified and all its EZ application templates.
-S, --with-summaryIn addition to listing the EZ templates available either in the container (if the <CT_name> argument is given) or installed on the server (if the <CT_name> argument is omitted), this option makes vzpkg list display the summary information on the corresponding EZ templates/packages.
-c, --cachedThis option has no effect if the <CT_name> argument is given. If used for listing the EZ templates available on the server, it makes vzpkg list omit all application and OS EZ templates for which the cache has not been created (by running the vzpkg create cache command). In other words, with this option on, vzpkg list will list only the OS EZ templates ready to be used for the container creation.
appcacheOutputs a list of OS EZ template caches with preinstalled applications.
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.

Back to top

vzpkg info

This command displays information about EZ templates, YUM software packages, and individual software packages.

1
2
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> [...]]
NameDescription
<CT_name>Container name.
<OS_template>OS EZ template.
<app_template>Application EZ template.
<package_name>Software package name.
<yum_package_group>YUM software group name.
-F, --for-os {<OS_template>|<CT_name>}Displays information on the application EZ template or the software package (if the -p option is specified) included in the specified OS EZ template or applied to the indicated container.
-p, --packageDisplays information about the specified software package. Must be used with the -F option.
-g, --groupsDisplays information about the packages included in the specified YUM software group.
-C, --cacheDisplays the information on the specified package from the local vzpkg cache. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg info get the information on the specified package from the remote repositories set for handling the EZ template where this package is included.
-d, --debug <num>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.
-q, --quietDisables 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

NameDescription
nameThe name of the EZ template/package.
packagesThe packages included in the EZ template. For EZ templates only.
repositoriesThe repository where the packages comprising the EZ template are stored. For EZ templates only.
mirrorlistThe 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.
distributionThe 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.
summaryBrief information on the EZ template/package.
descriptionDetailed information on the EZ template/package. As distinct from summary, it can contain additional data on the EZ template/package.
technologies

For EZ templates only. Displays the following information:

  • The microprocessor architecture where the EZ template is to be used (x86, x86_64);
  • Specifies whether the EZ template can be used only on the servers with the Native POSIX Thread Library (NPTL) support. In this case the nptl entry is displayed after the vzpkg info execution.
versionThe version of the software package.
releaseThe release of the software package.
arch

The system architecture where the EZ template/package is to be used. It can be one of the following:

  • x86 if the EZ template/package is to be used on 32-bit platforms.
  • x86_64 if the EZ template is to be used on 64-bit platforms.
config_pathDisplays 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 /vz/template/<OS_name>/<OS_version>/<arch>/config/os/default).
package_manager_type

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:

  • rpm for RPM-based Linux distributions (Fedora Core, Red Hat Enterprise Linux, etc.);
  • dpkg for Debian-based Linux distributions (e.g., Debian and Ubuntu).
package_manager

The package manager type for managing the packages included in the specified EZ template. It can be one of the following:

  • rpm49db5x86: Fedora 17
  • rpm49x86: Fedora 15 and 16
  • rpm47x86: Red Hat Enterprise Linux 6 and CentOS 6
  • rpm44x86: Red Hat Enterprise Linux 5 and CentOS 5
  • rpm43x86: Red Hat Enterprise Linux 3 and 4, CentOS 3 and 4
  • rpmzypp44x86: SUSE Linux Enterprise Server 11 with Service Pack 2
  • rpm41x86: SUSE Linux Enterprise Server 10 and SUSE Linux 10.x
  • rpm41s9x86: SUSE Linux Enterprise Server 9
  • rpmzypp49x86: openSUSE 12.1
  • dpkg: Debian and Ubuntu
  • rpm49db5x64: Fedora 17
  • rpm49x64: Fedora 15 and 16
  • rpm47x64: Red Hat Enterprise Linux 6 and CentOS 6
  • rpm44x64: Red Hat Enterprise Linux 5 and CentOS 5
  • rpm43x64: Red Hat Enterprise Linux 3 and 4, CentOS 3 and 4
  • rpmzypp44x64: SUSE Linux Enterprise Server 11 with Service Pack 2
  • rpm41x64: SUSE Linux Enterprise Server 10 and SUSE Linux 10.x
  • rpm41s9x64: SUSE Linux Enterprise Server 9
  • rpmzypp49x64: openSUSE 12.1
  • dpkgx64: Debian and Ubuntu

Back to top

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.

1
vzpkg status [<options>] {<CT_name>|<OS_template>}
NameDescription
-C, --cacheMakes the vzpkg status command look for available updates in the local vzpkg cache only. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg status look for the package updates in the remote repositories set for handling the corresponding EZ template.
-d, --debug <num>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.
-q, --quietDisables 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.
The vzpkg status command can be executed for running containers only.

Back to top

vzpkg install

This command is used to install application EZ templates, YUM software groups, or individual software packages into containers.

1
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.

NameDescription
-p, --packageInstalls a software package instead of an EZ template.
-g, --groupsInstalls a YUM software group instead of an EZ template. The -g option works only for containers running RPM-based Linux distributions.
-f, --forceForces the EZ template/package installation.
-C, --cacheMakes the vzpkg install command look for the packages included in the EZ template in the local vzpkg cache only. If there is a package not available locally, the command will fail. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg install look for the packages in the remote repositories set for handling the corresponding EZ template.
-n, --check-onlySimulates the same operations as vzpkg install completes without specifying this option (downloads the software packages to the server, handles the package interdependencies, etc.); however, the packages themselves are not installed in the specified the container.
-d, --debug <num>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.
-q, --quietDisables 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.

A container has to be running in order to apply an application EZ template to or install a package inside this container.

Back to top

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
1
vzpkg update [<options>] <CT_name> [<object> [...]]
NameDescription
-C, --cacheMakes the vzpkg update command look for the package updates in the local vzpkg cache only. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg update look for the package updates in the remote repositories set for handling the corresponding EZ templates.
-p, --packageUpdates the packages installed in the container by using the vzpkg install command.
-g, --groupsUpdates the YUM software group in the container. The -g option works only for containers running RPM-based Linux distributions.
-f, --forceForces the EZ template/package update procedure.
-n, --check-onlySimulates the same operations as vzpkg update completes without specifying this option (downloads the updated packages to the server, handles their interdependencies, etc.); however, the packages themselves are not updated.
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.
--skip-dbSkips filtering packages by the vzpackages file when checking for updates. This allows vzpkg to check all installed packages in the container for updates, not just those listed in the vzpackages file. Useful when packages have been installed directly inside the container using native package managers (apt, yum, zypper) without using vzpkg.
--auto-sync-vzpackagesAutomatically synchronizes the vzpackages file after a successful update operation. This ensures that the vzpackages file reflects all packages currently installed in the container, including any dependencies that were automatically installed during the update.

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.

Back to top

vzpkg remove

This command is used to remove an application EZ template, YUM software group, or a software package from a container.

1
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.

NameDescription
-p, --packageRemoves the specified package(s) from the container.
-g, --groupsRemoves the specified YUM software group from the container. The -g option works only for containers running RPM-based Linux distributions.
-w, --with-dependsRemoves also the packages having dependencies with the object specified.
-f, --forceForces the EZ template/package deletion.
-n, --check-onlySimulates the same operations as vzpkg remove completes without specifying this option (handles interdependencies of the packages to be removed from the server, etc.); however, the packages themselves are not deleted from the specified container(s).
-d, --debug <num>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.
-q, --quietDisables 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.

A container has to be running in order to remove an application EZ template/package from it.

Back to top

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.

1
vzpkg create cache [<options>] [<OS_template> [...]]
NameDescription
-C, --cacheMakes the vzpkg create cache command check for the packages included in the EZ OS template in the local vzpkg cache only and use them for the cache creation. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file. In this case vzpkg create cache will also check the local vzpkg cache only.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg create cache check for the packages included in the EZ OS template in the remote repositories set for its handling.
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.
-f, --forceForces 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.

Back to top

vzpkg update cache

This command is used to update tarballs (caches) of the OS EZ templates installed on the server.

1
vzpkg update cache [<options>] [<OS_template> [...]]
NameDescription
-C, --cacheMakes the vzpkg update cache command check for the packages updates in the local vzpkg cache only and use them for the cache creation. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file. In this case vzpkg update cache will also check the local vzpkg cache only.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg update cache check for the packages updates in the remote repositories set for handling the given EZ OS template.

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.

Back to top

vzpkg remove cache

This command removes the cache for the OS EZ templates specified.

1
vzpkg remove cache [<options>] [<OS_template> [...]]
NameDescription
-d, --debug <num>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.
-q, --quietDisables 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>.

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.

Back to top

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.

1
vzpkg create appcache --config <config> [<options>]
NameDescription
--config <config>Specifies the path to the configuration file with the information on what OS and application templates to use.
--ostemplate <OS_template>Specifies the OS EZ template to use in cache creation. This option redefines the OS EZ template specified in the configuration file.
--apptemplate <app_template>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.
-d, --debug <num>Sets the debugging level (0 to 10), 10 being the highest.
-q, --quietDisables logging to screen and log file.
-f, --forceForces cache creation.

Back to top

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.

1
vzpkg update appcache --config <config> [<options>]
NameDescription
--config <config>Specifies the configuration file with the information on what OS and application templates to use.
--ostemplate <OS_template>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.
--apptemplate <app_template>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.
--update-cacheInstructs the command to check for updates for the existing OS and application cache. Otherwise, the cache is created anew.
-d, --debug <num>Sets the debugging level (0 to 10), 10 being the highest.
-q, --quietDisables logging to screen and log file.
-f, --forceForces cache creation.

Back to top

vzpkg remove appcache

This command removes an existing OS EZ template cache with preinstalled application templates.

1
vzpkg remove appcache --config <config> [<options>]
NameDescription
--config <config>Specifies the configuration file with the information on what OS and application templates to use.
--ostemplate <OS_template>Specifies the OS EZ template, cache of which needs to be removed. This option redefines the OS EZ template specified in the configuration file.
--apptemplate <app_template>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.
-d, --debug <num>Sets the debugging level (0 to 10), 10 being the highest.
-q, --quietDisables logging to screen and log file.
-f, --forceForces cache creation.

Back to top

vzpkg localinstall

The vzpkg localinstall command is used to install a software package inside a container from the corresponding file on the server.

1
vzpkg localinstall [<options>] <CT_name> <rpm_file_path> [...]
NameDescription
-C, --cacheWhen handling the package interdependencies, makes the vzpkg localinstall command look for the needed packages in the local vzpkg cache only. If there is a package not available locally, the command will fail. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg local cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg localinstall look for the packages in the remote repository.
-n, --check-onlySimulates the same operations as vzpkg localinstall completes without specifying this option (e.g., handles the package interdependencies); however, the package itself is not installed in the specified container.
-d, --debug <num>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.
-q, --quietDisables 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.

Back to top

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.

1
vzpkg localupdate [<options>] <CT_name> <rpm_file_path> [...]
NameDescription
-C, --cacheWhen handling the package interdependencies, makes the vzpkg localupdate command look for the needed packages in the local vzpkg cache only. If there is a package not available locally, the command will fail. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg local cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg localupdate look for the packages in the remote repository.
-n, --check-onlySimulates the same operations as vzpkg localupdate completes without specifying this option (e.g., handles the package interdependencies); however, the package itself is not installed in the specified container.
-d, --debug <num>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.
-q, --quietDisables 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.

Back to top

vzpkg upgrade

The vzpkg upgrade command is used to upgrade an OS EZ template the container is based on to a newer version.

1
vzpkg upgrade [<options>] <CT_name>
NameDescription
-C, --cacheMakes the vzpkg upgrade command check for the packages included in the OS EZ template in the local vzpkg cache only. If any package is not available locally, the command will fail. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file; in this case vzpkg upgrade will also check the local vzpkg cache only.
-r, --remoteIf the elapsed time from the last local vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg upgrade check for the packages in the remote repositories set for handling the given EZ OS template.
-n, --check-onlySimulates the same operations as vzpkg upgrade completes without specifying this option (downloads the packages to the server, handles their interdependencies, etc.); however, the packages themselves inside the container are not upgraded.
-f, --forceForces the upgrade of the OS EZ template.
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.

Back to top

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.

1
vzpkg fetch [<options>] <OS_template>
NameDescription
-O, --osDownload packages/updates for the specified EZ OS template.
-A, --appDownload packages/updates for EZ application templates used with the EZ specified OS template.
-C, --cacheMakes the vzpkg fetch command look for the metadata in the vzpkg local cache only. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg fetch look for the OS EZ template metadata in the remote repositories set for handling the corresponding EZ template.
-f, --forceForces the process of downloading packages and/or their updates to the server.
-d, --debug <num>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.
-q, --quietDisables 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.

Back to top

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).

1
vzpkg clean [<options>] [<OS_template> [...]]
NameDescription
-k, --clean-packagesRemoves the packages, headers, and metadata of the specified EZ OS template from the local vzpkg cache. This is also the default behavior of vzpkg clean.
-t, --clean-templateChecks the template area for the specified EZ OS template (the template area has the default path of /vz/template) and removes all packages that are currently not used by any container on the server and not included in the EZ OS template cache.
-a, --clean-all

Removes both:

  • The packages, headers, and metadata of the specified EZ OS template from the vzpkg local cache.
  • The packages currently not used by any container on the server and not included in the EZ OS template cache.
-f, --forceForces the vzpkg clean execution.
-n, --check-onlySimulates the same operations as vzpkg clean completes without specifying this option; however, the packages and headers are not removed from the server.
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.

Back to top

vzpkg update metadata

This command is used to update the OS EZ template local metadata on the server.

1
vzpkg update metadata [<options>] [<OS_template> [...]]
NameDescription
-C, --cacheMakes the vzpkg update metadata command look for available metadata updates in the local vzpkg cache only. You can omit this parameter if the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file.
-r, --remoteIf the elapsed time from the last vzpkg cache update does not exceed the value of the METADATA_EXPIRE parameter specified in the /etc/vztt/vztt.conf file, you should use this option to make vzpkg update metadata look for the updated metadata in the remote repositories set for handling the corresponding OS EZ template.
-d, --debug <num>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.
-q, --quietDisables 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.

Back to top

vzpkg sync_vzpackages

This command is used to synchronize the vzpackages file with the actual installed packages in the container. It reads the container’s package database and updates the vzpackages file located at /vz/private/<CTID>/templates/vzpackages to match the current state of installed packages. Useful when packages have been installed or removed inside the container directly, using the native package manager (apt, yum, zypper) without using vzpkg.

1
vzpkg sync_vzpackages [<options>] <CT_name>
NameDescription
-d, --debug <num>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.
-q, --quietDisables logging to the screen and to the log file.
-f, --forceForces the synchronization process, even if discrepancies are detected that would normally prevent it. Use with caution.
-2, --skiplockSkips container loking during the synchronization process. Use with caution, as this may cause issues if the container is being modified concurrently.
-n, --check-onlySimulates the operation, showing what changes would be done without actually modifying the vzpackages file.
--skip-dbSkips filtering packages by the vzpackages file when synchronizing. It ensures that all currently installed packages are included in the synchronization, regardless of what is in the existing vzpackages file.

When executed, the command reads the existing vzpackages file, compares it with the container’s package database, and updates the file to reflect the current state. If used with the --skip-db option, it reads all installed packages directly from the container’s package database (rpm/dpkg database) and writes them to the vzpackages file, ignoring any existing vzpackages file content.

Back to top