Stuck shell ESXi 4.0 – how to recover without reboot

consolekeyboard-video-mouseshellvmware-esxi

I had done some management by connecting to the ESXi 4.0 Server and using the unsupported shell login remotely using a KVM.

I then typed exit

Now it is stuck at a blank line:

# exit

_

That _ is a blinking index cursor

Is there any way to recover the shell without rebooting? I have tried the common ctrl-c, ctrl-d, esc, and going back to alt+f2 and alt+f1 just brings me back to that stuck shell. In the alt+f2 screen with its very limited capabilities, I have also tried the "Restarting Management Agents" option…which also did not change the alt+f1 screen back to a shell prompt.

Also, based on Falcon Momot's suggestions in comments and answer:

I realized only alt+f1, alt+f2 and alt+f11 are available ttys.

alt+f1 being the shell for unsupported login/management

alt+f2 the terminal gui options

and alt+f11 brings up red text stating:

TSC: 2720302897 cpu0:0)Init: 461: The Execute Disabel/No Execute CPU
feature is not enabled for this machine.

I have not found anything suggesting enabling that would help me, or any way to enable it from the ESXi client…without access to the server.

Any suggestions?

Best Answer

SSH in (enable it if it isn't enabled) as root, use ps aux to find the process that terminal's shell is running in, and kill it. If that doesn't work, kill the getty for that terminal and it will respawn, giving you a shell.

If this doesn't work (the management interface isn't available in your version, or something), you likely have no alternative to a host reboot.

Related Topic