11.2. Understanding Virtual Disks

Virtual disks are of two types, Thin Provisioned or Preallocated. Preallocated disks are RAW formatted. Thin provisioned disks are Qcow2 formatted.
  • Preallocated
    A preallocated virtual disk has reserved storage of the same size as the virtual disk itself. The backing storage device (file/block device) is presented as is to the virtual machine with no additional layering in between. This results in better performance because no storage allocation is required during runtime.
    On SAN (iSCSI, FCP) this is achieved by creating a block device with the same size as the virtual disk. On NFS this is achieved by filling the backing hard disk image file with zeros. Preallocating storage on an NFS storage domain presumes that the backing storage is not Qcow2 formatted and zeros will not be deduplicated in the hard disk image file. (If these assumptions are incorrect, do not select Preallocated for NFS virtual disks).
  • Thin Provisioned
    For sparse virtual disks backing storage is not reserved and is allocated as needed during runtime. This allows for storage over commitment under the assumption that most disks are not fully utilized and storage capacity can be utilized better. This requires the backing storage to monitor write requests and can cause some performance issues. On NFS backing storage is achieved by using files. On SAN this is achieved by creating a block device smaller than the virtual disk's defined size and communicating with the hypervisor to monitor necessary allocations. This does not require support from the underlying storage devices.
The possible combinations of storage types and formats are described in the following table.

Table 11.1. Permitted Storage Combinations

Storage Format Type Note
NFS or iSCSI/FCP RAW or Qcow2 Sparse or Preallocated  
NFS RAW Preallocated A file with an initial size which equals the amount of storage defined for the virtual disk, and has no formatting.
NFS RAW Sparse A file with an initial size which is close to zero, and has no formatting.
NFS Qcow2 Sparse A file with an initial size which is close to zero, and has RAW formatting. Subsequent layers will be Qcow2 formatted.
SAN RAW Preallocated A block device with an initial size which equals the amount of storage defined for the virtual disk, and has no formatting.
SAN Qcow2 Preallocated A block device with an initial size which equals the amount of storage defined for the virtual disk, and has Qcow2 formatting.
SAN Qcow2 Sparse A block device with an initial size which is much smaller than the size defined for the VDisk (currently 1GB), and has Qcow2 formatting for which space is allocated as needed (currently in 1GB increments).