thick thin provision

Converting Thick Provision Lazy Zeroed Disk to Thin on VMware ESXi


The reason why Administrator can start to look for solution on disk conversion from Thick to Thin on VMware ESXi is the low speed of the disk subsystem when writing files. By default, the type of the newly created virtual disk is Thick Provision Lazy Zeroed format, which is adversely affects the future performance of the system. It’s better to use Thin Provision or Thick Provision Eager Zeroed (in this case, the entire disk space is filled with zeros, slowing the process of creating a disk, but increasing the speed of work in the future).

There are two different ways for converting Thick Provision Disk to Thin Provision:

  • using Storage vMotion feature of a VMware vSphere
  • using CLI (the only one way to convert disk on a standalone VMware ESXi host)

Changing the Thick to Thin Provisioning of a virtual disk Using Storage VMotion

Using Storage vMotion feature of a VMware vSphere, you can relocate any virtual machine with disk to different VMFS storage (different LUN) without interruption of services and applications. During migration of VM disks between storages, you can also change the type of the disk.

To get the current disk provisioning type for the specific VM, you have to open it’s settings and check the value of the disk type field. In our case the type of virtual disk is Thick provision lazy zeroed.

convert thick to thin vmware

To change the disk type, you should move VM files to another datastore.

Tip. If you have only 1 VMFS datastore, you can create temporary additional storage on any Windows server and connect it to the ESXi server via NFS.

Open Virtual Machine action menu and select Migrate.

vmware convert thick to thin

Select the migration type Change storage only.

vmware thick to thin

Select Thin Provision as a virtual machine disk format and choose one of the available VMFS/NFS storage on which you want to migrate the VM. Click Next.

esxi thick to thin provisioning

Wait until the virtual machine files will be moved to the new storage.

change thick to thin provisioning vmware

Now make sure that the type of the disc is changed to Thin provision.

thin provision

How to Change Disk Provisioning Type using ESXI CLI

The method of changing disk provisioning type using CLI involves copying current vmdk file to a new thin provisioned disk and removing old thick disk.

At first, you should power off your VM. To connect to the ESXi host CLI over SSH, you have to enable SSH service in the ESXi settings and allow incoming connection on TCP/22 port  (Manage->Settings -> Security Profile).

change thick provisioned disk to thin

Connect to ESXi server as root using favorite SSH client (for example,  Putty) and change directory to the vmfs/volumes:

vmfs/volumes

List the available datastores:

ls –lh

And go to the folder, containing your VM files.

vmkfstools thick to thin

List the files containing in the directory:

ls

We are interested in the file w10rtm-test.vmdk. To convert this file from Thick to Thin, run the following command:

vmkfstools -i w10rtm-test.vmdk -d thin w10rtm-test-thin.vmdk

change from thick to thin provisioning

After the convertation is completed, delete the original Thick disk file w10rtm-test.vmdk:

rm w10rtm-test.vmdk

And rename the resulting Thin disk:

mv w10rtm-test-thin.vmdk w10rtm-test.vmdk

Now using vSphere Client or vSphere Web client open the VM settings and delete old disk (Select Remove from virtual machine). After that add new disk : Add -> Hard Disk -> Use an existing virtual disk -> select file w10rtm-test.vmdk on your datastore->Next->Finish.

vmdk thick to thin

Now, you can power on your VM.

Add Your Comment