Skip to content

Create a Golden Image Template

A golden image is a VM you've configured exactly how you want it — packages, hardening, agents — frozen into a reusable template. New VMs deploy from it as a fast qemu-img clone instead of a fresh OS install.

Quick steps

  1. Build a VM and configure it the way you want every clone to start.
  2. (Recommended, Linux) Bake in the guest agent first — Storage → Library → 🛠 Prepare templates installs and enables qemu-guest-agent so VMs cloned from the template report their IP and heartbeat.
  3. Shut the VM down (the convert will stop it anyway).
  4. VM action menu → Convert to Template (Golden Image).
  5. Watch the task drawer / 🔔 Alarms feed for ✅ Converted to Golden Image template.

The source VM is consumed by the conversion: its domain is undefined and it leaves the inventory. What remains is a template file named <vm>_tmplt.qcow2.

Converting consumes the VM

There's no separate "keep the original" option. If you want to preserve the running VM, clone it first and convert the clone.

Where the template is stored

The conversion happens in place — the disk is renamed where it already lives, so it stays on the same storage tier. The rename is atomic and copies nothing (important for large disks).

VM's storage Template lands at
ZFS /<pool>/<vm>_tmplt.qcow2 (stays on ZFS)
NFS <mount>/<vm>_tmplt.qcow2 (stays on NFS)
Local /var/lib/libvirt/images/<vm>_tmplt.qcow2

MFCloud records where each template landed, so the Deploy VM dialog lists it for that host regardless of which tier it's on.

Ceph / LINSTOR aren't supported

Network-backed disks (Ceph RBD, LINSTOR/DRBD) have no local file to rename, so the convert is refused with the VM left intact — nothing is destroyed. Use a local / ZFS / NFS VM as the golden source instead.

Deploy a VM from the template

  1. Inventory → Deploy VM.
  2. Choose the same host the template lives on (see the caveat below).
  3. Under Image, pick your <vm>_tmplt.qcow2.
  4. Pick any storage backend for the new VM — the template is just the base image, so you can clone a ZFS golden image onto Ceph, NFS, local, etc.
  5. Deploy.

Templates are node-local

A template lives on one node. You can only deploy from it on that same node unless you copy the file to others:

# from the node that has the template, push it to another node:
scp /<pool>/<vm>_tmplt.qcow2 root@<other-node>:/<pool>/

If a template doesn't appear in the Deploy dialog, you've almost certainly selected the wrong host — switch the Host field to the node where you ran the conversion.

Tips

  • Lowercase, hyphenated names clone most cleanly through Cloud-Init.
  • Bake the guest agent before converting — a cloned VM with no agent won't report its IP/heartbeat in the inventory.
  • Deleting a local template (Storage browser) also clears it from the Deploy list automatically. Deleting a ZFS/NFS template currently has to be done on the node (rm the _tmplt.qcow2), and its Deploy-list entry clears on the next master restart.

See also