How to workaround the "The operation is not allowed in the current connection state of the host." error on vSphere 5.1 thru 6.5 Update 1
Occasionally, I get an error. I'm using VMware ESXi 5.1 and the vCenter 5.1 appliance, and I'm logged in to the vCenter with the vSphere Client, and I simply try to power on a VM. Up pops this error:
"The operation is not allowed in the current connection state of the host."
The workaround is to restart the vCenter Server services. Here's how:
1) login to the vCenter appliance administrative interface
From your browser, replace vcenter with the name (or IP address) of your vCenter appliance:
https://vcenter:5480
2) restart the vCenter service
First, click Stop (which will kick off any active vSphere Client sessions)
and when it's done stopping, click Start, wait for it to finish starting
3) login
Login in to vCenter again, with your vSphere client
4) try to power up your VM again, it should work fine this time
I'd rather have a proper, permanent fix to this intermittent issue. If you've located a fix, please let us know by commenting below. But for now, at least I have a non-disruptive workaround. Well, the hosts and VMs stay up, but the sysadmin(s) may be a bit annoyed when you bump them.
If you prefer a video walk-through, it's right here:
Related info:
Restarting the Management agents on an ESXi or ESX host:
kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003490
vm can not power on due to "current connection state of the host":
communities.vmware.com/thread/331857
Sep 12 2013 Update
Under ESXi 5.5 today, I got this message, when trying to power on a VM:
"The operation is not allowed in the current connection state of the host."
Sounds familiar? So I browsed into my vCenter Server Appliance, and restarted the vCenter Server, all set, powered the VM up just fine this time. So apparently this issue still strikes occasionally.
Dec 23 2016 Update
Under vSphere 6.5 today, I had the same issue:
"The operation is not allowed in the current connection state of the host."
So I simply restarted the service. This can be done with the vSphere Web Client UI.
Click on the tiny house icon > Administration > System Configuration > Services > VMware vCenter Server, then click the Restart the Service icon at the top, seen pictured below.
Aug 16 2018 Update
Under vSphere 6.5 Update 1, I had the same issue:
"The operation is not allowed in the current connection state of the host."
I have now recorded a video of a way to fix this on ESXi 6.5 Update 1, using only the (HTML5) vSphere Client.