How to workaround the "The operation is not allowed in the current connection state of the host." error on vSphere Client 5.1

Posted by Paul Braren on Nov 14 2012 (updated on Sep 12 2013) in
  • ESXi
  • HowTo
  • [June 10 2014 Update - same workaround works for ESXi 5.5 as well, used it in my home lab today]

    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)

    vcenter-appliance-summary

    and when it's done stopping, click Start, wait for it to finish starting

    vcenter-appliance-summary-start

    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.