VMWARE ESXi – Host in HA Cluster must have userworld swap enabled


I had always been using the VMware ESX version in my implementation. As I noticed that VMware seems to be pushing toward the move to ESXi, I had decided to try the latest version for a full scale installation. Though when I was trying to configure HA for my VMware ESXi Cluster, I had been hit with the below error:

HA agent has an error : Host in HA Cluster must have userworld swap enabled

VMware ESXi HA Error

Luckily the VMware support was quite helpfull as the usual and gave me the simple solution for the problem in less than a minute, I was back up and running with HA configured. So I decided to share the solution with you. Read below the steps for the solution:

Well, it end up that ESX Server 3i systems with swap not enabled cannot be added to HA clusters, so you have to enable the Swap in order for HA to work. Below is how you enable the Swap in ESXi.
To enable swap on your ESXi 3 host system:

  1. On the VirtualCenter Server, select the ESXi 3 Server host.
  2. Click the Configuration tab.
  3. Click Advanced Settings.
  4. Choose ScratchConfig.
  5. Configure ScratchConfig.ConfiguredScratchLocation to a valid directory with sufficient space (1GB) to hold the userworld swap file. The userworld swap can be configured on local storage or shared storage.

    Note: Each swapfile needs a unique name across all ESX hosts.

    Using the following Syntax /vmfs/volumes/<DatastoreName>/<folder you want to use for the swap file>  (Ex:/vmfs/volumes/VMFS1/vmware1swap)

Important note: If you are putting your userworld swap file on the shared storage then make sure each server have a dedicated folder for its swap files else it won’t work.

Recommendation: This recommendation I have found stated by VMware nowhere, but of my experience and observation I would recommend to put the userworld swap file on the local storage of each server when possible for the following reasons:

  • You don’t have to create a folder for each server on your shared storage & don’t have to keep up with folders naming
  • You won’t waste a valuable disk space & I/Oson your more expensive SAN storage for swap files
  • SWAP files will get better performance on the local drives
  • If the server crash, you don’t need the swap file to recover. Furthermore, you would have to make sure you keep cleaning up to not to end up with a bulk of unused swap files on your shared storage when replacing servers if you decided to keep your swap file on the shared storage.

Again remember that was my own recommendation & best practice, but it will work just fine if you run it from your shared storage. Some time you got no option but to run it from the shared storage as well ex: running ESXi from flash.

6. Select the ScratchConfig.ConfiguredSwapState option.

    vmware esxi uworld swap

    7. Click OK.

    8. Reboot the ESX Server 3i System

    After you have enabled swap on the ESXi 3 host system, you can add the host to a VMware HA cluster. I hope this save all of you some trouble :).


    One response to “VMWARE ESXi – Host in HA Cluster must have userworld swap enabled”

    1. Dear Eiad

      I love you man….. I have spent 2 days trying to sort my issue out and I followed this and vola! HA is working I am so happy!!! thanks heaps

    Leave a Reply

    Your email address will not be published. Required fields are marked *