From Windows 2012 the UNMAP capability is enabled by default which means that if the VM is placed in an datastore with VMFS6 format, the ESXi will instruct the array to automatically reclaim the unused space.
Take into account that UNMAP will work with sizes greater than 1 MB and with blocks only aligned with 1 MB, if it is not like that, UNMAP simply will not work. SDELETE was used for Windows Server 2008 r2 to run the UNMAP operations manually.
I suggest you to go over the next section which is not to long and will give you a quick understanding about the configuration and limitations: Space Reclamation Requests from VMFS Datastores
Thank you very much for your accurate answer!
Can I know a little more about Windows version that automatically performs SDELETE? Does Window 10 also perform SDELETE automatically?
I checked in my Windows 10 laptop using the next Powershell command:
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\FileSystem" -Name DisableDeleteNotification
If the value is 0 it means is already enabled and SDELETE is a utility that was used in the past when UNMAP was not an in-guest feature for Windows Server and also Windows Desktop. So regarding to your question, yes, Windows 10 will perform UNMAP automatically.
I would suggest you however to ask into the Microsoft forums to get more deep about the support, limitation and requirements.
Value is 0 on my laptop too! (Windows 10)
Below is a summary of the conditions for Auto UNMAP to work with VMFS6.
1. vSphere 6.5 or later (VMFS 6)
2. Block size is 1 MB or greater than 1 MB
3. OS with auto UNMAP enabled
Is there something I misunderstood?
I learned some really important information because of you!
Thank you for your reply.
You understood everything, those are the basic requirements for it to work!
why would the storage array need to support UNMAP when it's about "punch holes" in the sparse files on the VMFS?
given that fstrim from a linux guest on a nested ESXi on top of VMware workstation works perfectly i strongly doubt that
yes, the growable vmdks hosting ESXi don't and can't shrink but that doesnt matter for reclaim on the VMFS in the middle