Issues Converting VHDX to VHD or VMDK to VHD

Niket Kumar Singh 715 Reputation points
2024-07-23T19:39:55.78+00:00

Hello,

I'm having trouble converting VHDX files to VHD files and also VMDK files to VHD files. Here's a detailed breakdown of my situation:

  1. VHDX to VHD Conversion:
  • I have a VHDX file located at C:\Users\azureadmin\Downloads\vhdx\Virtual Hard Disks\demovhdx.vhdx.
  • I need to convert this VHDX file to a VHD file.
    • I have tried using the Convert-VHD PowerShell cmdlet with the following command:
           Convert-VHD -Path "C:\Users\azureadmin\Downloads\vhdx\Virtual Hard Disks\demovhdx.vhdx" -DestinationPath "C:\Users\azureadmin\Downloads\vhdx\Virtual Hard Disks\demovhd.vhd" -VHDType Fixed
      
      • The conversion completes successfully, but the resulting VHD does not boot in Hyper-V.
  1. VMDK to VHD Conversion:
  • I have a VMDK file located at C:\Users\azureadmin\Downloads\demo.vmdk.
  • I need to convert this VMDK file to a VHD file.
    • I tried using qemu-img for this conversion with the following command:
           
           qemu-img convert -f vmdk "C:\Users\azureadmin\Downloads\demo.vmdk" -O vpc "C:\Users\azureadmin\Downloads\demovhd.vhd"
      
      • The conversion completes, but again, the resulting VHD does not boot in Hyper-V.

Troubleshooting Steps Taken:

  • Ensured that the VHD files are uncompressed and unencrypted.
  • Verified the boot order in Hyper-V settings.
  • Attached the VHD to a recovery VM and ran boot repair commands (bootrec /fixmbr, bootrec /fixboot, bootrec /scanos, bootrec /rebuildbcd).

Tools Considered:

  • StarWind V2V Converter: I have considered using this tool but would like confirmation if this is the best approach or if there are better alternatives.

I would appreciate any guidance or suggestions on how to successfully convert and boot these VHD files in Hyper-V.

Windows for business | Windows Client for IT Pros | Storage high availability | Virtualization and Hyper-V
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-07-24T02:43:11.78+00:00

    Hi,

    Please try converting the virtual disk files in Hyper-V Manager.

    1. Open Hyper-V Manager as administrator.
    2. Select "Edit Disk..." from the Actions pane.
    3. Browse to the VHDX file you want to convert and select Convert.
    4. Choose the VHD format for the converted virtual hard disk and set the disk type to fixed size.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.