Troubleshooting Windows

Fixing a corrupt VHD file – Hyper-V

 

Error message – Failed to open attachment ‘C:\ vhddir \MyVHD.vhd’. Error: ‘The file or directory is corrupted and unreadable.’”

There could be many possible causes why your VHD may become corrupted. More often administrators tend to restore the backup from the snapshot catalog. This is to ensure uptime guarantee. However if we have enough time or in the event of not having a snapshot backup our options are very limited. Below are a few fixes that can be tried to repair the corrupt VHD file.

 

Main causes of data corruption irrespective of a VHD being fixed or dynamic are

  • A faulty or a failing physical storage
  • Data corruption when files are transferred over faulty or failing networks

 

Tracing the chain of events that led to corruption

  • Failure by disconnecting storage while the virtual drive was being created or moved over the network
  • Switching the disk-type from one to the other or expanding the disk may sometime trigger the problem

Fixes to try

  • Mounting the vhd file to the parent partition, and then run chkdsk to repair it.
  • Check for integrity using the Hyper-V. Add the vhd file to the IDE controller and then hit the Inspect button
  • Merge any VHD and AVHD files. Check if it can be opened through windows 7, server 2008 or WinImage (for Virtual PC and Virtual Server VHDs)
  • Finally we can try the free Microsoft vhdtool that includes a “repair” function which is designed to undo an expand operation on a base VHD when differencing VHDs are present

 

Related Articles

  • Growing Disk Space After Resizing a Windows Server

    Once a Windows Server is resized in VMWare, you must grow the disk inside of Windows. Below you will find very simple steps to grow the Volume.   First, Open Computer...
  • How to List Which Apache 2 Modules are Enabled on CentOS 6.x

    View Loaded Apache Modules Just one command: apachectl -M Or, if you want to view the list in alphabetical order: apachectl -M | sort Or, if you want to view...
  • Adding IP’s to Windows Server 2012

    This article will help you add one or more IP’s to windows server 2012.   To start, look on the bottom right of the your display to find a icon...
  • Media tools installation Error/Fix

    While installing media tools like Neroacc, we might come across the following errors   ERROR: ====== /usr/ports/audio/linux-neroaaccodec]# make install clean ===>  Staging for linux-neroaaccodec-1.5.1 ===>   linux-neroaaccodec-1.5.1 depends on file: /compat/linux/etc/redhat-release...