Вхд 4 всл 2 мд

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.

  1. Откройте консоль управления заданиями планировщика Windows (
    Taskschd.msc
    )
  2. Создайте новое задание (Create Basic Task); создать задание планировщика
  3. Укажите имя задание
    AutoMount_MyData_VHDX_G
    ;
  4. В качестве триггера выберите When the computer starts;
  5. Action ->
    Start a program
    ;
  6. Откройте свойства задание у укажите, что оно должно запускаться от имени NT AUTHORITY\SYSTEM (Change User or group ->
    SYSTEM
    ). запустить задание с правами system
  7. Перезагрузите компьютер и проверьте, что VHDX диск монтируется автоматически. vhdx образ смонтирован

Если вы хотите смонтировать VHDX не в отдельный диск, а в папку, измените код PowerShell команды следующим образом:





Skip to content


BDRSuite Logo

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

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

In this article, we will look at the step by step procedure to convert VHD to VHDX.

:/>  0х0000011b при установке сетевого принтера windows 10

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
Download Banner

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

  1. 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
  2. convert-vhd-to-vhdx

  3. From Edit Virtual Hard Disk Wizard, Select the disk you want to convert and Click Next
  4. convert-vhd-to-vhdx

  5. Click Next from Locate Disk Page
  6. convert-vhd-to-vhdx

  7. Select Convert and click Next
  8. convert-vhd-to-vhdx

  9. Select the VHDX format and click Next
  10. convert-vhd-to-vhdx

  11. Select the type of converted disk you need, either a dynamically expanding or fixed-size VHDX file and Click Next
  12. convert-vhd-to-vhdx

  13. From the Configure Disk option, provide a location to save and name for new converted VHDX file, Click Next
  14. convert-vhd-to-vhdx

  15. Click Finish to start the conversion on the Summary page
  16. convert-vhd-to-vhdx

  17. 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
  18. convert-vhd-to-vhdx

  19. Select the disk and Click open
  20. convert-vhd-to-vhdx

  21. Click Ok and Start and test the virtual machine
  22. convert-vhd-to-vhdx

    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”

    convert-vhd-to-vhdx

    Set the Disk Sector Size

    set-vhd “VHDX File Name with Location” -PhysicalSectorSizeBytes 4096

    convert-vhd-to-vhdx

    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!

:/>  Как в командной строке перейти в нужную папку windows 10

Try BDRSuite for Free!

Experience our cost-effective backup solution for VMs, Servers, Endpoints, Cloud VMs, and SaaS applications. Start your 30-day free trial today no credit card required and no feature restrictions!

Avatar for Rajesh Radhakrishnan
Rajesh Radhakrishnan is a guest blogger for Vembu. He has been in IT industry for over 10+ years and works as a Technical Architect in various industries like Manufacturing & Hi-Tech, Hospitality, Banking. Rajesh is the VMUG Leader of UAE. He is an avid writer and shares his knowledge at vmarena.com.

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. 

:/>  Инфраструктура как код ia c часть 3 желаемая конфигурация состояния dsc

#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. 

Оставьте комментарий