VMware Cloud Community
ppgdtap
Enthusiast
Enthusiast

svMotion failing with "Failed to initialize the swap file"

This is an existing cluster and vMotion between hosts is working fine. We bought a new NFS array and I am in the process of moving our VMs: svMotion worked fine for some VMs but some VMs are failing svMotion with "Failed to initialize the swap file" and I can't see why.

There isn't much in vCenter events that is relevant or helpful:

Event Type Description: Failed to migrate the virtual machine for reasons described in the event message

Possible Causes: The virtual machine did not migrate. This condition can occur if vMotion IPs are not configured, the source and destination hosts are not accessible, and so on. Action: Check the reason in the event message to find the cause of the failure. Ensure that the vMotion IPs are configured on source and destination hosts, the hosts are accessible, and so on.

The vmkernel.log directed me to the vmware.log (attached) for the VM, but I still can't figure this out - any ideas why svMotion is failing? I can see the files being created in the target datastore etc.

2020-11-02T15:31:33.404Z| vmx| I125: [msg.migrate.fail.dst] The source detected that the destination failed to resume.

0 Kudos
6 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: If you wish to post log output that is any longer than above, please use the Attach function in the bottom-right of the post creator/editor.

Thread moved to the vSphere area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
Lalegre
Virtuoso
Virtuoso

Let me ask you something, as this is NFS are all the permissions correctly configured on the array side?

Make sure you are giving R/W to all the NFS Targets which are your ESXi hosts, most accurately the NFS IP in your ESXi. Also please check that there is no ACL like "Only allowing x.x.x.x subnet:"

0 Kudos
ppgdtap
Enthusiast
Enthusiast

Yes, permissions are fine and I've moved ~260VMs already.

It seems the VMs that are failing to svMotion have swap stored in a separate datastore, which is odd considering that on cluster level the Default swap file location is Virtual machine directory and not that separate datastore.

0 Kudos
Lalegre
Virtuoso
Virtuoso

Got it,

Then could you please check on the VM Options of those VMs that are failing if you have also there the Virtual machine directory as file swap location?

0 Kudos
ppgdtap
Enthusiast
Enthusiast

in VM Options / Advanced / Swap file location it says "Datastore specified by host"

and cat pnlvspr3206.vmx | grep swap returns

  • sched.swap.hostLocal = "enabled"
  • sched.swap.derivedName = "/vmfs/volumes/168b0603-eb60b8b8/pnlvspr3206-8453b517.vswp"

I read somewhere that sched.swap.derivedName is regenerated when the virtual machine is powered on - I take it that means even if I reconfigured clusters and hosts correctly, I would need to restart VMs etc.?

0 Kudos
Lalegre
Virtuoso
Virtuoso

Yes exactly, for regeneration you need to delete the value: /vmfs/volumes/168b0603-eb60b8b8/pnlvspr3206-8453b517.vswp

Once you delete the value you need to power-off and power-on the virtual machine again.

0 Kudos