If your virtual disk was thick provisioned before you can't shrink them. The manual says:
(Thick) This is the default virtual disk format. The thick virtual disk does not change its size and from the very beginning occupies the entire datastore space provisioned to it. Thick format does not zero out the blocks in the allocated space. It is not possible to convert the thick disk into thin.
I think it is natural that thick provisioned disk can't get shrinked.
VCP 3 & 4
Author @ vmwire.net
=Would you like to have this posting as a ringtone on your cell phone?=
=Send "Posting" to 911 for only $999999,99!=
Depeding on the distro, there is secure-delete (apt-get install secure-delete). the use sfill -fz.
Find a test system first!!
Then as said s-vmotion or cold datastore migration depending on your license. ESX will "drop" any sector that's just zeros hence the required space is reduced again.
EDIT - a couple of other options here.
Please award points to any useful answer.
Thanks for the response. The two virtual disks are already thin provisioned. I confirmed this by looking into the properties of the VM. The virtual disk in question did at one stage use all the space but has had up to 80 GB removed in the OS. I'll have a look at the dd solution I see in this thread.
Is it still the case that you can't convert thick to thin and zero them out. We're running ESX 4.0. I have a VM that I've tried converting to thin. It is configured for 85GB, but only has about 38GB used. Is there anything I can do to reclaim the space? Thanks.
root@vpesx02 lpord02-thin# vmkfstools -i lpord02-thin.vmdk -d thin lpord02-thin2.vmdk
Destination disk format: VMFS thin-provisioned
Cloning disk 'lpord02-thin.vmdk'...
Clone: 100% done.
Then removed the disk from the VM and added the lpord02-thin2.vmdk disk.
Here is the results of du -h
root@vpesx02 lpord02-thin# du -h lpord02-thin2-flat.vmdk
On the actual Linux VM you can see that all the space is not in use.
root@lpord02-thin ~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 494M 269M 200M 58% /
/dev/sda5 76G 36G 37G 50% /usr
/dev/sda2 2.0G 644M 1.3G 35% /var
tmpfs 1.5G 0 1.5G 0% /dev/shm
Hey, sorry to revive an old thread, but if you are still looking for an answer to this...
on a Linux guest, you need to use DD of something similar to write Zero's on all of the deleted space on the VD. Then do a sVmotion and you can choose to convert to thin provisioned or use same format (since you are already thing provisioned).
This process will definetly work, but I caution you, if you are over allocated, when you run the DD (or sdelete on Windows), the disk space on the VD will get used up to it's maximum before all of the space is reclaimed.
if you have a situation, where one of your VM is only using 10GB of a 100GB VD, when you run the DD process, it will use up that 100GB. So, if you do not have 90GB free on the datastore, it will crash ..
I am pretty sure I have found the solution to this one. It works for me, and makes some sense (it's a bug).
After using "sdelete -c C:", when you Storage vMotion the thin disk to another volume to reclaim the zeroed space, it must be to a volume with a different block size.
Simple as that. Works fine for me.