fbpx

VHD files / VHDX file repair is a custom data recovery service offered by Gillware. Our virtualization experts have extensive experience recovering all sorts of data problems with Microsoft Hypervisors, and in particular, VHDX files.

What do you do when a VHD or VHDX file is corrupted, inaccessible, or damaged? Corrupt VHD files or VHDX files can result in lost data. Before you download a recovery tool or recovery software, we highly recommend you read more about VHDX and VHD file corruption issues and how to handle them.

It is important to stress that VHD file and VHDX repair is a specialist industry that requires deep technical knowledge of Hyper-V and virtual filesystems. We have included some possible remedies and diagnosis techniques on this page, fixing a VHDX file is complicated, and should only be attempted by subject matter experts. If you are in any doubt – contact Gillware immediately.

Attempting to fix a deleted, damaged, or corrupted VHD or VHDX file can result in a permanent inability to recover data from the virtual hard disk device, and in general, it’s best to leave it VHD file recovery to the experts. Get in touch with an expert at Gillware to help you with VHDX and VHD recovery.

Need Help Now?
Our Experts Can Recover Data from VHDX Errors

Talk to an expert about repairing a VHDX file and getting your data back. Get a no-hassle consultation today!

VHDX File Repair vs. Data Recovery: “Real” Corruption vs. “Fake” Corruption

Sometimes a server environment and file system are perfectly healthy, and after a hard shutdown event or malicious malware event, the virtual machine files are legitimately corrupted. We call these hard or real corruptions.

However, sometimes a file can appear corrupted, with the wrong size, failing checksums, or broken delta chains, but the file isn’t corrupt… it’s being presented incorrectly by the hardware, and we call these fake corruptions. This is most often caused by issues with the underlying RAID array, where a stale drive has been forced into the mix, or a troubled drive is failing to read critical sectors. It can also happen when the cache drive has fallen offline or died, rendering the most recent data blocks in the physical volume unavailable.

If you attempt to repair a file that’s fake corrupted, it can and likely will cause permanent data loss. File system scans like MSFT CHKDSK are completely oblivious of the underlying hardware issues, they only see one layer of the error onion, and the methods they use the repair the file system is to truncate (kill) files that don’t look correct. After this, your file system is now valid, but the bad news is you permanently crushed your SQL server files. The SQL server file definition looked off to CHKDSK because there is a drive in the mix that has been offline for 6 months, so every 5th MFT data block was blank or represented historical stale data. So CHKDSK kills the corrupted file definition, restoring the file system consistency and destroying the old data in the process.

But when by the time you ultimately tag in the experts like Gillware, who will notice the stale drive, it can be too late, because you have butchered the production data with CHKDSK. So if your data in these files is business-critical, the best advice is to pick up the phone and tag us in now at 877-624-7206, all the steps in this guide have some risks associated. Data recovery efforts, without a forensic baseline of the underlying storage equipment, are not a zero-sum game. Well-meaning IT professionals, while simply trying to quickly resurrect the data, can cause permanent harm instead when their efforts fail.

Common VHDX Repair Error Codes

There are a number of error codes and error messages that directly or indirectly relate to VHDX corruption issues. Some of the most common we see are:

  • The file or directory is corrupted and unreadable
  • ‘VMName’ failed to start
  • A Virtual Disk Provider for the specified file was not found
  • 0x801F0005 ERROR_FLT_INVALID_NAME_REQUEST. An invalid name request was made. The name requested cannot be retrieved at this time
  • the chain of virtual hard disks is corrupt
  • Invalid virtual machine disk path.
  • Failed to read disk/config file for HyperV VM
  • Failed to open VHD file

What Are VHDX and VHD?

It is a virtualization hypervisor that can run VMs directly on top of the Windows Operating System and is available on Windows Server and Windows 10. Its availability on consumer versions of Windows has proved extremely popular with small businesses, as VHDX opened the door to compelling virtualization technology without the need to purchase expensive additional licenses.

Every virtual machine is assigned a virtual disk drive for any data files and the virtual machine operating system. If you are still running Windows Server 2008 R2 or earlier, your virtual machine disk files will be in the VHD file format. The VHD file standard is now deprecated, and all newer versions of Microsoft Windows / Server use a variant called VHDX as standard. So, if you are running Windows 10 or a Windows Server product since Windows Server 2012, you will be using the now-standard VHDX file format.

What Are VHD/VHDX Files?

No matter what disk formatting standard your virtual machine’s hard disk is stored in, VHD and VHDX files do the same job. Data is stored within the VHD/VHDX container and presented to the Virtual Machine via a virtual storage path.

Files are saved to the hypervisor disk at a location defined when the virtual machine is created. This might use a local disk directly attached to the host, or it might be on an iSCSI attached Storage Area Network (SAN). If you haven’t seen the VHDX files before, simply browse to the location on the hard disk drive using File Explorer and you will find (among other files) the VHD or VHDX files.

Note: The default location for VHD/VHDX files is C:\Users\Public\Documents\ Hyper-V\Virtual Hard Disks

Microsoft’s default configuration for assigning space to a VHD/VHDX file is called a “dynamically expanding” virtual disk. If you are familiar with VMware, it is almost identical to VMware’s thin provisioning of VMDK files. The VHD files will expand as more disk space is needed by the Operating System, up to a hard limit set at the creation of the VMs.

The other configuration is called “fixed disk.” This is the same as VMware’s Thick Provisioning; basically, Hyper-V allocates the entire disk space needed at the time of creation. The VHDK and VHD files will be their maximum defined size no matter how little of the disk is used in real terms.

Understanding this technology is important when repairing VHDX files, as the file type adds more or less complexity to the restore process. The main reason that VHD was dropped in favor of VHDX is that VHD had a maximum file size limit of 2TB, while VHDX ups this figure significantly to 64TB!

What Happens When a VHDX File Goes Bad?

We guess that you have found this guide because something is not quite right with your Hyper-V setup, or you have a damaged file level, file corruption, formatted, or deleted VHDX file (or VHD files). Don’t panic because data recovery from a VHDX file is possible. However, the success rate depends on the specific situation. The most important consideration is the type of storage that is used to house the Hyper-V VHDX files, boot files, or VHD files.

If you are a home or small business user and you are running Hyper-V on a basic setup, for example, one of two hosts with local storage, then recovery is extremely likely. You may even be able to complete the job using an off-the-shelf data recovery tool – more on that later. However, for Enterprise clients with more complicated storage device setups – for example, businesses that use RAID Storage Area Networks (SAN), encryption, or clustered storage solutions – preventing data loss on these types of file systems will likely require specialists like Gillware.

If you are experiencing file corruption and you have lost access to critical business data or important image files, a home fix is out of the question. If you are in this situation, it is best to disconnect the affected virtual machines and leave the VHDX files alone, then call the customer service experts at Gillware. Continued use of the system files will likely limit the possibility of successful recovery.

When VHDX files go bad, you will likely see several warnings or critical errors. The most common manifestation of such errors is when the Virtual Machine enters a critical paused state. The VMs will pause in a frozen state, and remote connections to the server will likely be terminated. The VMs will remain in this state until the storage problem is resolved, or if the storage times out and becomes inaccessible, Hyper-V will power off the VM.

Unless you have server monitoring installed, the first time you realize there is a problem may be the VM refusing to start. You may get an abrupt error message stating “Failed to open xxxxx.vhdx – Error: the file or directory is corrupted or unreadable“. Hopefully, you will have a backup, as often the quickest resolution is to restore from backup, but we guess that one of the reasons you are visiting this website is that you need to repair corrupt VHD files/VHDX files because you have no backup.

In that case – you need to go forensic!

How to Repair a Corrupted VHDX or VHD File

The first thing to do is to confirm the error and make sure you are dealing with a corrupt VHD file or VHDX file. If you are using a Windows 10 or a Windows Server edition of Hyper-V, the event log utility will confirm any problems with the VHD disk files. Simply go to the event log on your Hypervisor host, and search the “Microsoft-Windows-Hyper-V-Worker-Log” and filter for “errors.” The EventID will normally be ID12010, but this may vary depending on the version of Windows you are running. The log will contain detailed information about any VHDX/VHD file corruption issues and which corrupt VHD disk files need repair.

Don’t Attempt an Amateur File Recovery or Use a Repair Tool If The Corrupt VHD File or VHDX File Is Important

If you are happy to accept the risk of data loss from your virtual hard disk and the possibility you may never see your corrupted VHD files again, then there are a few things that can be attempted. However, if you need VHDX repair and your VHD file or VHDX file contains important data, we highly recommend you send the device to use for VHD recovery. Amateur attempts to repair the file can make VHDX and VHD file recovery more difficult or even impossible, and recovery software or a VHDX/VHD file repair tool might make make your corrupt VHD or VHDX problem even worse.

There are some open-source tools and recovery software online that may help, and there are also several paid “VHD Repair Tool” and “Data Recovery Tools,” and often the success rate and user experience for a VHDX/VHD recovery tool will vary significantly.

Need Help Now?
Our Experts Can Recover Data from VHDX Errors

Talk to an expert about repairing a VHDX file and getting your data back. Get a no-hassle consultation today!

Rebuild the VHD Files or VHDX Files Using Windows PowerShell

Only attempt this fix if you know what PowerShell is. We recommend you have some system administrator user experience prior to using the PowerShell Convert VHD repair tool, and you have admin rights on the server to complete the repair.

Step 1 – Open PowerShell utility using Run as Administrator. This must be run on a server with Hyper-V installed to access the required PowerShell extensions.

Step 2 – Mount the VHDX file (hard disk) to the server, type the following command, and press Enter.

Mount-VHD –path x:\xxxx\vdisk.vhdx –ReadOnly

Step 3 – 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. Type the following command and press Enter.

Optimize-VHD –path x:\xxxx\vdisk.vhdx Mode Full

Note: Depending on the size of the hard disk files, this process might take over an hour to complete the repair

Step 4 – Dismount the VHDX/VHD files and test the Virtual Machine. Type the following and press Enter.

Dismount-VHD –path x:\xxxx\vdisk.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.

Mount the VHDX file and Run the chkdsk Repair Tool

Did you know you can mount VHDX files directly to the server? This way, you can manipulate the virtual hard disk file as if it is plugged straight into the server. chkdsk is an incredibly popular and reputable repair tool capable of raw recovery of the virtual hard disk file system.

Step 1 – Open PowerShell using Run as Administrator. This must be run on a server with Hyper-V installed to access the required PowerShell extensions.

Step 2 – Mount the VHDX file to the server, type the following, and press Enter.

Mount-VHD –path x:\xxxx\vdisk.vhdx -PassThru | Get-Disk | Get-Partition | Get-Volume

Note: The above command will display detailed information about the disk. If you see the information, the disk partition table is likely to be free from corruption.

Step 3 – Use the information gathered above to navigate to the disk partition in the command prompt, for example:

cd X:\my-volume\

Step 4 – Now run chkdsk to scan the VHDX file for corruption. Please note this process can take a long time.

chdksk /f /r

Note: the /f and /r switch will force the server to repair corruption on the file system

If any of these fixes have enabled you to start the Virtual Machine, congratulations! If however, you are still experiencing issues – the only option now is to get the disk sent to Gillware’s VHDX Recovery Service.

How Gillware Data Experts Recover VHDX Files

When you decide to contact Gillware, we will immediately expedite the recovery process for you until completion. Our customer service teams send a shipping label for your server, disks, or RAID array (depending on what’s broken). Upon arrival, the media will be cataloged and a digital case will be opened on the customer portal on the Gillware website.

An initial investigation will take place where our VHDX data recovery experts will assess the root cause of the problem. Hyper-V data recovery from a crashed server or SAN can be a difficult and intensive procedure. Essentially, there are two data recovery cases going on in every virtual environment recovery scenario. The first is the recovery of the files from the physical media. The second is the recovery of the files from the virtual media.

If the server or SAN containing your Hyper-V virtual environments crashes, Gillware can help. In these situations, we commonly see the virtual machines stored on RAID-5, RAID-6, or nested RAID arrays. While these arrays are fault-tolerant, they are not failure-proof. A failure of multiple hard drives can occur for a variety of reasons. Our engineers will repair the failed hard drives in your server or SAN and reconstruct the array as best they can. Heavy damage to the drives can lead to “gaps” in the array. These gaps can affect the integrity of your Hyper-V virtual machines.

Our Hyper-V data recovery technicians clone the recovered virtual environments onto physical hard drives for thorough analysis. Through clever use of status mapping, our technicians can cross-reference the failures on your server with the data in your virtual environment. Cross-referencing the status maps helps our engineers make sure we are obtaining the best Hyper-V data recovery results possible.

One of the most complicated VHDX recoveries we have undertaken involved a failed RAID array that contained several production VHDX files. The job involved rebuilding 2 failed disks in our lab, then our RAID specialist rebuilt all the metadata to rebuild the RAID Array. Once the RAID was fixed, our data engineers were able to recover the VHDX files and inspect the integrity of the customer data. In this particular case, we successfully recovered all the client’s data.

Default image
Gillware Data Recovery
Articles: 10