How to Clone a VM using ESXi command Line

Assuming you have enabled SSH on the ESXi host you can proceed to cloning a VM

  1. Make sure the VM you are cloning is powered off
  2. SSH into the ESXi server
  3. Locate the VM Datastore e.g /vmfs/volumes/datastore/
  4. Create a new directory so that you can copy the new VM into it
  5. Use the following “vmkfstools -i command to clone the VM e.g vmkfstools -i /vmfs/volumes/datastore/SOURCE VM DIRECTORY/SOURCE VM.vmdk /vmfs/volumes/datastore/Target VM DIRECTORY/Target VM.vmdk
  6. Wait for the clone to complete
  7. Log into vSphere create a new custom VM, when you get to “select a disk” choose “use an existing virtual disk” and browse to the TARGET VM DIRECTORY and select the vmdk that you created.

Thats it!

Share and Enjoy:
  • Facebook
  • Google Bookmarks
  • Digg
  • email
  • LinkedIn
  • Live

Leave a Reply