Product Documentation

Copying VMs and Templates

Nov 20, 2012

You can create new VMs and templates by copying (cloning) an existing VM or template. XenServer has two mechanisms for copying VMs and templates, full copy or fast clone:

  • Full copy makes a complete copy of the VM's disks.
  • Fast clone (Copy-on-Write) writes only modified blocks to disk, using hardware-level cloning features for copying the disks from the existing VM to the new VM. This mode is only supported for file-backed VMs. Copy-on-Write is designed to save disk space and allow fast clones, but can slightly slow down normal disk performance.

You can only copy a VM directly within the same resource pool. To copy a VM to a server in a different pool, you will need to export the VM and then import it to the destination server.

To copy (clone) a VM

Important: Before copying a Windows VM, you should use the Windows utility sysprep to ensure the uniqueness of the Security IDs (SIDs). Copying a VM without first taking the recommended system preparation steps can lead to duplicate SIDs and other problems. See the XenServer Virtual Machine User's Guide instructions on cloning VMs and running sysprep.
  1. If the VM you want to copy is a Windows VM, run the sysprep utility as described in the XenServer Virtual Machine User's Guide.
  2. If the VM is running, you must shut it down before you can copy it.
  3. Select the VM in the Resources pane, and on the VM menu, click Copy VM.
  4. Enter the name of the new VM and (optionally) a meaningful description of it.
  5. Select the copy mode: Fast clone or Full copy.
  6. If you choose Full copy as the copy mode, select the storage repository (SR) where you want to copy the VM's virtual disks. If you are moving a VM from local to shared storage, make sure that you select a shared SR here.
  7. Click Copy.

To copy (clone) a template

  1. Select the template in the Resources pane, and on the Templates menu, click Copy Template.
  2. Enter the name of the new template and (optionally) a meaningful description of it.
  3. Select the copy mode: Fast clone or Full copy.
  4. If you choose Full copy as the copy mode, select the SR where the copied virtual disks will be placed.
  5. Click Copy.