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?

  • Have you tried restarting the management agents? – Frederik Nielsen Aug 14 '12 at 21:14
  • Yes, I have, I am adding that now. Thanks for the thought. – TryTryAgain Aug 14 '12 at 21:16
  • What were you doing? Why do you need to get back into the shell? – ewwhite Aug 14 '12 at 21:47
  • @ewwhite yes, I need a shell prompt. I was actually just logging in to see how our KVM works for the first time. Then I thought I'd exit. But now I need to get a shell prompt to do things like: enable ssh, clone some VM folders, etc. – TryTryAgain Aug 14 '12 at 22:02
  • @TryTryAgain This is certainly easier in newer versions of ESXi. The toggle for SSH/console access is menu accessible in ESXi 5. – ewwhite Aug 15 '12 at 1:01

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.

  • how can I enable it if I don't have access to the shell? – TryTryAgain Aug 14 '12 at 21:30
  • If memory serves, you can enable it in the maintenance options section of the server configuration, which is on tty10 or something. – Falcon Momot Aug 14 '12 at 21:31
  • get to tty10 by using ctrl+alt+f10? The alt+f2 screen for ESXi 4.0 has pretty much nothing. And the docs don't even mention tty anywhere. – TryTryAgain Aug 14 '12 at 21:33
  • Just alt+f10 should suffice. It may also be some other tty; I forget. – Falcon Momot Aug 14 '12 at 21:37
  • Thanks for the tip, but it does nothing. I thought that may be because of the KVM not translating the keys, but I made a macro within the KVM to simulate the key presses and it still does nothing. Just to be sure I tested this on a non-stuck shell on another ESXi 4.0.0 Server and it also does nothing. – TryTryAgain Aug 14 '12 at 21:42

D'oh! The solution was simple. I simply needed to open a new KVM instance to the machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.