Why convert VDI to VHD?
VDI is VirtualBox's native virtual hard-disk format, while .vhd is Microsoft's format used by Hyper-V and Windows Disk Management. Hyper-V cannot read .vdi files, so migrating a VM from VirtualBox to a Windows Server or Hyper-V environment requires this conversion.
How to convert VDI to VHD
VirtualBox (VBoxManage) OPEN-SOURCE
Shut down the VM, then run VBoxManage clonemedium disk input.vdi output.vhd --format VHD in a terminal. VBoxManage is bundled with every VirtualBox install - no extra download needed.
qemu-img OPEN-SOURCE
Run qemu-img convert -O vpc input.vdi output.vhd for a plain VHD, or qemu-img convert -O vhdx input.vdi output.vhdx for the newer VHDX format. Part of the QEMU package, available on Windows, macOS, and Linux.
Programs that convert VDI
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 VHD file is a complete hard disk stored as a single file - partition table, filesystem, and often a full operating system. On Windows you can mount it in Disk Management to read files, or…
Open .VHD details →Quality & what to watch
- VHD has a 2 TB size limit; if the virtual disk is larger, VBoxManage will fail - use qemu-img with VHDX instead.
- VHDX is more resilient to corruption and supports disks up to 64 TB; prefer VHDX when targeting modern Hyper-V.
- If the source
.vdiis dynamically allocated, the output.vhdwill also be dynamic; Hyper-V handles both types.