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

Syntax. 

vzpkg create cache [<options>] [<OS_template> [...]]

Table 3.35. Options

NameDescription

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