All Templates
Create an LXC container from any template that pveam offers, with fixed default settings.
all-templates.sh lists the templates from pveam available, downloads the
one you pick and creates a container from it. It installs nothing into an
existing container; it lives in tools/addon/ but works like a small
container creator.
| Run it | On the Proxmox VE host. require_pve_host exits with code 232 anywhere else |
| Target | A new container with the next free ID |
| Templates | Everything in pveam available that matches the host architecture (dpkg --print-architecture) |
| Source | tools/addon/all-templates.sh |
Run
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/all-templates.sh)"Prompts
| Dialog | Answer |
|---|---|
This will allow for the creation of one of the many Template LXC Containers. Proceed? | Yes continues, No exits |
Select a Template LXC to create: | Pick one template. Cancel exits; confirming without a selection shows No Template LXC Selected and exits |
Which storage pool would you like to use for the container template? | Shown only when more than one storage accepts vztmpl. With exactly one, it is used without asking |
Which storage pool would you like to use for the container? | Same rule for rootdir storage. Cancelling either storage dialog exits with code 254 |
What it creates
The container is created with these settings. None of them is asked for:
| Setting | Value |
|---|---|
| ID | pvesh get /cluster/nextid, raised until no VM, container or LVM volume uses it |
| Hostname | The first two dash-separated parts of the template name |
| Type | Unprivileged, features keyctl=1,nesting=1 |
| CPU / RAM / disk | 2 cores, 2048 MB, 8 GB root filesystem |
| Network | eth0 on vmbr0, DHCP |
| Start on boot | Off (-onboot 0) |
| Tag | community-script |
| Root password | Random, 16 characters |
The password is printed at the end and appended to ~/<hostname>.creds on the
Proxmox VE host. The container is started and its eth0 address is printed
(five attempts, five seconds apart, otherwise NOT FOUND).
If the ping-instances.service unit is active, the script stops it during the
run. At the end it starts the unit whenever
/etc/systemd/system/ping-instances.service exists.
Update and remove
The script has neither. The result is a plain container: update it with its
own package manager and remove it with pct destroy.
If a command fails after the ID was chosen, the script stops and destroys the half-created container before reporting the error.
Exit codes
| Code | Meaning in this script |
|---|---|
| 119 / 120 | No storage accepts container disks / container templates |
| 222 | Template download failed |
| 209 | pct create failed |
| 254 | Storage dialog cancelled |
Limits
- No community-scripts application is installed, and no
updatecommand exists inside the container. You finish the setup in its console. - Bridge, resources and privilege level cannot be chosen in the script. Change them afterwards in the Proxmox VE interface.