Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to know wha thte best way is to make an exact copy of a vhd image and pu tit onto my hard disk. I've tried xcopy but there seems to be a number of issues rlated to permissions when doing this. Ideally I'd like to copy the bits so that they match exactly on the new drive. I encountered this when trying to restore a vista backup only to discover the idiots work who decided to not let me restore a 400 gig image to a 1 TB drive size.

I've sucessfully mounted the drive in Win 7 which is the environment in which I'm trying ot copy these files.

share|improve this question

Robocopy does a much better job than XCopy at preservering ACLs, and like XCopy it's built into Vista/7

share|improve this answer
robocopy sourcedriveletter:\ destinationdriveletter:\ /E /COPYALL – Oskar Duveborn Aug 5 '09 at 22:44

If I were trying to do this, I would create a virtual environment, attach the VHD file, boot from an ISO file with a hard drive cloning utility, and make an image of the virtual hard drive. I would then boot the cloning utility on the physical environment and write that image to the physical hard drive. You could cut out a step if you attached the hard drive to a USB adapter and had it pass through to the VM on the first step.

Here's a good list of utilities to use for cloning:

share|improve this answer

xcopy has key about permissions try xcopy /? and read help

share|improve this answer
/O Copies file ownership and ACL information. – Joseph Jun 20 '09 at 18:15
and when I get access denied errors such as wehn trying to copy the bootmgr folder? – Middletone Jun 20 '09 at 18:18
if you should copy system files- better way create disk image- then restore it to hdd – Alexander Pavluchenko Jun 23 '09 at 4:50

Be aware that XCOPY isn't going to preserve 8-dot-3 filenames. You can't copy them deterministically. That's one reason you can't just XCOPY Windows machines around to "clone" them and expect them to work. Until developers stop referencing 8-dot-3 filenames in their configuration files and registries, we're stuck with this behaviour.

If you want to restore a VHD image to a physical disk, you might have a look at WinImage. I haven't used the VHD functionality personally, but I've used previous version of WinImage to great success.

share|improve this answer

Your Answer


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.