I’ve had this issue in vSphere where a machine appears to be powered on (both to vCenter and ESXi) but is not actually running.
I get this when trying to power off the virtual machine “…cannot be performed in the current state (powered on)” – which is somewhat strange.
So i have resorted to CLI to check the machines status and then force it off.
This page at vmware explains the various methods (as you progress through them they get more extreme): http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1014165
Unfortunetely for me none of the above methods worked. Both vCenter the Host directely think that the VM is running – though there is no process’s on the box and i cannot run the “stop hard” command via the CLI. I get the same error back “The attempted operation cannot be performed in the current state”, even though get state = on. Hmmm.
Updated : 7/10/2009
Looks like the problem was related to one of our 3.5 ESXi boxes. In our cluster we had a few servers that were upgraded to vSphere while some were left at 3.5. Seemed to work without issue for a while, but DRS eventually didn’t seem to work between them. Upgrading all our hosts to vSphere has fixed the problem – though introduced us to the bugs in vSphere.
Updated : 27/01/20010
I’ve had the oppisite problem with vSphere. Machines that will not delete becuase they are not in the correct state (Powered Off). Unfortuentely the only fix i have at the moment is to reset the host that the virtual mahines are currently running on.