Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

vMotion "Timed out waiting for migration data": find why the destination heard nothing from the source

Technical article
VMware

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Timed out waiting for migration data. is the end of a vMotion failure that reads Migration to host <address> failed with error Connection closed by remote host, possibly due to timeout (195887167). Broadcom's KB 324526 says that during vMotion the source sends the virtual machine's memory pages to the destination, and that if the destination receives no data from the source for a default period of 120 seconds, vMotion fails with this error. The KB points at the network between the hosts.

What the error means

The failure can come at any time during the task, not only at the start. Nothing in the message says which side stopped sending. Broadcom's pages describe two families of cause:

  • The vMotion network. KB 324526 attributes the error to the network connectivity of the hosts and lists three checks: IP address conflicts on the vMotion network, packet loss between the vMotion VMkernel interfaces, and security settings that differ between the vMotion VMkernel port groups.
  • Storage under a Storage vMotion. KB 426222 (ESXi 8.x and ESX 9.x) shows a Storage vMotion that fails with The source detected that the destination failed to resume ...Timed out waiting for migration data. because the device behind the source datastore was in Permanent Device Loss (PDL) after a storage disconnection.

Failures that name CPU compatibility, EVC or a missing device are a different problem. "vMotion fails: telling CPU compatibility, device dependencies and the vMotion network apart" covers those.

Likely causes

Cause What you see How to confirm
Two vMotion VMkernel interfaces share an IP address Migrations to or from one host fail Compare the vMotion VMkernel addresses of every host in Configure, VMkernel adapters
Packet loss on the vMotion path The task fails at an unpredictable point vmkping from the source to the destination's vMotion address loses packets during a migration
MTU differs along the path Small pings pass, large ones with the do-not-fragment flag fail vmkping -d -s <MTU minus 28> fails
Security settings differ between vMotion port groups A failure when one side allows promiscuous mode and the other does not Compare the security settings of the two port groups
No connectivity between the vMotion interfaces Plain vmkping fails Ping from the source's vMotion interface to the destination's address
Storage vMotion with a source device in PDL Lost access to volume and PDL error lines in the logs hostd.log and vmkernel.log on the source host

Prove the cause before changing anything

Checks 1, 2, 3 and 5 only read. Check 4 starts a migration and is set out under Fix.

1. Identify the vMotion interface on each host. KB 344313 says to find the VMkernel interface tagged for vMotion with the vSphere Client, in Hosts and Clusters, Configure, VMkernel adapters, and to note its MTU. Write down the IP address, the VMkernel name (vmk1, for example) and the MTU for both hosts. Two hosts with the same address, or an address on a different subnet from the other host's, is the first thing to find.

2. Find the physical uplink. In esxtop, press n and read the Pnic column for the VMkernel interface. KB 344313 uses this to build the data path.

3. Test the path with vmkping. The -d flag sets the do-not-fragment bit, and KB 344313 says to take the size from the MTU minus 28. For MTU 1500 that is 1500 - 28 = 1472, and for MTU 9000 it is 9000 - 28 = 8972:

vmkping -I vmk1 192.0.2.12 -s 8972 -d -c 3

Use the VMkernel name and the destination's vMotion address. If the interface uses the vmotion TCP/IP stack, KB 344313 says to add -S vmotion to the end of the command. A good result shows 0% packet loss. A bad result shows 100% packet loss.

4. Test for loss for the whole migration. KB 324526 says to ping the destination's vMotion address for the duration of the vMotion. That means starting a migration, which changes something, so it is set out as its own step under Fix, "Sample loss during a test migration".

5. Rule out storage. If the failure is a Storage vMotion, or the message follows a storage event, search the source host's logs:

grep -E "Timed out waiting for migration data|Lost access to volume" /var/run/log/hostd.log
grep "PDL error" /var/run/log/vmkernel.log

KB 426222 shows these lines in that case, with a PDL error (0x5/0x25/0x0) for the source device.

Fix

Sample loss during a test migration

KB 324526 says to ping the destination's vMotion address for the duration of the vMotion. KB 344313 gives -c 900 -i 0.1 for 900 attempts at 10 per second, which is 900 x 0.1 = 90 seconds. The failure comes after 120 seconds of silence, so use -c 1800 -i 0.1, which is 1800 x 0.1 = 180 seconds.

First write down which host the test VM runs on now, in the change record. Use a non-critical VM.

Risk: the next step starts a vMotion of a VM, which loads the vMotion network that is already failing, and a failed attempt can leave the task running for minutes.

Start the ping on the source host, then start the vMotion of the test VM to the destination host. Read the loss at the end:

vmkping -I vmk1 192.0.2.12 -s 1472 -d -c 1800 -i 0.1

To undo it: if the migration runs long, cancel it from Recent Tasks in the vSphere Client. If it completes, migrate the test VM back to the host you wrote down.

Network changes

KB 324526 gives the checks above but no steps to change the network, and no portal path for the port group security settings. What it prescribes is below. Each is a change to a live network, so make it through your change process.

First record, for each host, the vMotion VMkernel name, IP address, MTU and the port group security settings. KB 344313 names the vSphere Client path for the first three: Hosts and Clusters, Configure, VMkernel adapters. Write the values in the change record before any change.

Risk: changing a vMotion VMkernel address, the security settings of a port group or an MTU affects every migration that uses that network, and an MTU change must match on the VMkernel interface, the virtual switch, the uplinks and the physical switch ports.

  • Duplicate address. KB 324526 says each host in the cluster should have a vMotion VMkernel interface with its own unique IP address.
  • Packet loss. Find and correct the loss between the two vMotion interfaces: the uplink, the cable, the switch port or the VLAN. The KB gives the ping test and no cause list.
  • Security settings. KB 324526 says each vMotion VMkernel port group must have the same security settings. Its example is a source port group that allows promiscuous mode while the destination disallows it.
  • MTU. Make the MTU the same on every hop, as in "vmkping -d -s 8972 fails: find the jumbo-frame MTU mismatch on ESXi storage or vMotion".

To undo it: set the recorded values back on the same objects, then repeat the vmkping test from check 3.

Storage vMotion case

KB 426222 says the host is stuck in a software retry loop after the earlier disconnection and that the way to clear it is to plan a maintenance window and reboot the affected host.

Disruptive step: a host reboot stops every VM on that host unless they are moved first, and it cannot be undone.

Follow KB 426222 for that case, and treat the storage fault that caused the earlier disconnection as its own incident. To back out: a reboot cannot be reversed. If the host does not rejoin the cluster, the VMs stay where they were moved, and nothing is moved back until the storage fault is repaired.

Confirm the fix

  1. The vMotion completes, and the task shows no error in Recent Tasks.
  2. The vmkping sample shows 0% packet loss for the full sample, including during a migration.
  3. hostd.log shows no new Timed out waiting for migration data entries.

What to watch afterwards

  • Keep a table of each host's vMotion VMkernel name, address, MTU and port group security settings. Compare it after any host is added or rebuilt.
  • Repeat the largest vmkping after any switch, NIC or driver change.
  • Treat the first Lost access to volume entry on a host as a storage fault to follow up, before a Storage vMotion fails on it.

Example (illustrative): A vMotion of web01 from esx01 to esx02 fails with Timed out waiting for migration data. The vMotion interfaces are vmk1 at 192.0.2.11 and 192.0.2.12, both with MTU 9000. From esx01, vmkping -I vmk1 192.0.2.12 -s 8972 -d -c 3 returns 100% packet loss, while the same command with -s 1472 returns 0% packet loss. The sizes are 9000 - 28 = 8972 and 1500 - 28 = 1472. The engineer concludes that something on the path carries only a 1500 byte MTU, and takes the result to the network team.

Risks and limits

  • These commands have not been run or lab-tested.
  • KB 324526 gives no version range and no way to change the 120 second default.
  • Pinging for the length of a migration adds traffic to the vMotion network. A sample shorter than the migration can end before the failure, which is why the sample above is 180 seconds.
  • A host reboot, a switch change and an address change are disruptive.

Sources