After adding a customer supplied vmdk file to a VM in vCenter I noticed that it was a sparse disk:
It was originally created in VirtualBox which uses this format. To take advantage of the features of thick disk we had to convert it using the vmkfstools command. To do this perform the following steps:
1. SSH onto the ESX server and navigate to the folder containing the vmdk file in sparse format.
[root@ESX1]# cd /vmfs/volumes/san-datastore1/VM1
2. Run the following command to convert VM1.vmdk to VM1-thick.vmdk:
vmkfstools -i VM1.vmdk -d eagerzeroedthick VM1-thick.vmdk
The result will be as follows:
[root@ESX1]# vmkfstools -i "VM1.vmdk" -d eagerzeroedthick "VM1-thick.vmdk" Destination disk format: VMFS eagerzeroedthick Cloning disk 'VM1.vmdk'... Clone: 100% done.
3. Once it completes remove the old sparse disk and then add the newly created thick disk, which is VM1-thick.vmdk, to the VM. You will now see that the format of the disk has changed to thick:
4. Power on the VM and ensure it is working properly.
Reference: vmkstools command syntax