Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

4 Answers 4

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

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:

http://serverfault.com/questions/33069

share|improve this answer
add comment

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
1  
if you should copy system files- better way create disk image- then restore it to hdd –  Alexander Pavluchenko Jun 23 '09 at 4:50
add comment

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