Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When we first setup ESXi, we over allocated drive space (allocated 300 GBs of a 250GB hard drive) thinking ESXi would shuffle things intelligently like it does with memory and CPU but found out later it doesn't work that way. We were told there was no way to reduce the allocations without deleting the associated drive and major problems could occur if we use more of the drives than exist.

But today, I found I was able to easily extend a drive without even rebooting and was hoping a could use the same technique to shrink a drive. I was able to shrink the drive through Windows 2008 but when I try to decrease the provisioned size through vSphere, it doesn't let me. In the disk partitioning section, it does show the type as "thin".

Would I be able to decrease the allocation if the VM were powered off? If not, if I just shrink the drives in Windows 2008 below the actual available space, will that resolve the possible problem with more space being allocated than actually exists?

share|improve this question
From reading the accepted answer on this thread,…, it does appear that just decreasing the allocations through Windows Server 2008 would also work for preventing a conflict. – EfficionDave Apr 8 '11 at 22:37
up vote 2 down vote accepted

Did you thin provision the disk to begin with? If yes, you can reduce it's size, but only so far as has currently been consumed.

I would point that also, within this virtual disk, it has a formatted size that the guest has formatted and recognized.

share|improve this answer
How can I tell if it was thin provisioned? There were 70GBs available on the drive overall and through Windows 2008 I've shrunk the drive by 20GBs and that 20GBs is showing as unallocated. – EfficionDave Apr 8 '11 at 22:18
I just looked and it does say "Thin" for the type in the Disk Provisioning box. So, how do I reduce it? When I type the new number in the Provisioned Size box it immediately jumps back up to the previous number when the box loses focus. – EfficionDave Apr 8 '11 at 22:23
I could be wrong about being able to reduce it. Most likely, it won't let you reduce it to any smaller than the number of blocks that have been touched. Basically the "virtual disk" file has grown to a certain size and cannot be truncated, though space inside it has been reduced. I think at this point it will be easier for you to hook up an external disk, provision that as a new datastore and use some tools to create and then copy the virtual disk there to get your space back. Then move it back when it is convenient. – SpacemanSpiff Apr 8 '11 at 22:30

Sounds like the disk isn't thin provisioned in the first place. Power off the VM and clone it using vmkfstools to thin clone the disk and then just add the new disk (cloned) and remove the older in the VM settings.

" vmkfstools -i /vmfs/volumes/datastore1/test-vm/test-vm.vmdk /vmfs/volumes/datastore1/test-vm/testvm-thin.vmdk -d 'thin' -a "

share|improve this answer

First, defrag the drive(s) and then use a disk zeroing tool, (like sdelete -c ) to tidy up. Then, if you have vSphere Enterprise licensing, you can reclaim with a storage vMotion. Right click on the machine, choose "Migrate" and then "Change Datastores". Make the destination type a thin disk and go.

If you don't have the bells and whistles license, or if you want the virtual disk to appear smaller to Windows, use VMware Converter Standalone, (free download from VMware), to perform a V->V (virtual to virtual) conversion. Just make sure to edit the machine's disk(s) and change the destination sizes to the desired value.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.