Vmware esx create swap file within the esx host

vmware-esxvmware-esxi

i want to create a vmdk file within the the ESX host, currently it creates the vmdk (virtual disks) on the datastore which is mounted from SAN storage.

my idea is to tell esx to use that vmdk so that i can use that as a swap file.

Currently swap files are accessed over the datastore from SAN which i think is the factor for the slow performance.

i am running vmware esx 4.1

any suggestions? how the swap files for all virtual machines be created on the local esx host??

Best Answer

According to VMWare it's done like this:

To edit the virtual machine swap file location in ESX/ESXi 3.5 and 4.x:

  1. Connect directly to your host or to your vCenter Server using the VMware Infrastructure/vSphere Client.
  2. Click the Configuration tab for the ESX host.
  3. Click Virtual Machine Swapfile Location and click Edit.
  4. Specify the datastore where you want to store the virtual machine swap files.
  5. After restarting your virtual machines, ensure the swap file is located on the specified host datastore.

As a side note, did you look at the memory usage and swap file graphics before assuming it's the root of your problem?

If possible, simply adding more RAM to the VM should help more than changing the swap file location.