Cant copy VHD file, possibly corrupt. Please help!

Hello everybody,
We've a VM with Windows Server 2008 R2 and we want to put this VM into another server. Everytime we try to copy the VHD files, it comes with "Can't Read source file or disk".
A possible solution, as mentioned before in another post (https://www.experts-exchange.com/questions/27661606/Cant-copy-VHD-file-possibly-corrupt.html), "the fix was to mount the vhd as a hard disk, copy everything off, then create a new vhd, copy everything back on. Then rewrite the boot sector".

We gonna try this one, since we've tried everything. But how is this "rewrite the boot sector" works? How can we do that part?

Thank you!
Att, Victor.

Update 1: We are trying to copy the Windows folder from the VHD and we're getting a lot of errors on the way, linked to the permissions.
Victor AlvesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Victor AlvesAuthor Commented:
We are trying to copy the Windows folder from the VHD and we're getting a lot of errors on the way, linked to the permissions.
David Johnson, CD, MVPRetiredCommented:
A vhd (virrtual hard disk) is treated exactly like any other file on your host operating system.  If you can't copy the vhd using the host machine copy commands when the vm is powered off then your host file system is corrupted and you need to run chkdsk on it.

You can't mount the vhd and copy it all to a new vhd unless you run as 'system' i.e. robocopy with the /B (backup mode switch)  you would also want to use /copy:datsou (or use /copyall ).. personally I'd use backup /restore myself.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.