ESX / ESXi Convert thick to thin disk

Printer-friendly versionPDF version
vmware esxi

There may come a time when you need to expand a disk on a server virtual machine. If you provisioned the disk with Thin provisioning then you can simply go to edit settings and increase the disk amount, log into the VM and open disk management to extend the disk.

Well what if you have a Thick provisioned disk? You will find the option to increase the disk is grayed out! So there are some extra steps you must take to extend the disk. Below is the command to convert your thick provisioned disk to thin:

  • Telnet or SSH to your ESX box
  • Locate where the VMDK file is. If you are unsure of the name of the hard disk you can simply click 'Edit Settings' in vSphere, click your Hard Disk, and you should see the 'Disk File' at the top telling you the drive and the file name.
  • Run: vmkfstools -i thick_disk_file.vmdk -d thin new_thin_disk_file.vmdk
  • This will clone the disk and save it as new_thin_disk_file.vmdk if you kept that name (you can name it whatever you want)
  • After it is done, go to your VM in vSphere Client and click 'Edit Settings'.
  • Select your Hard Disk and click 'Remove'. Select 'Remove from virtual machine' instead of the other option so it won't delete the vmdk file.
  • Click Add and choose to add an existing disk. Select your new thin provisioned disk.
  • Increase the disk space you need
  • Boot the VM, make sure everything is ok, then go to disk management and extend the volume!

When you verify everything is OK you can remove the old thick provisioned disk from the drive.

Post new comment