none
VHDX file corrupted RRS feed

  • Question

  • Hi guys,Really need your help on this one.

    I have a customer that uses Hyper-V on Windows Server 2012 RTM.

    The earlier IT guy (who was fired today) have been running the whole setup on dynamic disks.

    One of the disks have 3,5 TB of data, and is therefore a VHDX file.
    Today because of the heat the RAID controller reset, and that sadly corrupted the VHDX file.
    Almost all of the VM's are dead, but this VHDX file holds ALL of the company data - such as dokuments, pictures, contracts, profiles, homedirs, and so on (you probably get the picture).
    To top it all, the (now fired) IT guy didn't really check on the backup jobs - so no backup at all.

    This company really needs help. I tried Bing'ing and Googling everything but no help as it is a VHDX and not a VHD file.

    Whenever I try to start the machine, all I get is "Attachment 'D:\VHDs\FILESERVER1.vhdx' failed to open because of error: 'The file or directory is corrupted and unreadable.'."

    I tried attaching it in disk manager with no luck (it will not open). I read that extending the size with VHDResize could uncorrupt the drive could help (but sadly it does not support VHDX format).

    I really need your help here. Please join in with every crazy idea available.. These guys really need help.

    The guy that comes up with a solution will not only recieve the credit, but I personally promise you an ice cold beer if you ever get to Denmark..

    Or if you live in a country that I will ever visit, I will buy you one in your town.

    THANK YOU SO MUCH!!


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Monday, July 21, 2014 6:27 PM

Answers

All replies

  • Hi Martin,

    First take a backup of the VHDX file so that you can test your recovery process. Is there anti-virus program running on the host? Disable it.

    Have you run through the blogpost of Ben: How to fix a corrupted vhd file

    Another tool: VHDTool

    Can you attach the VHD to another VM?

    Monday, July 21, 2014 6:52 PM
  • Use this VHDtool, this has the repair function.

    http://www.arefs.com/file.axd?file=2012%2f10%2fVhdTool.exe

    Monday, July 21, 2014 7:06 PM
  • Hi Trail2012,

    First of all - THANK YOU for your answer.

    I allready tried Ben's blogpost, no help there sadly.

    The VHDTool seems to be deprecated and also not usable for VHDX files?

    I tried with another VM, and a Windows 8.1 machine. Windows Server 2012 tells me it's corrupted.

    Windows 8.1 asks me to Fix the drive, but immediately disconnects the drive so I cannot do so!


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Monday, July 21, 2014 7:15 PM
  • Hi The-Techguy,

    VHDtool seems to only work for VHD and not VHDX... or am I wrong?


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Monday, July 21, 2014 7:15 PM
  • Can you convert back to VHD?

    Convert-VHD .\test.vhdx -DestinationPath .\testFixed.vhd

    Monday, July 21, 2014 7:31 PM
  • Hi again Trail2012,

    The VHDX is over 3TB, and as VHD files can only be 2TB in size it is not possible :(

    Best regards

    Martin Potestas


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Monday, July 21, 2014 8:37 PM
  • Hi Martin,

    I think "VHDtool.exe" applies to VHD file .

    As far as I know , there is no such a software that we can provide to repair VHDX file .

    Maybe some 3rd party software can do that .

    Best Regards

    Elton JI


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    Wednesday, July 23, 2014 6:49 AM
    Moderator
  • You can use Convert-VHD without making a conversion.

    Convert-VHD -Path .\broken.vhdx -DestinationPath .\fixed.vhdx

    You need sufficient storage in the output directory for the new file. I'm not promising that it will fix anything.



    Eric Siron Altaro Hyper-V Blog
    I am an independent blog contributor, not an Altaro employee. I am solely responsible for the content of my posts.
    "Every relationship you have is in worse shape than you think."


    • Edited by Eric SironMVP Wednesday, July 23, 2014 1:35 PM remove accidental line break
    Wednesday, July 23, 2014 1:34 PM
  • Hi Eric,

    Thanks for your suggestion, sadly it didn't work out:

    Convert-VHD : Failed to get the disk information.
    The Hyper-V Virtual Machine Management service encountered an unexpected error: The file or directory is corrupted and
    unreadable. (0x80070570).
    At line:1 char:1
    + Convert-VHD -Path D:\FILE.vhdx -DestinationPath E:\FILE.vhdx
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Microsoft.Hyper...l.VMStorageTask:VMStorageTask) [Convert-VHD], Virtualiz
       ationOperationFailedException
        + FullyQualifiedErrorId : OperationFailed,Microsoft.Vhd.PowerShell.ConvertVhdCommand


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Wednesday, July 23, 2014 3:53 PM
  • Hi Elton,

    I agree, I just can't seem to find a third party tool, and getting the data back is getting really urgent...


    Microsoft: MCP, MCTS, MCITP: SA, MCITP: EA || CIW: Associate, Security Professional || CompTIA: A+, Server+, Linux+ || Citrix: CCA on XenApp || HP: ASP, ASP:SMB || Astaro: ACA, ACE

    Wednesday, July 23, 2014 3:54 PM
  • Well, the thing I would do now is copy the file to some backup location in the hopes that you can find a VHDX parser that will repair the file.

    Then I'd run a chkdsk /f on the volume where it lives. That has a long-shot chance of fixing it enough that the tools you have can at least manipulate it.


    Eric Siron Altaro Hyper-V Blog
    I am an independent blog contributor, not an Altaro employee. I am solely responsible for the content of my posts.
    "Every relationship you have is in worse shape than you think."

    Wednesday, July 23, 2014 4:35 PM
  • Appears so Martin. Sorry.
    Wednesday, July 23, 2014 5:33 PM
  • HI,

    Did anybody find way to fix corrupted .VHDX file ?

    Wednesday, August 27, 2014 12:00 PM
  • Any answer here?  I am having exactly the same issue after my Hyper-V host rebooted suddenly.  Now the one of the VM VHDX file is corrupt.  Tried the convert idea, fail.  Tried mounting, fail.
    Wednesday, June 17, 2015 6:11 PM
  • Here is the rub.

    You corruption would not have been avoided if you were not using dynamic virtual disks.  They are not more corruptible (storage spaces is built on top of them after all).

    A VHDX and a VHD files are extremely similar.  They are both file wrappers around physical blocks on a physical storage device.  It is not just any old file like a word document.

    If a virtual disk is corrupted, what is actually corrupted?  The header and footer that define the VHDX or the actual blocks on the file system.

    This affects your recovery.

    Most likely the contents of your virtual disk (the blocks) corrupted.  And if that is the case, stop thinking of this as a file that you are trying to recover.  You are trying to recover contents.

    Drive recovery services are generally very useful things in situations like this.  If they can recover the blocks, the blocks can be read.

    Also, there are ways of creating virtual disks where the blocks on the file system are not zeroed out.  This is considered a security risk as the physical blocks that you wrap with the header and footer can be read (with the right tools).

    My point; hope is (technically) not lost, yet.

    But it is the approach that you might need to think about.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Wednesday, October 21, 2015 2:44 PM
    Moderator
  • We are creating tool for recovery wait for some time, Iwill reply you  when it is ready

    Wednesday, January 6, 2016 10:58 AM
  • Came across this thread, doesn't apply to my situation, but while researching I came across another site that suggested compacting the drive has recovered it in some situations.

    Old thread, hope you got your data back, but maybe this can help.

    Wednesday, March 2, 2016 2:34 PM
  • Hi Have you tried to convert to VMDK and run as a test on vwmare/virtualbox? StarWind V2V Converter as a suggestion
    • Proposed as answer by Taras Shved Thursday, March 3, 2016 10:08 AM
    Wednesday, March 2, 2016 3:01 PM
  •  StarWind V2V Converter 

    Will do the job for sure. You can get it here https://www.starwindsoftware.com/converter


    • Edited by Taras Shved Thursday, March 3, 2016 10:09 AM
    Thursday, March 3, 2016 10:09 AM
  • How your problem got solved
    Monday, November 12, 2018 11:45 AM