Migration Error: "The operation is not allowed in the current state"
search cancel

Migration Error: "The operation is not allowed in the current state"

book

Article ID: 344538

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 7.0

Issue/Introduction

When performing a vMotion migration operation, there is an error similar to:
 
Unable to migrate from <source server> to <destination server>: "The operation is not allowed in the current state".
 
The operation cannot be performed in the current state ("Powered on").  
 
vMotion may fail at 13% with error: executing callbacks

Environment

  • VMware vCenter Server 7.x, 8.x
  • VMware ESXi 7.x, 8.x

Cause

This issue occurs when there is a pending task to be completed on the ESXi host. [ example: host entering maintenance mode.]
 
 

Resolution

Before performing these steps, ensure no legitimate tasks (such as a scheduled snapshot or backup) are currently running.

  1. Cancel Pending Tasks: Check the vSphere Client "Recent Tasks" pane. If a task related to the virtual machine or host appears stuck, right-click the task and select Cancel.

  2. Restart VMware vCenter Server Service: SSH into the vCenter Server Appliance as root and run the following command: service-control --restart vmware-vpxd

  3. Restart ESXi Management Agents: SSH into the affected ESXi host as root and restart the hostd and vpxa agents: /etc/init.d/hostd restart /etc/init.d/vpxa restart

  4. Reconnect the ESXi Host: In the vSphere Client, right-click the ESXi host, select Disconnect, wait for the task to complete, then right-click the host and select Connect.

If these steps fail to resolve the issue, consult the product documentation to retrieve vCenter and ESXi logs for further analysis.

Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box

Restarting the Management agents in ESXi