Configuring legacy Cisco UCS C240 M3 v2 server power restore policy for automatic startup on power restore

Untitled

Server automatic start-up policy on power on/restore may come useful incase office building suffers temporary frequent power outages:

Setting up CIMC:

Restart and during server startup press F8 and it should bring up BIOS CIMC(Cisco Integrated Management Console):

  • Set NIC mode = Dedicated
  • Set NIC redundancy = None
  • Uncheck IPv6 and DHCP**
  • Set CIMC IP ( different from server IP ),subnet mask ( usually same as server ) and gateway ( usually same as server )
  • Set default user password for user ‘admin
  • Press F10 to save configuration
  • Restart server.

Locating CIMC port:

At this point you have only provided all must have configurations for CIMC to be accesed. While browsing through server BIOS I could not find an option like ‘Power On on Power Restore’. I was struggling to find an answer on serverfault.com. Credit goes to Rob who introduced me to all these CIMC stuffs [ Thank you Rob :) ].

So, what is CIMC:

CIMC is a system management chip seperate from BIOS which runs an SSH service + an HTTP service independent of operating system. Many servers include a dedicated ethernet port for accessing CIMC. Our next job would be:

  • Locate CIMC port on server ( it should be an ethernet port marked ‘M’ on the back of the server ).
  • Connect server CIMC port to server switch via a CAT6 ethernet cable.

At this point we are finished our setup & are ready to access CIMC. CIMC can be accessed from any machine within local network via browser(http) or terminal(ssh).

Accessing CIMC through browser:

  • In case of Google Chrome, fire up a new browser tab and open http://CIMC_IP/
  • Chrome should warn unsafe connection. Click Advanced and Proceed Anyway.
  • Chrome may ask permission for running Flash. Click Allow.
  • At this point we should be redirected to a login page. Specify username ( default is admin ) & password.
  • For setting power policies click Power Policies and set Power Restore Policy* to Power On**.
  • Set Power Delay Type = fixed
  • Set Power Delay Value = 120 ( Warning: delay must be set to some suitable value like 1 or 2 minutes (e.g. 120 seconds). It takes some time for server itself to get completely ready, before executing ‘Power On’ event upon power restore. In our case ‘Power On’ did not work because we had set it 0 or 5/6 seconds. Setting 120 seconds delay solved it. )

Accessing CIMC through ssh:

Google Chrome will terminate flash support following December 2020. So, lets stick to ssh: * Fire up a new terminal window and type in following command, and run:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 admin@CIMC_IP

We need diffie-hellman-group1-sha1 because legacy Cisco devices offer old diffie-hellman-group1-sha1 as a key exchange algorithms.

Run following commands:

Note that you have to commit every changes to persist them in server config.

References:

https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/gui/config/guide/1-0_1x/b_Cisco_UCS_C-Series_Servers_Integrated_Management_Controller_Configuration_Guide_1-0_1x.pdf
https://vinf.net/2014/09/18/press-f8-to-enter-cimc-configuration-does-not-work-on-cisco-c-class-rack-mount-server/ https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/cli/config/guide/4_0/b_Cisco_UCS_C-Series_CLI_Configuration_Guide_40/b_Cisco_UCS_C-Series_CLI_Configuration_Guide_40_chapter_011.html