Every virtual machine requires a swap file. By default, vCenter Server creates swap files in the same datastore as the other virtual machine files. To prevent Site Recovery Manager from replicating swap files you can configure virtual machines to create them in a nonreplicated datastore.

About this task

Caution:

Under normal circumstances, you should keep the swap files in the same datastore as the other virtual machine files. However, you might need to prevent replication of swap files to avoid excessive consumption of network bandwidth. Also, some storage vendors recommend that you do not replicate swap files. Only prevent replication of swap files if it is absolutely necessary.

If you are using a nonreplicated datastore for swap files, you must create a nonreplicated datastore for all protected clusters at both the protected and recovery sites. The nonreplicated datastore must be visible to all hosts in the cluster, otherwise vMotion will not work.

Procedure

  1. In the vSphere Client, right-click an ESXi cluster and click Edit Settings.
  2. In the Settings page for the cluster, click Swapfile Location, select Store the swapfile in the datastore specified by the host, and click OK.
  3. For each host in the cluster, select a nonreplicated datastore.
    1. Select a host and click the Configuration tab.
    2. In the Software panel, click Virtual Machine Swapfile Location, and click Edit at the top right of the main panel.
    3. On the Virtual Machine Swapfile Location page, select a nonreplicated datastore and click OK.
  4. For standalone hosts that are not part of a cluster, select the host and click the Configuration tab.
  5. In the Software panel, click Virtual Machine Swapfile Location, and click Edit at the top right of the main panel.
  6. Select Store the swapfile in a swapfile datastore selected below, select the datastore, and click OK.
  7. Power off and power on all of the virtual machines in the cluster.

    Resetting the guest operating system is not sufficient. The change of swapfile location takes effect after you power off then power on the virtual machines.

  8. Browse the datastore that you selected for swapfiles and verify that VSWP files are present for the virtual machines in the cluster.