pct-template
Manage Proxmox container templates
TLDR
Convert a container into a template
SYNOPSIS
pct template download <storage> <template-name> [options]
pct template update <storage> <template-name> [options]
pct template list [<storage>] [options]
pct template delete <storage> <template-name> [options]
PARAMETERS
download
Downloads a specified container template to the designated storage. If the template already exists, use --force to overwrite.
update
Updates an existing container template to its latest version from the repository.
list [
Lists all available container templates on a specific storage or across all storages if none is specified.
delete
Removes a specified container template from the storage.
--force
Force the operation, e.g., overwrite an existing template during download, or proceed with update/deletion without prompting.
--url
Specify an alternative URL when downloading a template, overriding the default repository source.
--output-format
Defines the output format for the 'list' command. Can be 'json' for machine-readable or 'pretty' for human-readable output.
--output-config
Used with the 'list' command to include detailed template configuration information in the output.
DESCRIPTION
pct-template is a subcommand of the pct (Proxmox Container Toolkit) utility, specifically designed for managing LXC (Linux Container) operating system templates within a Proxmox Virtual Environment (PVE) cluster.
It provides functionalities to download new container templates from official or custom repositories, update existing ones to their latest versions, list available templates stored on various PVE storage backends, and delete obsolete templates.
These templates serve as base images for creating new LXC containers, significantly streamlining the deployment process by providing pre-configured minimal operating systems without needing to install from scratch.
By utilizing pct-template, administrators can ensure consistent and up-to-date container deployments across their PVE infrastructure.
CAVEATS
pct-template is exclusively available on Proxmox Virtual Environment (PVE) installations. It is not a standard Linux command and requires a functional PVE setup.
Internet connectivity is required for downloading and updating templates from external repositories. Template availability depends on the configured Proxmox repositories and any custom URLs provided.
Ensure sufficient storage space on the chosen backend before downloading large templates.
TEMPLATE STORAGE LOCATIONS
Proxmox VE stores container templates on various storage types configured within the system, such as local storage, NFS, or ZFS. Templates are typically found in a dedicated 'template' subdirectory on the chosen storage. The pct template list command helps identify where templates are stored.
AUTOMATING DEPLOYMENTS
Using pct template in scripts allows for automated and consistent deployment of new LXC containers. By pre-downloading or updating templates, administrators can ensure that new containers are always based on the desired and latest images, reducing manual intervention and potential inconsistencies.
HISTORY
The pct-template functionality emerged as part of the Proxmox Container Toolkit (pct), which was developed to simplify the management of LXC containers within the Proxmox Virtual Environment. As LXC container support matured in Proxmox VE, the need for an efficient way to manage container base images became apparent, leading to the integration of template management capabilities. Its development is tied directly to the evolution of Proxmox VE itself, aiming to provide an all-in-one platform for virtualization and containerization.