How-to specify different swapfile location in VMware
With the VMware ESX 3.5 you can now specify different location of your swapfiles for your VM's. This location can be a global location for your VM's vswp files on an ESX host. Vswp files are created when you power your virtual machine. When you power of your VM the Vswp files are deleted. This file is used only when the host used all its ‘physical memory'.
The size of the vswp file is equal to the amount of RAM of your VM. You can also use the “memory reservation” feature on a VM. This will reduce the size of this vswp file. The vswp file size is equal vm ram amount – memory reservation amount. Let's say you give your VM 1024 Mb of RAM and your memory reservation is 512 Mb. So your VSWP file will be 512 Mb.
You change this setting, go into Configuration – Virtual Machine Swap File Location on the VI Client. You can change the setting to store the vswp files on another datastore also.
But remember that if the datastore you select is not seen by all your ESX hosts then vMotion and DRS will not work. You can also specify an alternate location for your VM's vswp file on an individual basis by editing the VM's vmx file.