Resolves: https://bugzilla.proxmox.com/show_bug.cgi?id=4717
qm: explain vm template Signed-off-by: Yahya Jabary <[email protected]> --- qm.adoc | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/qm.adoc b/qm.adoc index 667fd56..1b7eb22 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1784,12 +1784,48 @@ setting. Virtual Machine Templates ------------------------- -One can convert a VM into a Template. Such templates are read-only, -and you can use them to create linked clones. +Templates are pre-configured VM images converted to read-only state, used as a +base for creating clones. + +*Benefits:* + +* Fast deployment compared to manual configuration +* Consistent baseline configuration across VMs +* Storage savings with linked clones (shared base image) + +*Limitations:* + +* Read-only: updates require creating a new VM, updating it, and converting to + a new template +* Linked clones depend on template availability (deletion breaks all linked + clones) +* Linked clones require snapshot-capable storage: file-based (raw, qcow2, + vmdk), LVM-thin, ZFS, or Ceph RBD +* Standard LVM/iSCSI without thin provisioning not supported + +Creating a Template +~~~~~~~~~~~~~~~~~~~ + +1. Install OS, software, drivers (e.g., VirtIO), and updates +2. Remove temporary files, logs, and sensitive data +3. *Linux*: Remove SSH host keys, network MAC configs, and clear + `/etc/machine-id` +4. *Windows*: Run `sysprep` to generalize +5. Right-click VM > *Convert to template* + +TIP: Use <<qm_cloud_init, Cloud-Init>> for automated customization during +deployment. + +Deploying from Template +~~~~~~~~~~~~~~~~~~~~~~~ + +Right-click template > *Clone*: + +* *Full Clone*: Independent copy, decoupled from template +* *Linked Clone*: Shares template's read-only disks, near-instant deployment + +See <<qm_copy_and_clone, Copies and Clones>> for details. -NOTE: It is not possible to start templates, because this would modify -the disk images. If you want to change the template, create a linked -clone and modify that. VM Generation ID ---------------- -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
