Relocate virtual machine The operation is not allowed in the current connection state of the host

Scenario

You’ve just tried to migrate a VM to a different datastore, and got the following error:

Relocate virtual machine: The operation is not allowed in the current connection state of the host.
Time: 01/06/2012 08:38:26
Target: WSMDC02
vCenter Server: WSMVCSA

A similar error occurs when trying to turn on a VM:

Power On virtual machine:The operation is not allowed in the current connection state of the host.
Time: 01/06/2012 10:24:09
Target: WSMAPP02
vCenter Server: WSMVCSA

You’ve also noticed the CPU and Memory usage is 0 for the ESXi host:

Here is how to fix it:

Solution

Restart the vCenter service:

  1. Login to the web interface (for the vCenter Server Appliance) at https://[ipaddress]:5480/#virtualcenter.status
  2. Click Start vCenter, wait for the service to stop, then click Start vCenter:
  3. You will now be able to start and migrate the VMs.