Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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.

share|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
add comment

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
  http://www.drivesnapshot.de/

  XXCopy - will copy open files (I believe it uses the same snapshot technology)
  http://www.xxcopy.com/

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).

share|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
add comment

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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