This of for (at least) vSphere 7.0 U3.
"vmx swap file" - for swapping (by the hypervisor) content of RAM used by the VMX process to disk
"vswp file" - for swapping (by the hypervisor; and not by the Guest OS) content of RAM used by the Guest OS to disk
Additional info is provided below.
When memory is overcommitted (and provided that there is sufficient free disk space at the time a VM was powered on), the Host can swap part of the memory occupied by the VMX process to disk. This reduces the RAM of the VMX process from about 50MB or more to about 10MB.
This file is 80 MB in size, stored in the VM Home folder, named vmx-<VM Name>-<string of Hex digits>.vswp
A running VM has the following processes or userworlds that run in the VMkernel.
* VM Executable (VMX) - responsible for
** handling I/O to devices that are not critical to performance
** communicating with user interfaces, snapshot managers, and remote console
* VM Monitor (VMM); one for each vCPU of the VM
** responsible for virtualizing the guest OS instructions and managing memory
** passing storage and network I/O requests to the VMkernel; and passing all other requests to the VMX process
* Mouse Keyboard Screen (MKS) - responsible for rendering the guest video and handling Guest OS user input
When a VM is powered on, the Host creates a swap file
* size of which = memxize - memory reservation
* which, by default, is in the VM Home directory (except for SAN or vVols datastore) and named <VM Name>-<string of 8 Hex digits>.vswp
This file is used when the hypervisor wants to swap some part of the Guest OS machine memory to disk.