---
name: "vztmpl-dl"
section: "8"
platform: "linux"
package: "vzctl"
version: "4.9.4-6"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/vztmpl-dl"
---

# vztmpl-dl(8)

download/list/update OpenVZ templates

## NAME

vztmpl-dl - download/list/update OpenVZ templates

## SYNOPSIS

**vztmpl-dl** \[ *option* ... \] *template* \[*template* ...\]\

**vztmpl-dl** \[ *option* ... \] **--update-all**\

**vztmpl-dl** **--list-local**\|**--list-remote**\|**--list-all**\|**--list-orphans**\

**vztmpl-dl** **--config**\|**--help**

## DESCRIPTION

The main purpose of this utility is to download a precreated container tarballs (also known as templates) from the OpenVZ download server. It can be used directly from the command line, and is also used by **vzctl create**.

Usually one or more template names are required, except if one of **--update-all**, **--list**\*, **--config** or **--help** is used.

## OPTIONS

- **--gpg-check**

  Check GPG signatures of downloaded files. By default, GPG check is performed if **CHECK\_TEMPLATE\_SIG** is set to **yes** in **/etc/vz/download.conf file,** [**gpg**(1)](/gpg/1.md) tool is installed, and the OpenVZ public key is available in the gpg keyring. See **EXAMPLES** section below on how to install OpenVZ public key.

- **--no-gpg-check**

  Do not check GPG signatures.

- **--ignore-errors**

  Keep processing templates from the list and return 0 exit code, even if some template failed to download. Without this option, **vztmpl-dl** aborts upon first download failure.

- **--update**

  Update (re-download) existing templates.

- **--no-update**

  Do not try to update existing templates.

-

  - **--quiet**

  Be less talkative (currently it only adds --quiet flag to [**wget**(1)](/wget/1.md) ).

- **--no-quiet**

  Be more talkative (this can be used to negate the effect of **QUIET=yes** in **download.conf.**

- **--update-all**

  Try to update all templates that are available locally. Note that there is no need to specify individual templates. This options implicitly assumes **--update** and **--ignore-errors** options.

- **--list-remote**

  Output list of templates available for download. This option is also used by [**vzctl**(8)](/vzctl/8.md) bash-completion script to complete **--ostemplate** option arguments.

- **--list-local**

  Output list of templates available locally.

- **--list-all**

  Output combined list of templates.

- **--list-orphans**

  Output list of local templates not available remotely. In trivial scenario this will give the list of old templates that are no longer officially supported.

- **--config**

  Output current configuration. The tool has built-in configuration which can be overwritten by options in **/etc/vz/download.conf** file.

- **--help**

  Output help.

## CONFIGURATION

The tool has a built-in configuration defaults, which can be changed by editing **/etc/vz/download.conf** file. The following parameters can be set:

- **UPDATE\_TEMPLATE**

  Default is **yes**. Setting to **no** has the same effect as using **--no-update** option.

- **CHECK\_TEMPLATE\_SIG**

  Default is **no**. Setting to **yes** has the same effect as using **--gpg-check** option.

- **QUIET**

  Default is **no**. Setting to **yes** has the same effect as using **--quiet** option.

- **TMPL\_REPO\_PREFIX**

  URL repo prefix. Default is **http://download.openvz.org/template/precreated**. Setting this to location of your closest OpenVZ download mirror can speed up download. Current list of OpenVZ mirrors is available at **http://openvz.org/Download\_mirrors**.

- **TEMPLATE\_REPOS**

  List of URLs to get repositories from. Default is ${TMPL\_REPO\_PREFIX}. More URLs can be added to get access to beta or unsupported templates.

## EXIT STATUS

Returns 0 upon success, or an appropriate error code in case of an error:

- 1

  Download error

- 2

  Local template file already present, not updating

- 3

  Error in usage (no argument provided)

- 4

  wget binary not found

- 5

  GPG signature check failed

## EXAMPLES

To add OpenVZ public key to gpg keyring:

```
  gpg --search-keys security@openvz.org
```

To list all available templates:

```
  vztmpl-dl --list
```

To download (or update) centos-6 templates:

```
  vztmpl-dl centos-6-x86 centos-6-x86_64
```

To use **yandex.ru** mirror (in **/etc/vz/download.conf**):

```
  TMPL_REPO_PREFIX="http://mirror.yandex.ru/mirrors/download.openvz.org/template/precreated"
```

To enable beta templates (in **/etc/vz/download.conf**):

```
  TEMPLATE_REPOS="${TEMPLATE_REPOS} ${TMPL_REPO_PREFIX}/beta/"
```

## FILES

```
/etc/vz/download.conf
/vz/template/cache
```

## SEE ALSO

[**arpsend**(8)](/arpsend/8.md), **download.conf**(5), **http://wiki.openvz.org/Package\_signatures#Importing\_the\_public\_key**.

## LICENSE

Copyright (C) 2011-2013, Parallels, Inc. Licensed under GNU GPL.
