How to enable IPMI (KVM) access on OVH dedicated server
I recently moved one of my dedicated servers to OVH (ovh.com). One of the features OVH offers is a KVM access to the server via web-console or Java applet JViewer. Access can be requested from OVH control panel or via OVH API. There is an option to run SOL session (serial over lan) directly from the browser and connect to your server's serial port, which would be configured to access one of the ttys. The manual on the OVH site is, however, outdated and provides incorrect instructions for properly configuring it...
I wasted significant amount of time trying to figure this issue out - never used IPMI technology before and being misleaded by OVH docs. So I hope this post will save time for you now.
After launching SOL session from the browser, the console would always display the following but had no other output, only responding to tilda commands:
No directory, logging in with HOME=/
ipmiutil ver 2.94
isol ver 2.94
Opening lan connection to node 10.252.3*.*** ...
Connecting to node 10.252.38.146
-- BMC version 1.13, IPMI version 2.0
Opening lanplus connection to node 10.252.3*.*** ...
Connected to node 10.252.3*.***
Cannot open /home/shellinabox/input, ignoring
[SOL session is running, use '~.' to end, '~?' for help.]
Following OVH`s (and other) instructions found online didn't help either - I've tried everything with GRUB configs, Getty, serial inits, ttyS...etc..etc.
Whatever I did there was no output on that cosole. Something was amiss.
Alternative access option - Java applet - was crashing on my Linux desktop; I was also really wary to rely on any applets/JAVA due to security concerns and hence didn't pay enough attention to this second option. There was an assumption it would have same output as browser based console. But finally, I decided to try it on another machine, having no other ideas.
And it worked! I was able to connect to server's console. So apparently Jviewer was using different KVM connection (KVM functionality of the BMC?).
This prompted a quest to find out why browser based serial-over-lan connection has no output.
Upon one of the reboots and going to server's BIOS with KVM JViewer, I noticed browser window with idlying SOL session was showing BIOS output, mirroring what I was doing in JViewer! But as soon as server started booting, output was reset and went blank. Checking further up on server's BIOS settings, I discovered that there was an option "Console redirection" under "Server management" settings:
Going to "Console redirection" showed that the option was turned off!
Here is how I configured it:
Then, to tell your OS to make a bridge between that serial port and system console, you need to configure GRUB as follows: (From IPMI documentation found on Hetzner.de site - which by the way has much better and up-to-date documentation than OVH (you reading that, OVH?) and whom I also use for my dedicated server needs - I found that my Intel S1200V3RPL board has serial port on ttyS0/unit=0).
# nano /etc/default/grub
(add this to your existing settings)
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset console=tty0 console=ttyS0,115200n8"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
Then reboot your server and SOL console should be working just fine in your favourite browser!
PS: Minus/dash key input isn't working in Firefox browser in Shell-in-a-box spawned in web session. Workaround: use minus on numpad.