VMware vSphere ESXi 6.5
VMware vSphere ESXi 6.7
VMware vSphere ESXi 7.x
This issue has been fixed in ESXi 8.0. (preserving the same provisioning type of the vmdk).
Fix has been incorporated in ESXi not vCenter. Only vCenter 8.x can't fix this issue.
Workaround (for ESXi 7.x or below):
1) If you need to extend the VMDK and want the VMDK to be EagerZeroedThick, run this command: (You need to power off the virtual machine)
~ # vmkfstools -X 6G -d eagerzeroedthick /vmfs/volumes/<datastorename>/<vmname>/<vmname>.vmdk
Grow: 100% done.
All data on /vmfs/volumes/<datastorename>/<vmname>/<vmname>.vmdk will be overwritten with zeros from sector <8388608> onwards.
Zeroing: 100% done.
Note: -X 6G denotes the extended new size of the datastore (not increasing size) - in this case 6 GB.
If you extend the disk by using UI, you have no control over all the options to extend the disk. As a result, the EagerZeroedThick VMDK automatically becomes LazyZeroedThick.
For further information, see: Extending a Virtual Disk
2) If you have already extended an EagerZeroedThick VMDK via the UI and it now reports LazyZeroedThick format, convert the VMDK back to EagerZeroedThick by running this command: (You need to power off the virtual machine)
vmkfstools --eagerzero /vmfs/volumes/<datastorename>/<vmname>/<vmname>.vmdk
For additional information see: Converting a Zeroedthick Virtual Disk to an Eagerzeroedthick Disk
3) Verification
Run
vmkfstools -t0 /vmfs/volumes//<datastorename>/<vmname>/<vmname>.vmdk
This will display the Mapping(file offset <-> physical location) for the file.
if you see two (or more) different sections like this, then the disk is still split between LazyZeroedThick and EagerZeroedThick ('Z' means "Lazy Zeroed")
Mapping for file /vmfs/volumes//<datastorename>/<vmname>/<vmname>.vmdk(4294967296 bytes in size):
[ 0: 2147483648] –> [VMFS — LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 581291737088 –> 583439220736)]
[ 2147483648: 2147483648] –> [VMFS Z- LVID:4e5cda72-26b067db-5bc1-d8d3855ff8b4/4e5cda72-14e9dc64-690f-d8d3855ff8b4/1:( 583439220736 –> 585586704384)]
For more information, see Determining if a VMDK is zeroedthick or eagerzeroedthick (1011170)
4) Refreshing the virtual machine information on vCenter server.
Run following command on the esxi host.
vim-cmd vmsvc/reload <vmid>
For more information, see Reloading a vmx file without removing the virtual machine from inventory (343248)