Use this when copying a VM or template into a new VM.
Clone · VM Templates
A clone is a copy of an existing VM or template. Generalize it or customize identity (hostname, SID, MAC, IP) on first boot so the copy does not conflict with the original on the network or in the domain.
1. Clones copy a VM or template.
2. Reset identity (hostname, SID, machine-id, SSH keys).
3. New MACs.
4. Full vs linked trade-off.
5. Record source and version.
source → copy → new identity
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
- Clone has new identity (MAC, UUID, hostname).
- Boots and gets the right network.
Step 2 Common mistakes Narrow the fault
- Cloning without generalizing.
- Linked clones used for long-lived production VMs.
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.
- Each clone needs a unique MAC address.
qm clone <vmid> <new>— clone (Proxmox)virt-clone --original <vm> --auto-clone— clone (libvirt)New-VM -VHDPath (copied VHDX)— Hyper-V via disk copy
ReferenceWhy it matters1 section · depth on demand
How it works
Cloning creates a new VM from an existing VM or template. A full clone copies the disks; a linked clone shares the parent's disks and stores only differences.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
What a linked clone really is
A linked clone is a thin disk that stores only differences from a read-only base. With qcow2 this is a backing file; the QEMU qemu-img documentation describes create -b for an image that records only differences from its backing file and info --backing-chain to list the chain.
$ qemu-img create -f qcow2 -b /var/lib/libvirt/images/tpl-debian12.qcow2 -F qcow2 /var/lib/libvirt/images/web01.qcow2
$ qemu-img info --backing-chain /var/lib/libvirt/images/web01.qcow2
image: web01.qcow2
file format: qcow2
virtual size: 20 GiB
disk size: 196 KiB
backing file: /var/lib/libvirt/images/tpl-debian12.qcow2
backing file format: qcow2
image: tpl-debian12.qcow2
file format: qcow2
virtual size: 20 GiB
disk size: 2.1 GiB
disk size of the clone is tiny at first and grows with every block the guest writes.
Proxmox equivalent
qm clone 9000 123 --name web01 from a template creates a linked clone by default on storage that supports it (ZFS clone, LVM-thin snapshot, RBD clone or qcow2 backing file).
Rules that keep linked clones safe
| Rule | Why |
|---|---|
| Never modify the base image | Every clone reads unchanged blocks from it; a change corrupts all of them |
| Keep the base on the same storage | Clones cannot follow the base to another datastore |
| Do not delete the template while clones exist | Proxmox refuses; manual deletion breaks the clones |
| Monitor clone growth | Long-lived clones converge to full size anyway |
When to flatten
A linked clone that lives for years, or must move to other storage, should become independent: qemu-img convert -O qcow2 web01.qcow2 web01-full.qcow2 (libvirt) or qm move-disk / a full clone in Proxmox. Read performance also improves slightly because reads no longer cross the backing chain.
*The QCOW2 backing-chain listing above is an illustrative example, not captured from a lab or production host.*
Reference
| Clone type | Creates |
|---|---|
| Full | Independent copy |
| Linked | Delta disk on parent snapshot |
| Instant (vSphere) | Shares running parent memory |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in VM Templates → Clone. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%