we have ESX and I want to backup my virtual machine (Win XP) by copying its files.

I do not have access to ESX admin console but I do have read access to my virtual machine files.

  1. I can copy them when the machine is shut down.
  2. I cannot copy the files when the machine is running.

Is there any way (using freeware/open source solution only) how I can copy the files when the virtual machine is running?


How do you have access to the vmdk/vmx files? How are you accessing your VM?

Are you in communication with an admin who does have ESXi console / VSphere Client access?

Snapshots of a running machine solves your problem:

  • First backup windows.vmx (so it doesn't reference the snapshot)
  • Get the administrator to snapshot the VM
  • Copy the windows.vmdk and windows-flat.vmdk (which are read-only at this point)
  • Lastly, get admin to delete the snapshot.
  • You now have a complete backup of your VM.

Edit: If you had shell access, the preferred and fastest way to "copy" a VMDK is using vmkfstools -i /path/to/vmdk -d thin /path/to/vmdk

| improve this answer | |

That's not a good idea. It will change while you copy it and therefore the copy will be in an inconsistent state and will probably be useless as a backup, anyway.

| improve this answer | |
  • didn't think about that – Radek Feb 14 '11 at 0:02
  • the backup/copying files will be done at the time where there is no user activity at all. Midnight or so. – Radek Feb 14 '11 at 0:13
  • Modern OS's are always doing something, like logging. But in any case the file seems to be locked (for good reason), so you can't copy it anyway. – Keith Feb 14 '11 at 1:24

It seems that you need to get a live snapshot. There are a few solutions that will work:

  Drive Snapshot - will backup your entire hard drive, even while you're using it

  XXCopy - will copy open files (I believe it uses the same snapshot technology)

I've used Drive Snapshot to copy live partitions, and after restoring there are no problems that one would typically expect with an improper shutdown, and it will even restore to a larger partition and provide me with an on-the-fly option to increase the size of the partition to whatever I wish (such as the entire size of the destination hard drive).

| improve this answer | |
  • @Randolf: I am looking for freeware/open source solution only – Radek Feb 14 '11 at 3:35
  • I'm not aware of one. Drive Snapshot will work for free for 30 days for backing up, and always restore (even after the 30 day trial runs out), but it's not open source as far as I know. – Randolf Richardson Feb 18 '11 at 5:11
  • There is a tool called G4U that will copy a partition which is free and open source, but it doesn't work on a live system: feyrer.de/g4u – Randolf Richardson Feb 18 '11 at 5:12

A much better option would be to clone the VM and then create an OVA from the clone and copy the OVA. it will be neatly packaged and compressed. This will also prevent you from having to quiesce the running VM

| improve this answer | |
  • Six (hundred) years later say what.... Perhaps you need to flag this for a mod to convert to a comment for you!! See the lovely "flag" option for further detail. – Pimp Juice IT May 8 '17 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.