VMotion fails with swap file error
search cancel

VMotion fails with swap file error

book

Article ID: 342593

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction




Symptoms:
  • When migrating a virtual machine, VMotion fails
  • You see an error similar to:

    general system error occurred, failed to open swap file
    Unable to initialize swap file


Environment

VMware ESX Server 3.5.x
VMware VirtualCenter 2.5.x
VMware VirtualCenter 2.0.x
VMware ESX Server 3.0.x

Resolution

VirtualCenter may have multiple entries for the same NFS share using two different addressing schemes. This may cause issues with migration when attempting to reference the NFS datastore.
For example, an NFS share residing on an NFS server that has been configured with an IP address of 192.168.1.50 can be configured in DNS to respond to hostname of nfsserver or nfsserver.domain.local. Each address can be used to to add an NFS share. If the share is added to one host using nfsserver, another host using nfsserver.domain.local, and another host using 192.168.1.50, VirtualCenter has 3 unique entries to the same share. This may cause issues when migrating virtual machines residing on the NFS datastore.
You must ensure that you are using the same addressing scheme across all ESX hosts. Ensure that all NFS mounts/exports have been configured to use the exact same naming convention on each ESX host (FQDN, short name, or IP) or else the resulting volumes have different UUIDs.
When the references to the NFS share are uniform, the UUID for the datastore path changes. You must then remove and add the virtual disks on virtual machines which use the old UUID path:
  1. Edit the virtual machine settings and remove virtual disks which reside on the old NFS mount reference.

    To remove any virtual disks associated to the old NFS hard disk:
    1. In the Virtual Machine Properties dialog box Hardware list, locate the second NFS disk.
    2. Click Remove.

      Warning: Select Remove from virtual machine option when prompted. Do not select Remove from Virtual Machine and delete files from disk as this may lead to data loss.
    3. Click OK.
  2. Right-click on the virtual machine and select Remove from Inventory to unregister the virtual machine.
  3. Re-register the virtual machine:
    1. Right-click the datastore and choose Browse Datastore.
    2. Navigate to the virtual machine or template to add to the Inventory.
    3. Right-click the virtual machine or template and click Add to Inventory.
    4. Follow the steps in the Add to Inventory wizard to finish adding the virtual machine or template.
  4. Restart the VirtualCenter server service. For information more information, see Stopping, starting, or restarting the vCenter Server service (1003895).