Convert sparse disk to thick or thin disk

If you use vCenter Converter to a local drive you will need to run this to convert the vmdk files.

Also you may need to run the following to enable this to work:

To load the multiextent VMkernel module, run the following ESXCLI command:

esxcli system module load -m multiextent

To check whether the multiextent VMkernel module has loaded, run the following ESXCLI command:

esxcli system module list | grep multiextent

Found this over at vsysad.com

After adding a customer supplied vmdk file to a VM in vCenter I noticed that it was a sparse disk:

20130531115021

It was originally created in VirtualBox which uses this format. To take advantage of the features ofthick 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.

[[email protected]]# 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:

[[email protected]]# 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:

20130531120533

4. Power on the VM and ensure it is working properly.

Leave a Reply