Migration of virtual machines fails with an error "Failed to allocate migration heap" on the source ESXi host
search cancel

Migration of virtual machines fails with an error "Failed to allocate migration heap" on the source ESXi host

book

Article ID: 418940

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • manual or DRS initiated vMotion task fails with below error messages.

    Failed to reserve a migration memory slice. This host has reached its concurrent migration limit. Wait for another migration to complete before retrying.
    Failed to create a migrate heap of size 15119369: Not found.
    Failed to allocate migration heap.
    Failed to initialize migration at source.  Error 0xbad00a4.  Migration failed to start due to lack of CPU or memory resources.

  • You can see the following log entries for the failed vMotion tasks.

hostd.log

YYYY-MM-DDTXX:XX:XX.XXXZ verbose hostd[2099806] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/<datastore>/<VM directory>/<VM name>.vmx opID=5a5d3910-02-d2-12e9] VMotionInitiateSrc: Start message: Failed to reserve a migration memory slice.  This host has reached its concurrent migration limit. Wait for another migration to complete before retrying.
--> Failed to create a migrate heap of size 15119369: Not found.
--> Failed to allocate migration heap.
--> Failed to initialize migration at source.  Error 0xbad00a4.  Migration failed to start due to lack of CPU or memory resources.
-->

vmkernel.log

2025-11-17T04:17:03.800Z cpu0:12526735 opID=82a3a298)WARNING: Migrate: 1063: Failed to create a migrate heap of size 15119369: Not found.
2025-11-17T04:17:03.800Z cpu0:12526735 opID=82a3a298)WARNING: Migrate: 369: vmmLeaderID = XXXX: Failed to allocate migration heap
2025-11-17T04:17:03.800Z cpu0:12526735 opID=82a3a298)WARNING: Migrate: 3881: Can't create migrate info struct for vmmLeaderID = XXXX : Migration failed to start due to lack of CPU or memory resources

Environment

ESXi 7.x

ESXi 8.x

Cause

In very rare cases, if a virtual machine powers off before a running migration completes, ESXi might fail to clean up the migration heap.
If the memory leak continues over time, the migration heap might be exhausted, and virtual machines cannot migrate from such ESXi hosts.

Resolution

This issue is fixed in ESXi 7.0 U3v and 8.0 U3e.

 

Workaround:

  1. Shutdown all the VMs running on the ESXi host
  2. Restart the ESXi host

If failover is better suited for your environment than shutting down all the running VMs, reboot the ESXi host from DCUI with "Forcefully terminate running VMs, if any ..." enabled.