Clone a VMWare virtual machine

Simple one, you have a windows virtual machine and you want to copy it:

  • Copy the folder the VM is in (assuming you use a folder per virtual machine) and rename it to the new host name
  • Click on the .vmx icon (you can rename this file first so it's new-host-name.vmx)
  • Select “Edit this virtual machine's settings”
  • Under Hardware -> Hard Disk -> 'disk file', overtype so its new-host-name.vmdk file name (which you've not renamed yet). You'll get an 'Are you sure' type message, say yes.
  • Under Options, change the virtual machine name
  • Rename the vmdk file with the name that you used in the step above
  • Start up the VM, when all working make sure you change the computer name (My computer -> properties -> Computer name) and if you've hard coded the IP either change it or switch to DHCP

This worked for me using VMWare 4.5.


Comments

5 responses to “Clone a VMWare virtual machine”

  1. It is not working under a VMWare Server.

  2. For me its works with centos 5.
    Thx bealers

  3. Chris, if it doesn’t work…. then you have done something wrong, because it works fine under VMware server 1.0.2

  4. Using VMware server 1.0.4 running on Windows XP I wasn’t able to “overtype so its new-host-name.vmdk file name”.

    the ‘disk file’ box was not editable.

  5. In Vmware server 1.04, its slightly different.
    1. Copy folder, rename vmx file
    2. Edit machine, change hostname
    3. Rename vdmk
    4. Edit settings and add disk you just renamed as existing disk (remove old one)
    5. Start vm and check it works (don’t forget to use newsid)

    Matt