Template Lifecycle
Cheat sheet · https://pcornel.dk/topic.php?topic=3564
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.
Remember
- Schedule template rebuilds, for example monthly.
- Track template versions.
- Retire old templates so no one deploys them.
First checks
qm list— template versionsgit log packer/— image build historyGet-VM | ? Notes -match template— Hyper-V notes
Commands
qm template <vmid>qm move-disk
Verify in this order
build → test → publish → use → retire
Where it usually breaks
First mismatch in guest/app quiescence → hypervisor snapshot/template task → metadata/backing chain → storage durability → restore/clone read-back; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3564