Virtual machine swapfile location affects VMotion compatibility in different ways depending on the version of ESX/ESXi running on the virtual machine's host.

Virtual machines on hosts running ESX Server 3.0.x have a virtual machine swap file located with the virtual machine configuration file. Virtual machines on these hosts can be migrated with VMotion only if the destination host can access the VMFS volume where the swap file is located.

You can configure ESX 3.5 or ESXi 3.5 or later hosts to store virtual machine swapfiles in one of two locations: with the virtual machine configuration file, or on a local swapfile datastore specified for that host. You can also set individual virtual machines to have a different swapfile location from the default set for their current host.

The location of the virtual machine swapfile affects VMotion compatibility as follows:

Migrations between hosts running ESX/ESXi version 3.5 and later: Migrations with VMotion and migrations of suspended and powered-off virtual machines are allowed.

During a migration with VMotion, if the swapfile location specified on the destination host differs from the swapfile location specified on the source host, the swapfile is copied to the new location. This can result in slower migrations with VMotion. If the destination host cannot access the specified swapfile location, it stores the swapfile with the virtual machine configuration file.

Migrations between a host running ESX/ESXi version 3.5 and later and a host running an earlier version of ESX Server: Migrations of suspended and powered-off virtual machines are allowed. If the virtual machine is configured to use a local swapfile datastore, attempting to migrate it to a host that does not support this configuration produces a warning, but the migration can proceed. When the virtual machine is powered on again, the swapfile is located with the virtual machine.

Migrations with VMotion are not allowed unless the destination swapfile location is the same as the source swapfile location. In practice, this means that virtual machine swapfiles must be located with the virtual machine configuration file.

See the vSphere Client online Help for more information on configuring swapfile policies.