RSS

Clone a VMWare virtual machine

Tue, Apr 18, 2006

System Administration

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.

This post was written by:

Bealers - who has written 352 posts on Darren Beale.


Contact the author

8 Comments For This Post

  1. Chris Says:

    It is not working under a VMWare Server.

  2. Alex Says:

    For me its works with centos 5.
    Thx bealers

  3. Scott Says:

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

  4. http://bigdave.myopenid.com/ Says:

    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. matt Says:

    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

  6. stan Says:

    what about 1.0.6 build 91891?

    and also - could it be enough to just copy snapshot files and xxx-000002.vmdk?

  7. stan Says:

    or maybe all xxx-00000x.vmdk files?

  8. scootcarrouf Says:

    Does it’s work with a vm linux ?

Leave a Reply