How to clone a Virtual Machine on VMWare ESX 3i 3.5 Server

Enable SSH

  1. Logon to the console by pressing ALT+F1 and typing “unsupported” (Note: there is no prompt for this)
  2. Type vi /etc/inetd.conf and press Enter
  3. Scroll down until you find the line starting with “SSH” and press “x” to delete the “#” from the start of the line
  4. Press Escape twice then type “:wq!”
  5. Reboot the server by typing “Reboot” (Note: Ensure that all virtual machines have been shutdown!)

You can now connect via SSH to the VMWare server.

Cloaning a Virtual Machine

  1. Create a new Virtual Machine and name as required
  2. SSH in to the VMWare server
  3. Type cd "/vmfs/volumes/Data Disk", this will return the actual path to your data disk as a unique ID, e.g. “/vmfs/volumes/49959a05-ea152a4c-549c-000cf18dd31f”
  4. “cd” to the newly created virtual machine and remove the “vmdk” files by typing rm *.vmdk
  5. “cd” back to the virtual machine you wish to clone, e.g. cd /vmfs/volumes/49959a05-ea152a4c-549c-000cf18dd31f/SBS2003_R2
  6. Note the snapshot number, from top to bottom, from the snapshot manager list under VMWare Infrastructure Client.  Now bring up a list of all the vmdks in the current directory, ls -ail *-*.vmdk, you will see that the snapshots are labelled using incrementing numbers, note the correct number for the snapshot you wish to clone (Note: if you have deleted previous snapshots then there map be some numbers missing)
  7. The clone is performed by specificying the snapshot you wish to clone and the destination of the new virtual machine, e.g.
    vmkfstools -i SBS2003_R2-000003.vmdk ‘/vmfs/volumes/49959a05-ea152a4c-549c-000cf18dd31f/New VM/New VM.vmdk’

You can now load the new virtual machine via the VMWare Infrastructure Client.