Sports

How to Clone a VM on ESXi

By 4 min read 739 views
Featured image for How to Clone a VM on ESXi

Clone VM on ESXi

Cloning a virtual machine on ESXi creates a copy of an existing VM, either as a full independent copy or a linked clone that shares a base disk. The process requires the source VM to be powered off, access to the vSphere Client, and sufficient storage on the target datastore. The steps differ slightly depending on whether you use the thick or thin provisioning model and whether you need a linked or full clone.

More from this site

Keep reading the latest coverage

Browse latest →

Prepare the Source VM

Before cloning, verify the VM is powered off. A running VM cannot be cloned through the standard vSphere Client interface. Confirm the datastore where the clone will reside has enough free space — at least the size of the source VM's virtual disk, plus overhead for snapshots if they exist.

Check VM Tools and VMware Tools

Ensure VMware Tools is installed on the source VM if you plan to sysprep or customize the guest operating system after cloning. This step reduces issues with duplicate SIDs, network conflicts, or tied licenses.

Clone Using the vSphere Client

The vSphere Client provides a built-in clone wizard accessible from the VM inventory. This method works for both full clones and linked clones.

  • Navigate to the VM in the vSphere Client inventory.
  • Right-click the VM and select Clone → Clone to Virtual Machine.
  • Choose a name and destination folder for the clone.
  • Select the target datastore where the cloned disk files will be stored.
  • Choose the disk format: Thick Provision Eager Zeroed, Thick Provision Lazy Zeroed, or Thin Provision.
  • On the customization screen, select whether to customize the guest OS or power on the clone after creation.
  • Review the summary and click Finish.
  • Full Clone vs Linked Clone

    A full clone is an independent copy of the entire virtual disk. It does not rely on the source VM and consumes the full size of the disk on the target datastore. A linked clone shares the base disk with the source VM and stores only the delta changes. Linked clones save space but remain dependent on the parent VM; if the parent is deleted or moved, the linked clone becomes unusable.

    AttributeFull CloneLinked Clone
    Storage UsageFull disk sizeDelta only
    IndependenceCompleteDependent on parent
    PerformanceNo snapshot overheadPotential delta growth
    Best ForProduction, long-term useTesting, snapshots, dev

    Clone a Powered-On VM with vCenter

    If you are using vCenter Server rather than a standalone ESXi host, you can clone a powered-on VM using the Clone to Template or Clone to Virtual Machine option with vMotion involved. The VM remains accessible during the clone operation in certain configurations, though the resulting disk consistency depends on application quiescing and guest OS state.

    Clone Using Command-Line Tools (ESXi Shell)

    Advanced users can clone a VM by copying its files via the ESXi shell or SSH. Locate the VM's VMDK and VMX files in the datastore, then use commands like cp or vmkfstools to create a copy. This method requires manual re-registration of the cloned VM through the datastore browser by creating a new VM and selecting the existing disk files.

    Steps for File-Level Clone

    • Enable SSH on the ESXi host via the Direct Console User Interface or vSphere Client.
    • Navigate to the VM's directory in the datastore using cd /vmfs/volumes/datastore-name/vm-folder.
    • Copy the VMDK files using vmkfstools -i source.vmdk clone.vmdk.
    • Create a new VM, select Existing Hard Disk, and point to the cloned VMDK.
    • Register the VM and power it on after verifying network settings.

    Post-Clone Considerations

    After cloning, check the network configuration to avoid IP conflicts. If the clone will join a domain, run sysprep on Windows guests or adjust the hostname and network identity on Linux guests. Remove any snapshots on the clone if they are no longer needed, as they consume additional storage and can degrade performance.

    Troubleshooting Common Clone Errors

    Cloning may fail if the destination datastore lacks space, if the VM has active snapshots consuming disk, or if file permissions prevent access. A locked VMDK file indicates the source VM is still running or a snapshot process is active. Resolve by powering off the source VM or waiting for snapshot consolidation to complete.

    Editor's pick

    Keep exploring our latest stories

    Fresh reads, picked daily.

    Browse latest
    Share: