This script will go through a single host, or each host in a designated cluster, and set /Mem/SwapExtendChunkSizeInMB to either 0 or 65536
Used to mitigate KB 2150316 https://kb.vmware.com/kb/2150316
Tested on vSAN 6.6 and PowerCLI 6.5.4
Syntax is: To Set to Max Vsan-SetSwapChunkSize.ps1 -Target <Target> -Type <cluster/host> -ChunkSize max To Set to Default Vsan-SetSwapChunkSize.ps1 -Target <Target> -Type <cluster/host> -ChunkSize default
This is only applicable to ESXi hosts with vSAN 6.5 or greater
Blog covering this situation here: https://blogs.vmware.com/virtualblocks/2017/12/12/virtual-machine-with-more-than-64gb-memory-fails-to-storage-vmotion-to-vsan-cluster/