copy vmware vmdk files while vm is running

Solution 1:

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.

Solution 2:

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.