Not able to mount corrupted Hyper-V vhdx file

Willem 1 Reputation point

I've made a big mistake, a critical harddisk in my server failed (replication also failed somehow a month ago) and caused my hyper-v vhdx file to go corrupt.

I kind of recovered the hosting harddrive (using disk properties - error checking), and I am able to read the vhdx file, but when I copy it I get "Disk I/O errors". So I made a C# program to copy the file byte-for-byte and just wrote zero's at the places where I could not read the vhdx file.

Before error checking I got errors while copying the file to a different drive: while reading a 4k block at the start (at 8%) of the file and reading a 4k block at the end of the file (at 78%). After error checking I didn't get the error reading the first 4k block (at 8%), but I did get the second error at the 4k block at the end of the file (78%). The rest of the file copied just fine.

I tried mounting this copied disk, but this also doesn't work, I get the same error as I get mounting the vhdx from the corrupted drive: "The disc image file is corrupted".

I'm now trying to find any tool to recover the data, but this quest seems to be very hard and covered with spambots trying a bit too hard to sell me the same shady stuff. Does anyone know of a tool that is safe?

Or maybe some documentation for me to recover the lost data myself, like documentation how to read vhdx files so I can debug what goes wrong.

Some back-info:

  • What went wrong is 1 drive of a 3 drives stripped volume crashed. When I logged into the the client virtual machine, it completely lost connection to the virtual drive, while the host still had access to the drive with vhdx on it. This changed while trying to copy the vhdx file to a different server, while doing so, the host system also lost connection to the drive. I then turned off the server and back on, then the drive reappeared. It then lost connection again while copying with my custom program and then I did a error check on stripped volume and copying when as described before.
  • Host is a Windows Server 2016 server, client is also Windows Server 2016.
  • Stripped volume was made inside disk manager.

I tried (and failed):

  • Converting the vhdx to vhd.
  • Compacting the vhdx.
  • Finding VHDtool online.
  • Finding a "not shady" third party repair tool
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,602 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,481 Reputation points


    Thank you for your question.

    Disk I/O errors which clearly means there is problem with Disk sectors or BAD Blocks on the disk .

    As you have Striped disk volume which can not be read directly by Windows explorer or simply mounting to other server.

    I will suggest you to look for Backup if you have taken and try to restore it.

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    0 comments No comments