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.
| |
Subcommands:
| Name | Description |
|---|---|
| install template | Installs OS and application EZ templates on the server. |
| update template | Updates OS and application EZ templates installed on the server. |
| remove template | Removes OS and application EZ templates from the server. |
| list | 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. |
| info | Outputs information on any EZ templates or software packages available on the server or inside the container. |
| status | Outputs information on updates for the packages installed inside a container. |
| install | Adds application EZ templates to or to install software packages inside the container. |
| update | Updates application EZ templates and software packages inside the container. |
| remove | Removes application EZ templates or software packages from the container. |
| create cache | Creates a tarball (cache) for the given OS EZ template. |
| update cache | Updates the existing tarball (cache) for the given OS EZ template. |
| remove cache | Removes a tarball (cache) for the given OS EZ template. |
| create appcache | Creates a cache of an OS EZ template with preinstalled application templates. |
| update appcache | Updates or recreates a cache of an OS EZ template with preinstalled application templates. |
| remove appcache | Removes a cache of an OS EZ template with preinstalled application templates. |
| localinstall | Installs a software package inside a container from the corresponding file on the server. |
| localupdate | Updates the software packages installed inside your container(s) by means of the vzpkg install or vzpkg localinstall commands. |
| upgrade | Upgrades an OS EZ template the container is based on to a newer version. |
| fetch | Downloads packages included in EZ templates to the server and to store them in the vzpkg local cache. |
| clean | Removes all locally cached data from the template directories on the server. |
| update metadata | Updates the local metadata on the server. |
| sync_vzpackages | Updates 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.
| |
where <object> is a path to an RPM package or an EZ template name.
| Name | Description |
|---|---|
-q, --quiet | Disables logging to the screen and to the log file. |
-f, --force | Forces installation of the EZ template on the server. |
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.
| |
where <object> is a path to an RPM package or an EZ template name.
| Name | Description |
|---|---|
-q, --quiet | Disables logging to the screen and to the log file. |
-f, --force | Forces update of the EZ template. |
vzpkg remove template
This command removes an OS or application EZ template from the server.
| |
| Name | Description |
|---|---|
-F, --for-os <OS_template> | Specifies the OS EZ template to delete the application EZ template from. |
-q, --quiet | Disables logging to screen and file. |
-f, --force | 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.
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
| |
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 |
|---|---|
-p, --package | Lists the software packages installed in the container or included in the OS EZ template. |
-g, --groups | Lists 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, --os | Displays the OS EZ template the container is based on. |
-A, --app | Displays the application EZ templates installed in the container or included in the OS EZ template. |
-C, --cache | Lists 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, --remote | 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, 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-pkg | 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. |
-i, --pkgid | Displays 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-summary | In 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, --cached | This 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. |
appcache | Outputs 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, --quiet | Disables logging to the screen and to the log file. |
vzpkg info
This command displays information about EZ templates, YUM software packages, and individual software packages.
| |
| Name | Description |
|---|---|
<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, --package | Displays information about the specified software package. Must be used with the -F option. |
-g, --groups | Displays information about the packages included in the specified YUM software group. |
-C, --cache | Displays 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, --remote | 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, 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, --quiet | 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 |
|---|---|
name | The name of the EZ template/package. |
packages | The packages included in the EZ template. For EZ templates only. |
repositories | The repository where the packages comprising the EZ template are stored. For EZ templates only. |
mirrorlist | 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. |
distribution | 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. |
summary | Brief information on the EZ template/package. |
description | Detailed 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:
|
version | The version of the software package. |
release | The 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:
|
config_path | 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 /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:
|
package_manager | The package manager type for managing the packages included in the specified EZ template. It can be one of the following:
|
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.
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | 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, 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, --quiet | 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.
vzpkg status command can be executed for running containers only.vzpkg install
This command is used to install application EZ templates, YUM software groups, or individual software packages into containers.
| |
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 |
|---|---|
-p, --package | Installs a software package instead of an EZ template. |
-g, --groups | Installs a YUM software group instead of an EZ template. The -g option works only for containers running RPM-based Linux distributions. |
-f, --force | Forces the EZ template/package installation. |
-C, --cache | Makes 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, --remote | 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, 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-only | Simulates 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, --quiet | 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.
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
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | 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, 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, --package | Updates the packages installed in the container by using the vzpkg install command. |
-g, --groups | Updates the YUM software group in the container. The -g option works only for containers running RPM-based Linux distributions. |
-f, --force | Forces the EZ template/package update procedure. |
-n, --check-only | Simulates 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, --quiet | Disables logging to the screen and to the log file. |
--skip-db | Skips 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-vzpackages | Automatically 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.
vzpkg remove
This command is used to remove an application EZ template, YUM software group, or a software package from a container.
| |
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 |
|---|---|
-p, --package | Removes the specified package(s) from the container. |
-g, --groups | Removes the specified YUM software group from the container. The -g option works only for containers running RPM-based Linux distributions. |
-w, --with-depends | Removes also the packages having dependencies with the object specified. |
-f, --force | Forces the EZ template/package deletion. |
-n, --check-only | Simulates 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, --quiet | 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.
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.
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | 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, 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, --quiet | Disables logging to the screen and to the log file. |
-f, --force | 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.
vzpkg update cache
This command is used to update tarballs (caches) of the OS EZ templates installed on the server.
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | 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, 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.
vzpkg remove cache
This command removes the cache for the OS EZ templates specified.
| |
| Name | Description |
|---|---|
-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, --quiet | 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>.
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.
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.
| |
| Name | Description |
|---|---|
--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, --quiet | Disables logging to screen and log file. |
-f, --force | Forces cache creation. |
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.
| |
| Name | Description |
|---|---|
--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-cache | Instructs 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, --quiet | Disables logging to screen and log file. |
-f, --force | Forces cache creation. |
vzpkg remove appcache
This command removes an existing OS EZ template cache with preinstalled application templates.
| |
| Name | Description |
|---|---|
--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, --quiet | Disables logging to screen and log file. |
-f, --force | Forces cache creation. |
vzpkg localinstall
The vzpkg localinstall command is used to install a software package inside a container from the corresponding file on the server.
| |
| Name | Description |
|---|---|
-C, --cache | When 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, --remote | If 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-only | Simulates 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, --quiet | 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.
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.
| |
| Name | Description |
|---|---|
-C, --cache | When 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, --remote | If 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-only | Simulates 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, --quiet | 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.
vzpkg upgrade
The vzpkg upgrade command is used to upgrade an OS EZ template the container is based on to a newer version.
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | If 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-only | Simulates 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, --force | Forces 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, --quiet | Disables logging to the screen and to the log file. |
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.
| |
| Name | Description |
|---|---|
-O, --os | Download packages/updates for the specified EZ OS template. |
-A, --app | Download packages/updates for EZ application templates used with the EZ specified OS template. |
-C, --cache | Makes 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, --remote | 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, 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, --force | Forces 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, --quiet | 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.
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).
| |
| Name | Description |
|---|---|
-k, --clean-packages | Removes 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-template | Checks 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:
|
-f, --force | Forces the vzpkg clean execution. |
-n, --check-only | Simulates 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, --quiet | Disables logging to the screen and to the log file. |
vzpkg update metadata
This command is used to update the OS EZ template local metadata on the server.
| |
| Name | Description |
|---|---|
-C, --cache | Makes 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, --remote | 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, 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, --quiet | 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.
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.
| |
| Name | Description |
|---|---|
-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, --quiet | Disables logging to the screen and to the log file. |
-f, --force | Forces the synchronization process, even if discrepancies are detected that would normally prevent it. Use with caution. |
-2, --skiplock | Skips container loking during the synchronization process. Use with caution, as this may cause issues if the container is being modified concurrently. |
-n, --check-only | Simulates the operation, showing what changes would be done without actually modifying the vzpackages file. |
--skip-db | Skips 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.