I need to copy some VMs from one datastore to another. I'm running ESX 3.5 U3, VMs are mostly Windows-based. I don't care about data integrity since it's only to test NetApps deduplication on the target destination and the VMs will never be running from this files. Since the VMs are used, i cannot shut them down. If I try to copy it with 'cp' of course I get errors complaining about locked files.

E.g.: "cp: cannot open ....vmdk' for reading: Device or resource busy"

Is there a trick to do this? With dd or cpio?


3 Answers 3


See this article and this one, seems like what you're looking for.

here's the process:

Taking a snapshot of the source VM using vmware-cmd.

Create a new VM and delete all vmdks in it

Copy the vmdk files from your snapshot into your new using vmkfstools.

Fix your configurations files accordinately.

Hope this helps.

  • I've done this a few times, works a treat. You will need to go digging in the config files (vmx/.vmdk's) on the target system if you actually want to be able to power up the resulting VM's but if all you want to do is test dedupe then it shouldn't matter a lot if the resulting files can be used to power up a VM or not.
    – Helvick
    Aug 11, 2009 at 22:24

For anyone reading this thread that has VMware Workstation, then to produce an independent functioning copy (ie a backup) is not possible according to the user guide without shutting down the VM first. The Uranium backup application will copy VMs while they are running but it is not cheap (150 Euro's) for a small startup like mine. I found in practice that simply suspending the VM and copying the files to a backup location works fine; giving a fully independent copy. The VM is only offline during the copy phase, and will resume its programs and files state after the copy is done. When you start the backed up VM it will ask whether you have moved it or copied it. Copying the files of an active VM is understandably risky, as the backup may not function due to state changes during the backup. So I wrote a very basic script to suspend the VM, copy the files to another location, then Resume the VM. Send me an email if you would like a copy.


Try using the VMWare Standalone Converter and use it's "Copy a running machine" option. It will temporarily install an agent; but that should take care of your need to make sure the VM stays running during the conversion.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .