Hyper-V: Error: Virtual hard disk has detected a recoverable error

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Error

EventID 12636 (Microsoft-Windows-Hyper-V-Worker/Admin): 'VM_NAME': Virtual hard disk 'C:\PATCH\TO\YOUR\VHDX.vhdx' has detected a recoverable error. Current status: Disk Full. (Virtual machine ID <VM_ID>)


Cause

The root cause for this problem is not always the same, but maybe the error occurs because of an Hyper-V node crash.


Solution

  • Open PowerShell as Administrator. (This must be run on a server with Hyper-V installed to access the required PowerShell extensions.)
  • Mount the VHDX file (hard disk) to the server, type the following command, and press Enter.
Mount-VHD –Path <C:\PATH\TO\YOUR\VHDX.vhdx> –ReadOnly
  • Use the Optimize-VHD command to scan for zero blocks in the VHDX/VHD files. This process can repair corrupt sectors of the file system. Depending on the size of the hard disk files, this process might take over an hour to complete the repair Type the following command and press Enter.
Optimize-VHD –Path <C:\PATH\TO\YOUR\VHDX.vhdx> -Mode Full
  • Dismount the VHDX/VHD files and test the Virtual Machine. Type the following and press Enter.
Dismount-VHD –Path <C:\PATH\TO\YOUR\VHDX.vhdx>
  • Start the virtual machine from the management console and monitor the boot sequence. If it is a logical issue with the VHD files / VHDX files, there is a good chance this will have fixed the corruption.