Why convert VDI to VHDX?
VDI is VirtualBox's native disk format; VHDX is Microsoft's preferred Hyper-V format, supporting up to 64 TB versus VHD's 2 TB limit. Moving a VM from VirtualBox to Hyper-V on Windows Server or Windows 10/11 Pro requires a .vhdx or VHD disk.
How to convert VDI to VHDX
qemu-img OPEN-SOURCE
Run qemu-img convert -O vhdx -o subformat=dynamic input.vdi output.vhdx after shutting down the VM; add -p for a progress bar on large disks. Available on Windows, macOS, and Linux as part of the QEMU package.
VBoxManage + qemu-img (two-step) OPEN-SOURCE
First convert .vdi to .vhd with VBoxManage clonemedium disk input.vdi intermediate.vhd --format VHD, then convert to VHDX with qemu-img convert -O vhdx -o subformat=dynamic intermediate.vhd output.vhdx. Use only if qemu-img alone is unavailable for the direct step.
About these formats
A VDI file is the native virtual hard disk format of Oracle VirtualBox. It holds a complete guest operating system, not a document or optical disc image. To use it, attach it to a VM in…
Open .VDI details →A VHDX file is a complete virtual hard disk - partition table, filesystem, and often a full OS - stored in one file. It is Microsoft's modern format for Hyper-V VMs, WSL2, and Dev Drive. On…
Open .VHDX details →Quality & what to watch
- VBoxManage cannot output VHDX directly; its
--formatoptions are VDI, VMDK, VHD, and RAW only. - VirtualBox snapshots are not transferred - qemu-img reads the current disk state as a single flat image; merge snapshots in VirtualBox first if needed.
- Use
subformat=fixedinstead ofsubformat=dynamicfor better runtime performance at the cost of a larger file upfront.