.vswp file location

1.The .vswp file is created on power-on of the VM. It’s size is equal to the amount of UNRESERVED vRAM. This means if you have a VM with 4GB of vRAM, but 3GB is reserved, the .vswp will be 1GB.

2.The .vswp is used as a last resort if there is contention for physical RAM or we set memory limits on VMs. It is invoked after transparent page sharing or balooning. If you do not over allocate physical RAM to vRAM, then it will never be used. BUT, it is deleted on power off and created on power on.

3.The best practice is leave the file with the VM files.But if vm is storaged in NFS storage, we need change swap location to host storage.If we keep the vswp on the NFS, it has been known to crash.

4.The below is 2 step which changing swap file of vm in ESX4.

On a per-VM basis: Edit Settings -> Options -> Swapfile location. You can set it to store in the host’s swapfile datastore.

To configure the host’s swapfile datastore, go to Configuration -> Virtual Machine Swapfile Location.

Leave a comment