Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Template Lifecycle

Direct answer

Template lifecycle covers building, patching, testing, publishing, versioning and retiring templates. Update them on a schedule and record versions so new VMs never start out months behind on patches.

When to use this

Use this when managing templates from build to retirement.

First 30 seconds

1. Template lifecycle: build → test → publish → patch → retire.

2. Rebuild rather than patch in place.

3. Track version in name/notes.

4. Retire old templates.

5. Re-test after major updates.

Operational verification

build → test → publish → use → retire

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
virtualization-image
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization-image
Scope / prerequisiteUse this when managing templates from build to retirement.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • No retirement — old templates keep being used.
  • No owner for template updates.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Schedule template rebuilds, for example monthly.
  • Track template versions.
  • Retire old templates so no one deploys them.
Key checks
  • qm list — template versions
  • git log packer/ — image build history
  • Get-VM | ? Notes -match template — Hyper-V notes
ReferenceWhy it matters1 section · depth on demand

Reference

ItemRecord
Versione.g. debian12-2026.11
Base image and checksumSource
Patch levelDate
OwnerTeam
Retire dateWhen replaced
ReferenceImportant terms & boundaries3 sections · depth on demand

In depth

Lifecycle stages

StageActionsEvidence to keep
BuildAutomated build, generalise, qm template <vmid>Build log, package list, source ISO/cloud image checksum
ValidateTest clone, smoke tests, destroy test cloneTest result
PublishName and tag (tpl-debian12-202611), notes fieldChangelog entry
UseAutomation refers to the template by VMID or nameWhich VMs were cloned from which version
DeprecateMark in notes, remove from automationDate
RetireDelete once no linked clones depend on itDeletion date

Find what depends on a template before deleting it

Linked clones keep using the template's base volumes. On Proxmox, base volumes are named base-<vmid>-disk-N and clones reference them:

pvesm list local-zfs | grep base-9000
zfs list -o name,origin -r rpool/data | grep base-9000        # ZFS clones show the origin
lvs -o lv_name,origin pve | grep base-9000                    # LVM-thin

Proxmox refuses to remove a template whose base volumes are still in use. Convert dependants with a full clone or qm move-disk first.

Keep templates and automation in step

Hard-coded VMIDs in Terraform or Ansible point to one template version forever. Prefer a lookup by name or tag, or a variable updated in the same change that publishes the new template, so new VMs get the new build automatically.

Updating without patching in place

Do not start a template to patch it (Proxmox templates cannot be started anyway). Instead:

1. Full-clone the template into a normal VM.

2. Patch, generalise, test.

3. Convert the result into a new template with a new version name.

4. Deprecate the old one.

This keeps every template immutable and reproducible.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works

Templates are built, tested, published, used and retired. Rebuild them on a schedule (monthly patches), version them, and remove old versions so new VMs never start years out of date.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization-image current

Authoritative/upstream documentation reviewed for bounded claims in VM Templates → Template Lifecycle. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://libvirt.org/docs.html · confidence 94%
Confirmation

Confirm action

Continue?