Pcornel
Virtualization · VM Templates

Generalization

Cheat sheet · https://pcornel.dk/topic.php?topic=3563

Back to the Topic

Answer

Generalization removes machine-specific identity from a template — hostname, SIDs, machine-id, SSH host keys, logs and network config — so every clone gets new, unique identity on first boot.

Remember

  • Windows templates are generalized with Sysprep.

First checks

  • virt-sysprep -a <disk> --operations defaults — generalize Linux image
  • cat /etc/machine-id — should be empty in template
  • ls /etc/ssh/ssh_host_* — host keys removed in template

Verify in this order

template → identity removed → clone regenerates

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=3563

Confirmation

Confirm action

Continue?