You receive an error "400 Error - Virtual machine console is unavailable. 400" when accessing the VM's Console

You receive an error "400 Error - Virtual machine console is unavailable. 400" when accessing the VM's Console

PROBLEM

When trying to access the console of a VM you receive the following error message:

400 Error - Virtual machine console is unavailable. 400

And the console window does not open.

CAUSE

There may be some unwanted lines in the VMX file of the affected VM that is causing the console form opening. These lines would exist if the VM was migrated or upgraded form a vCenter 5.5 or lower version.

SOLUTION

Open the .vmx file of the affected VM and remove the following lines:

sound.allowGuestConnectionControl = "TRUE" sound.autoDetect = "TRUE" sound.virtualDev = "hdaudio" sound.fileName = "-1" sound.present = "TRUE"