you might be hitting this bug:
PR
1119481: Attempts to access the virtual machine console from vCenter
Server might fail with error message similar to the following:
Unable to connect to the MKS: The operation is not allowed in the
current state
This issue occurs after you perform any one of the following actions:
- You reload.vmx file without removing the virtual machine from the inventory.
- You restart the hostd service when the virtual machine is running.
The issue is resolved in the below patch: