How to Open and Use VHDX in VirtualBox

Most of the recent Windows operating systems with preinstalled packages/applications are officially available for download in VHDX/VHD file format. Even though these VHD files are mainly made for Microsoft’s server virtualization hypervisor, Hyper-V, we can still use them on Oracle VirtualBox.

We can save a considerable amount of time by using pre-installed virtual machine disk files. This simple guide shows how to open and use VHDX and VHD files in Oracle VirtualBox on a desktop computer.

VHDX Virtualbox

A VHDX file is a virtual hard disk format used by Microsoft. To use a VHDX file in VirtualBox, users can convert it to the VDI format using the VBoxManage tool. This process allows the VHDX virtual machine to be compatible with VirtualBox.


  • VHD: It is an older format of Microsoft Virtual Hard disk. If you have any virtual machine image in VHD disk format, it is simple to attach and use on VirtualBox. You do not need to convert it to any other format.
  • VHDX: It is the upgraded version of VHD. It has lots of improved features than the earlier version. Most of the Microsoft preinstalled images are available in this format. By default, VHDX will be opened as read-only in VirtualBox. As you are aware, with a read-only disk, we can’t boot and use the Operating System. In most cases, the Operating System will not boot from VHDX in VirtualBox.

Virtualbox VHDX

VirtualBox does not support the VHDX format for virtual hard disks by default. However, we can convert VHDX files to VirtualBox-compatible VDI format using tools like StarWind V2V Converter or PowerShell commands. This conversion allows us to use VHDX files in VirtualBox environments.

We Need to Convert the VHDX File

If you have a virtual machine in VHDX file format you want to use in VirtualBox, then you need to convert the file.

We will be covering several ways to convert the VHDX file and attach it to VirtualBox.

How to Convert VHDX to VDI?

If your computer has the VirtualBox program installed, use the below method.

a) Open the command prompt as Administrator.

b) Go to the VirtualBox installation location. Mostly it must be here,

C:\Program Files\Oracle\VirtualBox

c) Execute the following command. Change the correct path of the VHDX file and where you want the output.

VBoxManage.exe clonemedium disk "D:\Windows2019.vhdx" D:\Windows2019.vdi --format vdi

The above command will output the Windows2019.vhdx file to the VDI file format in the D drive. Based on the size of the disk, it will take a few minutes.

Convert VHDX to VHD for VirtualBox

The Oracle VirtualBox supports VHD hard disk format without any issues. So, converting the VHDX file to VHD will help us to mount and use the required VM on VirtualBox.

To do the below steps, you need to have Hyper-V installed on your Windows computer.

Open the Powershell with admin rights, then execute the following command.

Convert-VHD –Path c:\myvms\win2022.vhdx –DestinationPath c:\myvms\win2022.vhd

Mount and Use VHDX on VirtualBox

Let’s assume you converted the VHDX file to VDI or VHD successfully.

You need to create a virtual machine with the proper OS type that you downloaded from Microsoft or other sites. For example, if you downloaded Windows 2016 VHDX, create a new Windows 2016 VM.

Fine-tune the basic configuration of the virtual machine as you like, for example, processor cores, RAM, etc. But instead of creating a new virtual hard disk, you need to open the existing hard disk.

1) After downloading the pre-installed virtual machine VHD/VHDX file from Microsoft, extract it by opening the EXE file.

In this example, I downloaded a Windows 2012 pre-installed VHD file, which will be used to open in VirtualBox.

Expanding VHD

2) Create a Windows 2012 server virtual machine in VirtualBox as below. Make sure to select ‘Use an existing… disk’. Click on the browse button and locate the extracted (or converted) VHD/VDI file.

select the vhd

3) Power on the virtual machine. That will be working from the VHD (or the VDI file) you downloaded/converted.

It is one of the best features of VirtualBox, which supports multiple virtual hard disk formats like VHD, VMDK, HDD, and their VDI.

Read Also: Open IMG files in Windows OS without any tools.

Here is the working Windows 2012 Virtual machine on VirtualBox, downloaded from the Microsoft site as a pre-installed VHD image.

Working VHDX in VirtualBox

Hope this guide is useful in converting the VHDX file to VDI or VHD and then using it in VirtualBox to run the pre-installed Windows Operating System. By the way, this method is applicable to Windows, Linux, and macOS hosts as long as you have the latest VirtualBox.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.

2 thoughts on “How to Open and Use VHDX in VirtualBox”

Leave a Comment