IPMI - Managing Hardware Remotely
21. Jan. 2024
IPMI (Intelligent Platform Management Interface) is a standardized interface to the computer's hardware and firmware, via which they can be remotely controlled, monitored and managed at hardware level, especially when they are switched off or no operating system is installed. Central to the IPMI is the BMC (Baseboard Management Controller), which is an application-specific integrated circuit connected via the IPMB (Intelligent Platform Management Bus) to the basic components of the computer at hardware level and the necessary communication interfaces (such as USB or a network interface).
As with the BIOS chip, there is also a BMS chip on the motherboard, which is started (similar to booting) as soon as the computer is supplied with standby power (i.e. as soon as the power supply unit is switched on). After the BMC has performed a series of basic tests on the hardware, an interface (e.g. a web page) is provided which can be accessed as an administrator to manage the computer. In order to deny unauthorized access, you must authenticate yourself to access this interface.
However, if you purchase a used motherboard, it is possible that the user name and/or password have been changed. To be able to access the IPMI, the access data must be changed. Tools such as ipmi-config
or ipmitool
can help here. The same tools can also change settings, e.g. to adapt the fan control to changed hardware. This article explains how to install and use these tools.
Installation
In my home lab, I use Unraid, where Docker containers and plugins can be installed. Here, the IPMI plugin can be installed, which also installs the ipmi-config
command (and other IPMI commands) for the console. To install ipmitool
, first install the plugin NerdTools and then add ipmitool
in the plugin settings.
Network
If the BMC does not connect to the home network (e.g. because a static IP was saved that does not match the new network configuration), the BMC should obtain a new IP address dynamically. To do this, change the network settings of the BMC to DHCP:
ipmi-config --commit --key-pair=Lan_Conf:IP_Address_Source=Use_DHCP
User
As soon as you can call up the admin website, you have to log in.
The default access data is ADMIN and ADMIN. However, if the password has been changed, you can define a new one as follows:
ipmi-config --commit --key-pair=User2:Password=new_password
Or with:
ipmitool user set password 2 new_password
User2" or the user ID "2" is selected here, as this was the administrator's account. Which users exist and which ID they have can be listed with the following commands:
ipmi-config --checkout | grep User
or
ipmitool user list
Fan
Since not every home lab uses classic server fans (especially if the server is located in the study and should not be too loud), it may be desirable to adjust the fan settings. For this
ipmi-sensors-config --checkout | grep FAN
or
ipmitool sensor
The output should then contain the following information, for example:
Section 1009_FAN1
Section 1076_FAN2
Section 1143_FAN3
Section 1210_FAN4
Section 1277_FAN5
or for ipmitool
...
FAN1 | 3100.000 | RPM | ok | 200.000 | 500.000 | 800.000 | 25300.000 | 25400.000 | 25500.000
FAN2 | 2200.000 | RPM | ok | 200.000 | 500.000 | 800.000 | 25300.000 | 25400.000 | 25500.000
FAN3 | 2200.000 | RPM | ok | 200.000 | 500.000 | 800.000 | 25300.000 | 25400.000 | 25500.000
FAN4 | na | | na | na | na | na | na | na | na | na
FAN5 | 3200.000 | RPM | ok | 200.000 | 500.000 | 800.000 | 25300.000 | 25400.000 | 25500.000
...
Now check the settings for FAN1 with :
ipmi-sensors-config --checkout --section=1009_FAN1
you get the following information:
Section 1009_FAN1
## Possible values: Yes/No
Enable_All_Event_Messages Yes
## Possible values: Yes/No
Enable_Scanning_On_This_Sensor Yes
## Possible values: Yes/No
Enable_Assertion_Event_Lower_Critical_Going_Low Yes
## Possible values: Yes/No
Enable_Assertion_Event_Lower_Non_Recoverable_Going_Low Yes
## Possible values: Yes/No
Enable_Assertion_Event_Upper_Critical_Going_High Yes
## Possible values: Yes/No
Enable_Assertion_Event_Upper_Non_Recoverable_Going_High Yes
## Possible values: Yes/No
Enable_Deassertion_Event_Lower_Critical_Going_Low Yes
## Possible values: Yes/No
Enable_Deassertion_Event_Lower_Non_Recoverable_Going_Low Yes
## Possible values: Yes/No
Enable_Deassertion_Event_Upper_Critical_Going_High Yes
## Possible values: Yes/No
Enable_Deassertion_Event_Upper_Non_Recoverable_Going_High Yes
## Give valid input for sensor type = Fan; units = RPM
Lower_Non_Critical_Threshold 800.000000
## Give valid input for sensor type = Fan; units = RPM
Lower_Critical_Threshold 500.000000
## Give valid input for sensor type = Fan; units = RPM
Lower_Non_Recoverable_Threshold 200.000000
## Give valid input for sensor type = Fan; units = RPM
Upper_Non_Critical_Threshold 25300.000000
## Give valid input for sensor type = Fan; units = RPM
Upper_Critical_Threshold 25400.000000
## Give valid input for sensor type = Fan; units = RPM
Upper_Non_Recoverable_Threshold 25500.000000
## Give valid input for sensor type = Fan; units = RPM; 'None' to not use hysteresis
Positive_Going_Threshold_Hysteresis 100.000000
## Give valid input for sensor type = Fan; units = RPM; 'None' to not use hysteresis
Negative_Going_Threshold_Hysteresis 100.000000
EndSection
You can now change the threshold values individually to the values that best suit the installed fan. Fans from Noctua, for example, rotate so slowly that a threshold of 500 rpm (revolutions per minute) could be too high. The server would then always recognize an error in the fan and immediately activate it at 100%. The threshold values can then be changed as follows:
ipmi-sensors-config --commit --key-pair=1009_FAN1:Lower_Non_Critical_Threshold=300
ipmi-sensors-config --commit --key-pair=1009_FAN1:Lower_Critical_Threshold=200
ipmi-sensors-config --commit --key-pair=1009_FAN1:Lower_Non_Recoverable_Threshold=100
The settings for the other fans can also be changed in a similar way.