Virtual Machine failed to start and error message appears attachment E:\sw.vhdx failed to open because of error: The file or directory is cooupted and unreadable'

haitham hanash 1 Reputation point
2022-01-25T12:02:14.19+00:00

Dear all,

I am facing a disaster in my site. And I wonder if you could support please. Actually, I have a host server and 3 VMs hosted on this psychical server. Unfortunately, unexpected shutdown occurred in my site. After power comes back. I started The psychical server and two virtual machines except one virtual machine. Failed to start and giving error message:

-failed to add device 'Virtual Hard Disk'

-failed to open attachment.

  • Cannot get information for attachment.
  • Failed to open attachment
  • Error, The file or directory is corrupted and unreadable.

Could you please support ?

Thanks a lot....168227-error.jpg

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,529 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,336 Reputation points
    2022-01-25T17:25:53.01+00:00

    Hello

    Thank you for your question and reaching out.

    I can understand you are facing issue with VM disk files.

    As there was power issue I will suggest you first Power-cycle HyperV host to see that if the issue resolve by itself after clean boot.
    If issue still peristst with your VM then try below method to resolve the issue.

    1. Please take backup of current .vhdx file
      2 Open that .vhdx file and mount into Hyper-V host and check the drive letter assigned from Disk management.
    2. Repair that .vhdx file system by below command
      chkdsk /f /r D:\
    3. Create a Test VM and attached .vhdx on IDE contoller and click on Inspect button to repiar the vhdx.

    https://learn.microsoft.com/en-us/archive/blogs/tonyso/how-to-fix-a-corrupted-hyper-v-vhd-file

    ---------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. haitham hanash 1 Reputation point
    2022-01-26T06:42:22.65+00:00

    Actually, I just followed the steps in this article. It helps a lot.
    https://www.itjon.com/the-disc-image-file-is-corrupted-recover-corrupt-vhd-vhdx/
    Thanks @Limitless Technology

    0 comments No comments