Pcornel
Virtualization · Virtual Machine Lifecycle

Clone

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

Back to the Topic

Answer

Cloning a VM copies its disks and configuration into a new VM, either as a full independent copy or a linked clone. Change identity — name, MAC, IP, hostname, SID — before the clone joins the same network.

Remember

  • The clone must get a new hostname, IP and MAC.

First checks

  • virt-clone --original <vm> --name <new> --auto-clone — clone (libvirt)
  • qm clone <vmid> <newid> --name <new> --full — full clone (Proxmox)
  • Export-VM / Import-VM -Copy -GenerateNewId — copy (Hyper-V)

Commands

qm clone 101 102 --name vm02 --full

Verify in this order

source VM/template → disks copied/linked → new identity

Where it usually breaks

First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible 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=3441

Confirmation

Confirm action

Continue?