1

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?

3 Answers3

2

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.

2

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 "

0

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.

Paul Doom
  • 841