vsphere_static_160x300
Free Business and Tech Magazines and eBooks
Badges

vexpert_logo_100x57

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Don’t Hit Ctrl+Alt+Del On the ESX 4 Console

As reported on vreference.com, there is a dangerous default in ESX 4. Before I expand on this potential problem I want to point out that a bug report has been files with VMware for correcting this in future releases, but for now VI admins need to be aware of the issue – If the key combination of Ctrl+Alt+Del is entered at the Service Console the ESX host will begin a shutdown which will stop all virtual machines running on the host in the process. Read the full vreference post for more details.

I tested this on an ESX 4 host running in a VMware Player VM on my notebook and captured the shutdown and reboot in this video.

DON’T HIT CTRL + ALT + DEL ON ESX 4 from Rich Brambley on Vimeo.

Fortunately, there is a manual workaround to disable this default behavior until VMware provides an update. I’ll use the instructions provided in the previously mentioned vreference.com post.

This is an old throwback which most modern Linux distribution disable these days.  To disable this yourself, open up /etc/inittab in your favourite editor and comment out the “ca::ctrlaltdel:/sbin/shutdown -t3 -r now” line with a # symbol so it looks like this:

# Trap CTRL-ALT-DELETE

# ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Save and exit the file.  For this to take effect without a reboot, then

run:

init q

Related Posts

  • Bad VMware, Bad. Gotta keep up the QC.
  • Interesting...
  • Dracolith
    What do you mean 'throwback'? It's standard and expected behavior.
    Ubuntu 9.10 does this. Redhat Enterprise Linux 5.4 does this.
    A lot of folks would be quite unhappy if the default changed.

    It is very convenient, and generally a feature. It allows junior techs to cleanly reboot a server in an emergency, if network connectivity is lost, and login is impossible for one reason or another (for example, server out of memory, getty broken or cannot spawn a shell).

    Otherwise, they would be forcing an unclean shutdown every time.
    Standard procedure when you need to take down a Linux system: plug in a keyboard, hit control alt delete, pull the plug as soon as it's back to POST.

    However: avoid plugging a Unix machine into the same KVM as a physical Windows server, use a dedicated KVM, so there's no accidental action by a Windows admin. Better yet, run all Windows machines as VMs, or use only iLO, DRAC, ALOM, or other on-board management for ESX: that way logging into ESX is a deliberate action.


    Admittedly, rebooting an ESX server is a bit bigger a mistake than accidentally rebooting a Linux server. But pulling the plug uncleanly (if management is lost) is also more severe.

    It would be nice if you could customize the keystroke.
    Like it or not... Ctrl+Alt+Del has never been the same since MS started using it for server login.

    Best fallback option may be
    kernel.sysrq = 1

    in /etc/sysctl.conf

    And use Ctrl+Alt+SysRQ s
    Ctrl+Alt+SysRq f
    Ctrl+Alt+SysRq i

    And hope you kill whatever was stopping you from being able to login at console...
  • Dracolith,

    Whether or not ctrl+alt+del is helpful on a Linux box or not, the reality is that most VI admins are probably Windows admins used to a window prompt given to them before chooising an action when using this key combination. It's also a major difference to be on the console of an ESX host with running VMs instead of a single server console (as you mentioned).

    IMO, it's best to keep the default disabled for ESX - you can't invoke an auto shutdown. It's also unclear to me if the VMs are hard powered off or cleanly shutdown. Therefore, the potential to damage multiple OSes is too great.
  • Very easy to test but my guess is the VMs are powered off ungracefully unless power down/power up is configured. And we know it's a power off if no VMware Tools are installed in the guest.
  • Dracolith
    It's something you control when you're configuring ESX under
    Configuration > Virtual Machine Startup/Shutdown.
    Just the same as if you right click the host in the VI console and choose "Reboot", click yes, then okay.

    The default is "power off guest"
    You can change it to "shut down guest operating system" if you like


    If most VI admins are Windows admins, I think ESXi is more appropriate for such deployments.

    The benefit of ESX is to provide a linux-based management console.
    It's harder for a Windows admin to use period...

    you can't just press "F2" and configure network settings, etc..
    have to know Linux and ESX-specific command line commands.

    The linux defaults are a good idea for a linux-based management console..
    and I doubt that many ESX admins are unaware of what ctrl+alt+del does,

    but IMO VMware should certainly explain how to change the defaults in the setup guide,
    or even provide an option during installation...
  • > It's standard and expected behavior.
    Well at least it is not a standard behavior for ESX3.x up to COS kernel version 2.4.21-57
    For me it is a 'new' feature, althought very usefull in UNIX world, not really in an ESX environment. I think it's an error to leave that feature turned on, that's my thought!

    It becomes clear why VMware is phasing out ESX, and recommends ESXi, too much little gotchas with the COS...

    Cheers,
blog comments powered by Disqus
Hyper9 Cowabunga
Support VM /ETC
Support VMETC.com

Support VMETC.com

@rbrambley tweets
Advertisements
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo