ID #1032

4. Sparse and Flat - Thin and Thick

The actual size of a virtual disk can be as large as the nominal disk size or it can be as large as the actual used data.
In the first case the virtual disk data is stored in a way like a raw disk image - like it can be created with Linux dd -
would be stored. In fact both formats are the same. In VMware terms this way is called FLAT.
In the second case only changes to the disks are stored in a proprietary way and the files can not be handled by standard tools like Linux dd. In VMware terms this way is called SPARSE.

FLAT virtual disks do not grow when you add data inside the guest. Performance does not degrade over time.
SPARSE virtual disks grow when you add data inside the guest. Performance degrades the longer the disk is in use.

FLAT vmdks are large - but they do not need regular maintenance and monitoring and perform well.
SPARSE vmdks are small - but they do not perform as well and need maintenance to keeep the size small.

FLAT vmdks are quite safe. Data can be extracted with various non-proprietary tools.
SPARSE vmdks are more fragile. Special tools that understand the extra layer must be used to extract data.

Workstation can use FLAT or SPARSE for regular vmdks and it uses SPARSE for snapshots.
ESX always uses FLAT for regular vmdks and SPARSE for snapshots.

When ESX offers to store its FLAT files as thin provisioned this actually uses a feature of the VMFS filesystem.
This is no different vmdk-type. If you copy a thin provisioned vmdk from ESX to a filesystem that does not support
"thin provisioning" it arrives as regular FLAT vmdk - thick provisioned.

So do not mix SPARSE with thin provisioned - that is something really different. Only the effect is similar.

Tags: -

Related entries:

You can comment this FAQ

Comment of Armin:
What are the different vmdk types VMware player (e.g. 4.0.3) supports?

For example I cannot open a thin provisioned flat vmdk file version 8 created on an esxi 5.0 host in vmplayer 4.0.3

A small support matrix would be really nice if you can spare some time.. :)

And yes, I am aware of the existence of vmware converter, but prefer - to be honest - command line tools.
Added at: 2012-05-17 10:07

Comment of Armin:
Small remark to thin provisioning:

This is not only a feature of vmfs, but works using nfs as datastore as well. In my opinion, it uses the 'sparse file' feature of the underlying filesystem.

Iirc 'sparse' means, the sparse feature is handled by reallocating sectors at the vmdk layer whereas 'thin provisioning' uses the sparse feature of the underlying filesystem (if available). Any comments?
Added at: 2012-05-17 10:11