When you create a VM, you also create a VM Swap file. This swap file is entirely different than the swap file that the guest OS uses. I think we are all probably familiar with Linux swap partitions and windows page files. When the guest OS is running out of memory, it can begin to swap to disk. This all happens OS side and is not at all controlled by the hypervisor. On the other hand, VM swap files are. When a VM is powered on the hypervisor creates a VM swap file equal in size to that of it’s memory allocation. For instance, this guest has a 2 gig memory allocation…
Since it’s powered off, let’s go take a quick look at the data store…
A bunch of files we expect to see, but no swap file. Let’s boot the VM up…
Now we see the swap file (.vswp). The VM will use the swap file when it runs out of physical memory. This has a quite severe impact on VM performance and should be avoided it at all possible.