I found a work-around by following this KB: VMware Knowledge Base
1. I unregistered the VM.
2. I downloaded the .vmx and added the following line:
sched.swap.dir = /vmfs/volumes/datastore_name/dir_name
also created the 'dir_name' otherwise u receive a 'monitor loop' error.
3. uploaded the .vmx backup and registered the VM.
The Swap file is now on the datastoreSwap, the right location as i had already configured in the global swap location.
I am under the impression that this is a bug and that this has to be solved by VMware!
It is also possible to just edit the parameters.
Edit Settings \ VM Option \ Advanced \ Configuration Parameters - Edit Configuration
add the parameter:
Thanks a bunch, ahautomation. Worked perfectly for me.
Seems somewhat confusing to have the swap file location be only configurable from the base GUI pages for the host. Perhaps it would be nice if one could designate a swap file location during host setup, or maybe guest setup. Not familiar with true enterprise deployment though. vCenter server or one of its colleagues might make this trivial.
This also fixed my issue, as all of the built in configurations will not resolve this on a standalone ESXi 6.5 Update 3 host.
I couldn't expand my Memory on this VM until I was able to relocate the swap to a Datastore with more Free space.