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:
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.
Forgot to mention we are running VMware 6.5.0 build-4602587
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
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.
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.
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