A corrupt VHD can spoil your day!
Sometimes the can appear fine, but you are unable to move / copy them as they are written over a bad sector on the disk and the copy process appears to be working fine but then stalls – often with an error about can’t read.
The normal recommended approach is to try the simple things first:
- Run chkdsk on host disk
- Run chkdsk from within vhd (assuming its still opening) – if its a C drive you can attach it direct to another machine (via disk management) so its not in use.
- Try HyperV tools for editing a disk
In my case basic chkdsk tests were fine, editing HyperV disk failed with CRC error every time.
I then ran chkdsk / b on the host machine (which took forever) but did flag up a couple of blocks as bad and sorted it for me.
In the process of hunting though – I also found http://hddguru.com/software/2005.10.02-MHDD/ which is a very powerful low level disk utility. My next try was going to be to use this making sure REMAP was set ON (this is capable of low level scan and sector repairing by remapping the damaged sectors to another area of the disk). You can download it as a bootable ISO so add this into your VM and machine should boot to the tool leaving disks unlocked for surface checks.