When attempting to create a new VPG or add volumes to the configuration of an existing VPG, the task may fail with an error containing "Cannot allocate memory." This issue is caused by a lack of heap space on an ESX/ESXi host when a large quantity of virtual disk space is active.
This issue can be resolved by following the instructions in the following VMware KB article: An ESXi/ESX host reports VMFS heap warnings when hosting virtual machines that collectively use 4 TB or 20 TB of virtual disk storage
Alternately, this issue can be
resolved by selecting a different target host for the VM or new VPG.