VHDX files are the backbone of data storage in virtual environments. Ensure your data is stored securely and efficiently by utilizing the power of VHDX files. However, these files are susceptible to corruption in order to various reasons like hardware failure, sudden power outages, software issues, or human errors. When a VHDX file becomes corrupt, it can lead to significant data loss and disrupt the entire virtual system. Therefore, it’s vital to repair corrupt VHDX file.
VHDX (Virtual Hard Disk) is a file format used by Microsoft Hyper-V and other virtualization platforms to store the contents of a virtual machine’s hard drive. It serves as the container for the operating system, applications, files, and data. Fortunately, we’ve effective methods and software to repair a corrupt VHDX file and retrieve valuable data. In this guide, we’ll explore the causes of VHDX corruption and delve into the best solutions to recover and repair damaged VHDX files.
В Windows можно монтировать файлы виртуальных жестких дисков в VHD и VHDX формате прямо из консоли управления дисками (Disk Management). Администратор Windows может смонтировать VHD/VHDX файл в проводнике и назначить ему букву диска. Однако при каждой перезагрузке Windows такие виртуальны диски приходится монтировать вручную.
В этой статье, мы настроим задание автоматического монтирования VHD/VHDX дисков при загрузке Windows.
- Откройте консоль управления заданиями планировщика Windows (
Taskschd.msc
) - Создайте новое задание (Create Basic Task);
- Укажите имя задание
AutoMount_MyData_VHDX_G
; - В качестве триггера выберите When the computer starts;
- Action ->
Start a program
; - Откройте свойства задание у укажите, что оно должно запускаться от имени NT AUTHORITY\SYSTEM (Change User or group ->
SYSTEM
). - Перезагрузите компьютер и проверьте, что VHDX диск монтируется автоматически.
Если вы хотите смонтировать VHDX не в отдельный диск, а в папку, измените код PowerShell команды следующим образом:
Skip to content
Convert VHD to VHDX using Hyper-V Manager and Powershell
Convert VHD to VHDX using Hyper-V Manager and Powershell
Table of Contents
Windows 8 Client Hyper-V and Windows Server 2012 Hyper-V onwards VHDX is the new and default format of the virtual hard disk (VDH). Till Hyper-V 2008, everyone was using VHD format and it has many limitations and once the VHDX was available it had many enhancements and everyone started upgrading to the next server version converting their VHD to VHDX.
Protect Your Data with BDRSuite
In this article, we will look at the step by step procedure to convert VHD to VHDX.
Advantages of VHDX
First, let’s look at some of the advantages of VHDX:
- Scalable up to 64 TB
- 4 KB block size and better performance
- Protection against data corruption during power outages
- VHDX file can be resized online
- Better snapshot handling

Methods to Convert a VHD to VHDX
There are two methods you can use to convert a VHD into a VHDX file:
- Using Hyper-V Manager
- Using PowerShell
Points to be noted before conversion
- VHDX files cannot be used on versions of Hyper-V prior to Windows 8 or 2012
- For upgrade scenario, first, upgrade Hyper-V to VHDX supported version then convert VHD
- Conversion is performed offline
- Do not attempt to convert a VHD to a VHDX if any of the following are true:
- You have created a snapshot of the virtual machine
- You are replicating the VHD using Hyper-V Replica
- The VHD is the parent to one or more differential virtual hard disks
Convert VHD to VHDX using Hyper-V Manager
Microsoft Hyper-V team has provided a simple way to convert existing VHDs into VHDX using Hyper-V Manager
- Launch Hyper-V Manager, select and right-click on the virtual machine whose disk you want to convert from VHD to VHDX. Then, choose settings
- From Edit Virtual Hard Disk Wizard, Select the disk you want to convert and Click Next
- Click Next from Locate Disk Page
- Select Convert and click Next
- Select the VHDX format and click Next
- Select the type of converted disk you need, either a dynamically expanding or fixed-size VHDX file and Click Next
- From the Configure Disk option, provide a location to save and name for new converted VHDX file, Click Next
- Click Finish to start the conversion on the Summary page
- Conversion will take time that is based on the size of the disk and backend storage. Once completed, open the settings of the virtual machine and replace the VHD with the VHDX. To do that, open the source VHD file, click on browse and navigate to the location newly created VHDX disk
- Select the disk and Click open
- Click Ok and Start and test the virtual machine











Once the converted disk is available in the virtual machine and it works fine, you may remove the old VHD file
Convert VHD to VHDX using PowerShell
Another method is, we can use to convert VHD to VHDX is PowerShell and this will avoid the time-consuming wizards used by the Hyper-V manager.
Convert-VHD –Path “Source vhd file” –DestinationPath “Destination vhdx file”
Convert-VHD –Path d:\VM01\Disk0.vhd –DestinationPath d:\VM01\Disk0.vhdx
This command is very useful when you want to use a script to automate lots of VHD conversions across many virtual machines.
Change the Disk Physical Sector Size
Check the Disk Sector Size
Get-vhd “VHDX File Name with Location”

Set the Disk Sector Size
set-vhd “VHDX File Name with Location” -PhysicalSectorSizeBytes 4096

Now you have a virtual machine that is using the best kind of virtual machine storage, the VHDX format virtual hard disk.
Related Posts
Beginners’ Guide for Microsoft Hyper-V: VHD vs VHDX Vs AVHD/AVHDX: Overview of Virtual Disk Formats – Part 22
Hyper-V VHDX Optimizations and Resizing
Beginners’ Guide for Microsoft Hyper-V: How to Import OVA into Hyper-V – Part 44
Keep your important data safe with the magic of Hyper-V backup. It’s like a powerful shield protecting your valuable information. You can try it for free!
Try BDRSuite for Free!
Schedule a live demo with one of our product experts
Start your full-featured 30-day free trial
Explore detailed pricing, editions & features
How Does Become VHDX Corrupted And Unreadable?
Common Causes of VHDX File Corruption:
1. Sudden Power Failure: Abrupt power outages during disk operations can lead to VHDX file corruption. As a result, it is necessary to repair corrupt VHDX file.
2. Hardware Issues: Faulty hardware components, such as disk or controller failures, might corrupt VHDX files.
3. Software Errors: Bugs, glitches, or conflicts within the virtualization software can cause VHDX corruption.
5. Human Errors: Accidental deletion, improper shutdowns, or mishandling of virtual machines can result in VHDX corruption.
Here are some common reasons for causing the corruption in VHDX files. Now, we will discuss how to repair corrupted VHDX File.
How to Repair Corrupt VHDX File?
#1. Create a New Virtual Hard Disk:
- Right-click on “My Computer” and choose “Manage.”
- Click on “Disk Management” in the Computer Management system.
- Expand the “More actions” tab and select “Create VHD file.”
- Set up the new VHD file’s properties and click “OK.”
- Transfer all your data to this new file and delete the corrupted one.
The above procedure will help you to repair corrupt VHDX file. If not, opt for the other solution.
#2. Repair using Windows Powershell:
- Enter this command: Dism/Online/Cleanup-Image/ScanHealth, and press Enter to scan and repair the VHD file.
#3. Opt For The VHD Repair Tool:
- Download the Microsoft Virtual Disk Tool (Disk2VHD.exe).
- Launch the tool, select the corrupted VHD file, and click “Repair” to start the repair process.
#4. Fix with CHKDSK Command:
- Before using CHKDSK, unmount the Virtual Hard Disk.
- Type CHKDSK and press Enter to scan and repair the damaged file.
#5. Check Disk Utility By Running:
- To start, turn off the machine and mount the VHDX file on the host server.
chkdsk C: /f /r /x
This scan will check for errors, bad sectors, or corrupted system files and repair them.
#6. Re-install the Operating System Partition:
- If needed, reinstalling the operating system partition is another solution.
- Delete the affected partition and reinstall Windows while ensuring you maintain the same computer name and IP address.
- Use the command below to reinstall Exchange Server and retrieve configurations from the Active Directory:
setup /mode:recoverserver /IAcceptExchangeServerLicenseTerms
This step will resolve issues with the operating system not booting and ensure the Exchange Server is active.
#7. Perform Database Recovery using ESEUtil:
In cases where services are restored but data isn’t, use ESEUtil for database recovery.
- Execute the command Eseutil /r “path to the EDB file” to attempt to fix minor corruption issues in transaction logs or the database.
If the above command doesn’t work, a hard recovery option exists but should be a last resort:
- Hard recovery can recreate the EDB file and remove corrupted data. However, this might not guarantee successful database mounting and is considered risky.
Using hard recovery breaches Microsoft’s support guidelines, and Microsoft might not offer assistance if this method is employed.
If the above methods do not suit well, it requires to repair VHDX File and VHD files. In other words, it may contain severe corruption in your files. With the assistance of the Cigati VHDX RecoveryCigati VHD Recovery Utility, you can effortlessly resolve the inaccessibility from VHDX and VHD files respectively.