VMware Cloud Community
Zygodactyl
Contributor
Contributor

"The operation is not allowed in the current state." for a single VM on ESXI 6.5

I have a VM that returns the error  "The operation is not allowed in the current state." when i try to either take a snapshot or expand a Thin-provisioned disk or make any other changes.

VM tools are up to date on the VM and the issue only occurs for this VM other VMs on the Host and in the cluster are able to take snapshots and have hardware modified. I happened upon this issue since i need to update the VM and was attempting to take a snapshot in case the update went wrong.


I have not been able to find a cause for this error, but I have found the following abnormalities:

  • The VM show it has no snapshots but looking on the LUN it disk resides on it appears to have four deltas ie VMName0004.vmdk
    • there is plenty of space on that LUN and it is not overprovisioned.
  • The VM is server 2012 and the vmtools service is running but when i attempt to migrate the VM to another host it shows the following warning. But there are no alarms at the VMlevel
    • "No guest OS heartbeats are being received. Either the guest OS is not responding or VMware Tools is not configured correctly."
  • The VM itself is running fine without any abnormalities.

I can access the Logs for both the VCSA Virtual appliance and the host that the VM appears to be stuck on but i have no idea what log to start with. I have been blindly search around with no luck.

0 Kudos
6 Replies
Zygodactyl
Contributor
Contributor

Forgot to mention we are running VMware 6.5.0 build-4602587

0 Kudos
Zygodactyl
Contributor
Contributor

you got to hate when is something dumb. On the ESXI host in the log file /var/log/hostd.log there was a failed error for the requests says the vm is in a shutting down state. found a KB on the issue.

Invalid transition requested (VM_STATE_ON_SHUTTING_DOWN -> VM_STATE_CREATE_SNAPSHOT): Invalid state

VMware Knowledge Base

0 Kudos
Zygodactyl
Contributor
Contributor

This did in fact work, I did have to restart the VM as well before it would work, you might just have to restart the service on the VM as well thou.

https://kb.vmware.com/s/article/1027707

gnusgnus
Contributor
Contributor

Worked great for me!

ssh to host

/etc/init.d/hostd restart

/etc/init.d/vpxa restart

Then reboot the vm.

Tools drive mounted and I could start setup manually.

0snoopy0
Contributor
Contributor

Because this is the first hit on google, I will add my fix.
This happened to me after the server was shutdown down for some time. 
I booted it up and let it sit for 20-30m before attempting to power on the vm when the error was seen.

Fix: The server was placed in maintenance mode prior to the earlier shutdown, and upon boot up was still in maintenance mode. Taking it off maintenance mode allowed me to boot up the vm.

Host > Actions > Maintenance mode

Client version: 1.36.0
Client build number: 18403931
ESXi version: 7.0.3
ESXi build number: 19193900
shervin_oroumy
Contributor
Contributor

just unregister vm and registered again.

0 Kudos