Modern server hardware offers a lot of possibilities for administration. One of them is the remote access port, HP’s iLO. This remote access port allows to access the server even when shut down and allows a lot of control over the server like powering ON / OFF the server or the possibility to connect to the console (screen) remotely. Remote console connections are even possible via SSH connection to the iLO. The only precondition to connect to the remote console via SSH is that the OS running is in text mode. Many modern Linux distributions boot into a graphical mode which must be disabled to access the text console.
With Proxmox installed, which is Debian based, the text mode must be enforced to allow remote screen connection via ssh. My experience with the iLO interface from HP is not entirely a happy one. The Web interface for the remote console mainly targets Windows based access. Especially on Mac OSX and Linux, accessing the remote console is either a pain or not working at all. Thankfully, there is a different way than the web interface to access the screen of the server remotely.
The iLO interface provides the possibility to connect via ssh. This ssh console is of course not as user friendly as the web frontend but still very powerful. Besides the features of powering on and off the the server, the iLO’s ssh interface may surprise you with a very special feature: the possibility to connect to the server’s screen.
Monitor is in graphics mode or an unsupported text mode.
Debian is using a “frame buffer” to increase the resolution of the console while still showing only the text console. The frame buffer allows for a higher resolution and smaller characters in the text console – especially usefull for modern big screens. Sadly, the iLO interface detects this as a graphics mode, as shown above, and cannot show to the console’s content. But this can be changed.
Proxmox is based on Debian and therefore inherits the flexibility to configure it as needed. Modern Linux distributions switch early to a graphical mode to escape the text based screens. The frame-buffer is therefore loaded early in the boot process. To disable it, the kernel command line / options need to be set accordingly.
The configuration can be found in the grub (boot loader) configuration file.
$ vim /etc/default/grub
The resulting configuration file should look similar to the following example. The important section in the “GRUB_CMDLINE_LINUX_DEFAULT” setting is highlighted. Make sure the “nomodeset” and “text” option is added.
# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="Proxmox Virtual Environment" GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" GRUB_CMDLINE_LINUX="" # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
Kernel Mode Setting (KMS) is a method for setting display resolution and depth in the kernel space rather than user space. The Linux kernel’s implementation of KMS enables native resolution in the frame-buffer.
The kernel option “nomodeset” disables the Kernel Mode Setting resulting in a text console which can be accessed via the SSH connection to the iLO. In other words, this setting instructs the kernel not to load the video driver.
The “GRUB_TERMINAL=console” sets the grub menu into text mode. This allows to navigate the grub menu without entering the graphical mode.
As the comment block at the beginning of the file already describes, this change is not instantly active. The grub configuration file which is used during the boot process needs to be updated. This is done by executing the “update-grub” command.
With the grub configuration updated, the server can be rebooted. While rebooting, the server’s screen should stay in text mode and can be accessed via iLO over SSH. To check the text console, login to the iLO interface via ssh
$ ssh 188.8.131.52 -l Administrator Administrator@184.108.40.206's password: Pa$$word User:Administrator logged-in to ilomgm.example.com(220.127.116.11 / FE80::EEB1:FE80::EEB1:FE80) iLO Advanced 2.54 at Jan 15 2018 Server Name: ilomgm Server Power: On </>hpiLO->
To check the available commands, check the help screen available in the iLO interface. Just type “HELP” to see what is available.
</>hpiLO-> HELP status=0 status_tag=COMMAND COMPLETED Tue Jan 15 15:26:38 2018 DMTF SMASH CLP Commands: help : Used to get context sensitive help. show : Used to display values of a property or contents of a collection target. show -a : Recursively show all targets within the current target. show -l <level> : Recursively show targets within the current target based on 'level' specified. Valid values for 'level' is from 1 to 9. create : Used to create new instances in the name space of the MAP. Example: create /map1/accounts1 username=<lname1> password=<pwd12345> name= <dname1> group=<admin,config,oemhp_vm,oemhp_rc,oemhp_power> delete : Used to destroy instances in the name space of the MAP. Example: delete /map1/accounts1/<lname1> load : Used to move a binary image from an URL to the MAP. Example: load /map1/firmware1 -source http://192.168.1.1/images/fw/iLO4_100.bin reset : Causes a target to cycle from enabled to disabled and back to enabled. set : Used to set a property or set of properties to a specific value. start : Used to cause a target to change state to a higher run level. stop : Used to cause a target to change state to a lower run level. cd : Used to set the current default target. Example: cd targetname date : Used to get the current date. time : Used to get the current time. exit : Used to terminate the CLP session. version : Used to query the version of the CLP implementation or other CLP elements. oemhp_ping : Used to determine if an IP address is reachable. Example : oemhp_ping 192.168.1.1 oemhp_loadSSHKey : Used to authorize a SSH Key File from an URL. Example : oemhp_loadSSHKey -source http://user:email@example.com/images/SSHkey1.pub oemhp_deleteSSHKey : Used to remove a SSH Key associated with a user Example : oemhp_deleteSSHKey HPE CLI Commands: POWER : Control server power. UID : Control Unit-ID light. ONETIMEBOOT: Access One-Time Boot setting. NMI : Generate an NMI. VM : Virtual media commands. LANGUAGE : Command to set or get default language VSP : Invoke virtual serial port. TEXTCONS : Invoke Remote Text Console. TESTTRAP : Sends a test SNMP trap to the configured alert destinations. </>hpiLO->
To start the text console, start the command “TEXTCONS”. If the server was booting as expected into the text mode, the server’s screen content should be shown. When rebooted, the complete boot process should stay in text mode and be visible in the text console.
</>hpiLO-> TEXTCONS Starting text console. Press 'ESC (' to return to the CLI Session.
To exit the text console, hit ESC+( as described in the explanation. This will allow you to return back to the iLO interface.
Read more of my posts on my blog at https://blog.tinned-software.net/.