Difference between revisions of "Man/vztmpl-dl.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Automated import of articles *** existing text overwritten ***)
(Automated import of articles *** existing text overwritten ***)
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
 
<td width="74%">
 
<td width="74%">
  
<p style="margin-top: 1em">[<b>--no-gpg-check</b>]
+
<p style="margin-top: 1em">[ <i>option</i> ... ]
[<b>--no-update</b>] <i>template</i> [<i>template</i>
+
<i>template</i> [<i>template</i> ...]</p></td></tr>
...]</p> </td></tr>
 
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
 
<td width="11%"></td>
 
<td width="11%"></td>
Line 27: Line 26:
 
<td width="74%">
 
<td width="74%">
  
<p><b>--config</b>|<b>--list</b>|<b>--help</b></p></td></tr>
+
<p>[ <i>option</i> ... ] <b>--update-all</b></p></td></tr>
 +
<tr valign="top" align="left">
 +
<td width="11%"></td>
 +
<td width="14%">
 +
 
 +
<p><b>vztmpl-dl</b></p></td>
 +
<td width="1%"></td>
 +
<td width="74%">
 +
 
 +
<p><b>--list-local</b>|<b>--list-remote</b>|<b>--list-all</b>|<b>--list-orphans</b></p> </td></tr>
 +
<tr valign="top" align="left">
 +
<td width="11%"></td>
 +
<td width="14%">
 +
 
 +
<p><b>vztmpl-dl</b></p></td>
 +
<td width="1%"></td>
 +
<td width="74%">
 +
 
 +
<p><b>--config</b>|<b>--help</b></p></td></tr>
 
</table>
 
</table>
  
Line 37: Line 54:
 
download server. It can be used directly from the command
 
download server. It can be used directly from the command
 
line, and is also used by <b>vzctl create</b>.</p>
 
line, and is also used by <b>vzctl create</b>.</p>
 +
 +
<p style="margin-left:11%; margin-top: 1em">Usually one or
 +
more template names are required, except if one of
 +
<b>--update-all</b>, <b>--list</b>*, <b>--config</b> or
 +
<b>--help</b> is used.</p>
  
 
== OPTIONS ==
 
== OPTIONS ==
  
<p style="margin-left:11%; margin-top: 1em"><b>--no-gpg-check</b></p>
+
<p style="margin-left:11%; margin-top: 1em"><b>--gpg-check</b></p>
  
<p style="margin-left:22%;">Do not check GPG signatures of
+
<p style="margin-left:22%;">Check GPG signatures of
 
downloaded files. By default, GPG check is performed if
 
downloaded files. By default, GPG check is performed if
<b>gpg</b>(1) tool is installed and the OpenVZ public key is
+
<b>CHECK_TEMPLATE_SIG</b> is set to <b>yes</b> in
available in the gpg keyring. See <b>EXAMPLES</b> section
+
<b>/etc/vz/download.conf</b> file, <b>gpg</b>(1) tool is
below on how to install OpenVZ public key.</p>
+
installed, and the OpenVZ public key is available in the gpg
 +
keyring. See <b>EXAMPLES</b> section below on how to install
 +
OpenVZ public key.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--no-gpg-check</b></p>
 +
 
 +
<p style="margin-left:22%;">Do not check GPG
 +
signatures.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--ignore-errors</b></p>
 +
 
 +
<p style="margin-left:22%;">Keep processing templates from
 +
the list and return 0 exit code, even if some template
 +
failed to download. Without this option, <b>vztmpl-dl</b>
 +
aborts upon first download failure.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--update</b></p>
 +
 
 +
<p style="margin-left:22%;">Update (re-download) existing
 +
templates.</p>
  
 
<p style="margin-left:11%;"><b>--no-update</b></p>
 
<p style="margin-left:11%;"><b>--no-update</b></p>
  
<p style="margin-left:22%;">Do not try to update
+
<p style="margin-left:22%;">Do not try to update existing
(re-download) existing templates.</p>
+
templates.</p>
 +
 
 +
<p style="margin-left:11%; margin-top: 1em"><b>--quiet</b></p>
 +
 
 +
<p style="margin-left:22%;">Be less talkative (currently it
 +
only adds --quiet flag to <b>wget</b>(1) ).</p>
 +
 
 +
<p style="margin-left:11%;"><b>--no-quiet</b></p>
 +
 
 +
<p style="margin-left:22%;">Be more talkative (this can be
 +
used to negate the effect of <b>QUIET=yes</b> in
 +
<b>download.conf.</b></p>
 +
 
 +
<p style="margin-left:11%;"><b>--update-all</b></p>
 +
 
 +
<p style="margin-left:22%;">Try to update all templates
 +
that are available locally. Note that there is no need to
 +
specify individual templates. This options implicitly
 +
assumes <b>--update</b> and <b>--ignore-errors</b>
 +
options.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--list-remote</b></p>
 +
 
 +
<p style="margin-left:22%;">Output list of templates
 +
available for download. This option is also used by
 +
[[Man/vzctl.8|<b>vzctl</b>(8)]] bash-completion script to complete
 +
<b>--ostemplate</b> option arguments.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--list-local</b></p>
 +
 
 +
<p style="margin-left:22%;">Output list of templates
 +
available locally.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--list-all</b></p>
 +
 
 +
<p style="margin-left:22%;">Output combined list of
 +
templates.</p>
 +
 
 +
<p style="margin-left:11%;"><b>--list-orphans</b></p>
 +
 
 +
<p style="margin-left:22%;">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.</p>
  
 
<p style="margin-left:11%;"><b>--config</b></p>
 
<p style="margin-left:11%;"><b>--config</b></p>
Line 61: Line 145:
 
<table width="100%" border="0" rules="none" frame="void"
 
<table width="100%" border="0" rules="none" frame="void"
 
       cellspacing="0" cellpadding="0">
 
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
 
<td width="11%"></td>
 
<td width="9%">
 
 
<p><b>--list</b></p></td>
 
<td width="2%"></td>
 
<td width="78%">
 
 
<p>Output list of templates available for download. This
 
option is also used by [[Man/vzctl.8|<b>vzctl</b>(8)]] bash-completion
 
script to complete <b>--ostemplate</b> option arguments.</p></td></tr>
 
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
 
<td width="11%"></td>
 
<td width="11%"></td>
Line 78: Line 151:
 
<p><b>--help</b></p></td>
 
<p><b>--help</b></p></td>
 
<td width="2%"></td>
 
<td width="2%"></td>
<td width="78%">
+
<td width="18%">
  
<p>Output help.</p></td></tr>
+
<p>Output help.</p></td>
 +
<td width="60%">
 +
</td></tr>
 
</table>
 
</table>
  
Line 97: Line 172:
 
<p style="margin-left:11%;"><b>CHECK_TEMPLATE_SIG</b></p>
 
<p style="margin-left:11%;"><b>CHECK_TEMPLATE_SIG</b></p>
  
<p style="margin-left:22%;">Default is <b>yes</b>. Setting
+
<p style="margin-left:22%;">Default is <b>no</b>. Setting
to <b>no</b> has the same effect as using
+
to <b>yes</b> has the same effect as using
<b>--no-gpg-check</b> option.</p>
+
<b>--gpg-check</b> option.</p>
 +
 
 +
<table width="100%" border="0" rules="none" frame="void"
 +
      cellspacing="0" cellpadding="0">
 +
<tr valign="top" align="left">
 +
<td width="11%"></td>
 +
<td width="7%">
 +
 
 +
<p><b>QUIET</b></p></td>
 +
<td width="4%"></td>
 +
<td width="78%">
 +
 
 +
<p>Default is <b>no</b>. Setting to <b>yes</b> has the same
 +
effect as using <b>--quiet</b> option.</p></td></tr>
 +
</table>
  
 
<p style="margin-left:11%;"><b>TMPL_REPO_PREFIX</b></p>
 
<p style="margin-left:11%;"><b>TMPL_REPO_PREFIX</b></p>

Latest revision as of 01:44, 30 October 2013

NAME[edit]

vztmpl-dl − download/list/update OpenVZ templates

SYNOPSIS[edit]

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[edit]

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[edit]

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

--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) 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[edit]

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[edit]

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[edit]

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[edit]

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

SEE ALSO[edit]

arpsend(8), download.conf(5), Package_signatures#Importing_the_public_key.

LICENSE[edit]

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