Corrupt VHD in Hyper-V<p align=left><font face=Arial size=2>When attempting to attach an existing virtual hard drive I get &quot;Failed to open attachment 'C:\ directory \HV10001.vhd'.  Error: 'The file or directory is corrupted and unreadable.'</font></p> <p align=left> </p> <p align=left>The file itself seems OK (I can copy it from disk to disk on the host system).  Is there any way to recover this thing?  I'd really like to avoid rebuilding the whole darn thing from scratch...</p> <p align=left> </p> <p align=left>Thanks,</p> <p align=left>DvS</p> <p align=left> </p>© 2009 Microsoft Corporation. All rights reserved.Thu, 23 Oct 2008 09:16:41 Zcc7be870-b44f-4df1-88b6-7ad9c21068cbhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#cc7be870-b44f-4df1-88b6-7ad9c21068cbhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#cc7be870-b44f-4df1-88b6-7ad9c21068cbDaniel vom Saalhttp://social.technet.microsoft.com/Profile/en-US/?user=Daniel%20vom%20SaalCorrupt VHD in Hyper-V<p align=left><font face=Arial size=2>When attempting to attach an existing virtual hard drive I get &quot;Failed to open attachment 'C:\ directory \HV10001.vhd'.  Error: 'The file or directory is corrupted and unreadable.'</font></p> <p align=left> </p> <p align=left>The file itself seems OK (I can copy it from disk to disk on the host system).  Is there any way to recover this thing?  I'd really like to avoid rebuilding the whole darn thing from scratch...</p> <p align=left> </p> <p align=left>Thanks,</p> <p align=left>DvS</p> <p align=left> </p>Tue, 27 May 2008 20:29:54 Z2008-05-27T20:29:54Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#86b7bcec-f26f-4482-9252-180cc746c7a7http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#86b7bcec-f26f-4482-9252-180cc746c7a7Mike Sterling [MSFT]http://social.technet.microsoft.com/Profile/en-US/?user=Mike%20Sterling%20%5bMSFT%5dCorrupt VHD in Hyper-VIf you copy it to another location, can you attach it from that new location? Try a separate physical disk or volume. <p align=left><font face=Arial size=2></font> </p>Wed, 28 May 2008 15:14:02 Z2008-05-28T15:14:02Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#b23194ed-ee63-4163-ae28-32a719090253http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#b23194ed-ee63-4163-ae28-32a719090253Chang Yinhttp://social.technet.microsoft.com/Profile/en-US/?user=Chang%20YinCorrupt VHD in Hyper-V<div align=left><font face=Arial size=2> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">Hello,</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">You can also try creating a new disk in the same location and then attaching this new created vhd file to the virtual machine.</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">Unfortunately, this sounds like that the vhd file is corrupted, and I am sorry to say that we don't have any straightforward way to get this corrupted vhd file back.</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">Just for your reference, you can try mounting the vhd file to the parent partition, and then see if you can use chkdsk to repair it. Ben gives the method of mounting vhd files in his blog:</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"><a title="http://blogs.msdn.com/virtual_pc_guy/archive/2008/02/01/mounting-a-virtual-hard-disk-with-hyper-v.aspx" href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/02/01/mounting-a-virtual-hard-disk-with-hyper-v.aspx"><font color="#800080">http://blogs.msdn.com/virtual_pc_guy/archive/2008/02/01/mounting-a-virtual-hard-disk-with-hyper-v.aspx</font></a></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">If this cannot help, you may need to recreate the disk.</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'"> </span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">Best regards,</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US style="font-size:10pt;font-family:'Verdana','sans-serif'">Chang Yin</span></p></font></div>Thu, 29 May 2008 11:29:47 Z2008-05-29T11:29:47Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#4643209c-7145-46b2-974b-2460401599d3http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#4643209c-7145-46b2-974b-2460401599d3jazztrumpethttp://social.technet.microsoft.com/Profile/en-US/?user=jazztrumpetCorrupt VHD in Hyper-V I had the same problem with a vhd while migrating from Virtual Server to Hyper-V.<br><br>I was sure the file was OK so I opened it in Virtual PC and it booted again.<br><br>I suspect Hyper-V has some issues with bigger disks / dynamicly expaning disks...Fri, 11 Jul 2008 19:57:30 Z2008-07-11T19:57:30Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#9eb19232-4716-4e03-9f01-2f41bb42318fhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#9eb19232-4716-4e03-9f01-2f41bb42318fKyle iHosthttp://social.technet.microsoft.com/Profile/en-US/?user=Kyle%20iHostCorrupt VHD in Hyper-V<div class=quote><font class=quoteHeader>Daniel vom Saal said:</font> <p> <p align=left><font face=Arial size=2>When attempting to attach an existing virtual hard drive I get &quot;Failed to open attachment 'C:\ directory \HV10001.vhd'.  Error: 'The file or directory is corrupted and unreadable.'</font></p> <p align=left> </p> <p align=left>The file itself seems OK (I can copy it from disk to disk on the host system).  Is there any way to recover this thing?  I'd really like to avoid rebuilding the whole darn thing from scratch...</p> <p align=left> </p> <p align=left>Thanks,</p> <p align=left>DvS</p> <p align=left> </p> <p></p></div><br><br>I was able to fix this error by deleting any snapshots that were listed, removing the .vhd from the virtual machine IDE settings, saving the settings by clicking OK, editing the virtual machine settings again and adding the .vhd back to the virtual machine IDE controller, and booting.<br><br>This problem was caused for me by expanding the .vhd while a snapshot existed.  While the &quot;right click / settings&quot; of the virtual machine will grey out the option to edit the .vhd when a snapshot exists, the disk edit wizard in the main MMC UI will not and thus I was allowed to edit the .vhd while a snapshot existed and corrupted it.Thu, 25 Sep 2008 20:07:57 Z2008-09-25T20:10:16Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#85f55249-e922-4644-ae9c-950ab0da5fbdhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#85f55249-e922-4644-ae9c-950ab0da5fbdtheletterehttp://social.technet.microsoft.com/Profile/en-US/?user=thelettereCorrupt VHD in Hyper-V<div class=quote><span class=quoteHeader>Kyle iHost said:</span> <p> <div class=quote> <p align=left> I was able to fix this error by deleting any snapshots that were listed, removing the .vhd from the virtual machine IDE settings, saving the settings by clicking OK, editing the virtual machine settings again and adding the .vhd back to the virtual machine IDE controller, and booting.<br><br>This problem was caused for me by expanding the .vhd while a snapshot existed.  While the &quot;right click / settings&quot; of the virtual machine will grey out the option to edit the .vhd when a snapshot exists, the disk edit wizard in the main MMC UI will not and thus I was allowed to edit the .vhd while a snapshot existed and corrupted it.</p></div></div><br><br> I did the same thing... but is there a way to salvage the Snapshots?<br><br>(please say yes)<br><br> -eThu, 16 Oct 2008 01:58:01 Z2008-10-16T01:59:08Zhttp://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#3a576aec-9842-4056-91e6-399c3ba37f53http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/cc7be870-b44f-4df1-88b6-7ad9c21068cb#3a576aec-9842-4056-91e6-399c3ba37f53ClasH1http://social.technet.microsoft.com/Profile/en-US/?user=ClasH1Corrupt VHD in Hyper-V I hade the same problem,<br><br>what i did to be able to access the disk again was convert the disk to dynamicly size.<br><br>this made the disk accessable again.<br>however in the guest OS the disk now appers offline by default. you need to reactivatate it and then you can access the data again.<br><br><br>hope it helps<br>greetings<br>ClashThu, 23 Oct 2008 09:16:41 Z2008-10-23T09:16:41Z