5.2. Disk image files (VDI, VMDK, VHD, HDD)

Disk image files reside on the host system and are seen by the guest systems as hard disks of a certain geometry. When a guest operating system reads from or writes to a hard disk, VirtualBox redirects the request to the image file.

Like a physical disk, a virtual disk has a size (capacity), which must be specified when the image file is created. As opposed to a physical disk however, VirtualBox allows you to expand an image file after creation, even if it has data already; see Section 8.23, “VBoxManage modifyhd” for details.[23]

VirtualBox supports four variants of disk image files:

Irrespective of the disk capacity and format, as briefly mentioned in Section 1.7, “Creating your first virtual machine”, there are two options of how to create a disk image: fixed-size or dynamically allocated.



[23] Image resizing was added with VirtualBox 4.0.

[24] Initial support for VMDK was added with VirtualBox 1.4; since version 2.1, VirtualBox supports VMDK fully, meaning that you can create snapshots and use all the other advanced features described above for VDI images with VMDK also.

[25] Support was added with VirtualBox 3.1.