How to workaround "The attempted operation cannot be performed in the current state (Powered on)." error

Posted by Paul Braren on Dec 20 2012 in
  • ESXi
  • HowTo
  • Virtualization
  • I'm using VMware ESXi 5.1 and the vCenter 5.1 appliance, and I'm logged in to vCenter with the vSphere Client. I simply try to power on a VM. Up pops this error:

    Power-On-virtual-machine-error
    “The attempted operation cannot be performed in the current state (Powered on
    .”) Occasionally a powered off VM thinks it's already powered on. Nobody likes restarting the ESXi server itself, that's a badge of shame. It's fun to leave things running for 100+ days, even in a home lab. Who wants to disrupt all your other VMs? Note too that the vCenter Service restart [TinkerTry.com/workaround-the-operation-allowed-current-connection-state-host-error-vsphereesxi-5-1](https://tinkertry.com/workaround-the-operation-allowed-current-connection-state-host-error-vsphereesxi-5-1) doesn't work for this particular problem either. The workaround this time around is to clone the virtual machine, assuming you have vCenter, or the far easier [vCenter Server Appliance](https://tinkertry.com/free-vmware-vcenter-server-appliance-5-1-download-install-configure/), already installed. I'll admit, this isn't a proper fix really, it's merely a stop-gap measure. I'm currently unable to locate a real fix. Try a Google search for relevant hits over the last year with this [search](http://www.google.com/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8#q=%22The+attempted+operation+cannot+be+performed+in+the+current+state+Powered+on.%22&hl=en&tbo=d&source=lnt&tbs=qdr:y&sa=X&ei=EXjTUKmpF4GF2gW4-YG4BA&ved=0CB0QpwUoBQ&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.1355534169,d.aWc&fp=6eb1946313ccd7d2&bpcl=40096503&ion=1&biw=2560&bih=1296), and you'll see what I mean. So here's the way around this issue, fast, easy, yet safe: **1) login to vCenter with the vSphere Client** Right-click on the virtual machine you have the issue with, choose clone **2) try to power up your cloned VM** I'd rather have a proper, permanent fix to this intermittent issue. If you've located a fix, and even better, tested one, please let us know, by dropping a comment below! The video walk-through/demonstration of the workaround is right here:
    --- **Dec. 27 2012 Update:** Site visitor Marcus kindly took the time to add his comments below, suggesting an alternative approach that I just tested to also work! Right-click on the VM, choose "Remove from Inventory", then use Datastore Browser to find the.vmx file again, right-clicking, then choose "Add to Inventory", now you're able to power on.