# What disk image should I use with VirtualBox, VDI, VMDK, VHD or HDD

disk-imagevirtualbox

Latest versions of VirtualBox supports several formats for virtual disks, but they forgot to provide a comparison between them.

• VDI
• VMDK
• VHD
• HDD

Now, I am interested about a recommendation or comparison that considers the following:

• be able to use dynamic sizing
• be able to have snapshots
• be able to move my virtual machine to another OS or even another free virtualization solution with minimal effort (probably something that would run fine on Ubuntu).
• performance

VirtualBox has

• full support for
• VDI
• VMDK
• VHD
• partial support for
• HDD (Parallels version 2 only)
• and undocumented support for
• QCOW
• QED

Source: Oracle® VM VirtualBox® User Manual » Chapter 5. Virtual Storage » 5.2. Disk Image Files (VDI, VMDK, VHD, HDD)

• be able to use dynamic sizing

VDI, VMDK, and VHD all support dynamically allocated storage. VMDK has an additional capability of splitting the storage file into files less than 2 GB each, which is useful if your file system has a small file size limit.

HDD, QCOW, and QED have to be dynamically allocated if created in VirtualBox.

• be able to have snapshots

VirtualBox supports snapshotting of all six formats.

• be able to move my virtual machine to another OS or even another free virtualization solution with minimal effort (probably something that would run fine on Ubuntu).

VDI is the native format of VirtualBox. Other virtualization software generally don't support VDI, but it's pretty easy to convert from VDI to another format, especially with qemu-img convert.

VMDK is developed by and for VMWare, but VirtualBox and QEMU (another common virtualization software) also support it. This format might be the the best choice for you because you want wide compatibility with other virtualization software.

VHD is the native format of Microsoft Virtual PC. Windows Server 2012 introduced VHDX as the successor to VHD, but VirtualBox does not support VHDX.

HDD is a format for Parallels. Parallels specializes in virtualization for macOS. This probably isn't suitable for you, especially considering that VirtualBox only supports an old version of the HDD format.

QCOW is the old original version of the qcow format. It has been superseded by qcow2, which VirtualBox does not support.

QED was an abandoned enhancement of qcow2. QEMU advises against using QED.

• performance

Each of the formats may have nuanced performance characteristics due to how the block storage is abstracted by the format, but I haven't found any benchmarks comparing the VirtualBox-supported formats.

There are bigger factors that influence performance, such as:

• your physical device limitations (much more noticeable on a hard disk drive than a solid-state driveWhy?)
• expanding a dynamically allocated virtual disk drive (write operations are slower as the virtual disk expands, but once it's large enough, expanding should happen less)
• virtualization technology (hardware vs. software; hardware virtualization helps VirtualBox and improves the speed of virtual operating systems)
• the fact that you are running a virtual operating system. Performance is always slower than running an operating system on the host because of the virtualization overhead.