0

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?

TryTryAgain
  • 1,152
  • 5
  • 22
  • 41
  • Have you tried restarting the management agents? – Frederik 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 01:01

2 Answers2

0

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.

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92
  • 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
  • It might be something you can only do with ESXi 5. If you have no way to get to a shell on the host, I suspect you will have to reboot it. – Falcon Momot Aug 14 '12 at 21:43
  • That's what I think but hope is not true. Even v4.1 has many added features that make it easier. 5.0 will be nice to have after we decommission and transfer off of these old ones. Since I have to wait 5+ hours to be able to reboot, still looking for an answer in the meantime. Thanks for your help. – TryTryAgain Aug 14 '12 at 21:48
0

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

TryTryAgain
  • 1,152
  • 5
  • 22
  • 41