温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ipmi介绍和使用

发布时间:2020-06-05 03:36:09 来源:网络 阅读:8209 作者:zancun 栏目:建站服务器


ipmi介绍和使用

 ipmi介绍和使用

  1. IPMI 是什么

    1. IPMI 工作原理

  2. IPMI 能干嘛

    1. IPMI Functionality

    2. Side-Band and Out-of-Band

    3. 利用ipmi可以实现以下功能

  3. IPMI 怎么做

    1. 注意

    2. 服务器端 设置

    3. 客户端 设置

    4. 本地操作系统里操作

    5. 远程操作

 

IPMI 是什么?

The Intelligent Platform Management Interface (IPMI) specification is an Intel led standard which defines a set of common interfaces to a computer system which system administrators can use to monitor system health and manage the system. More than two hundred companies support IPMI. Dell, HP, Intel Corporation and NEC Corporation announced IPMI v1.0 on 1998-09-16, v1.5 on 2001-03-01, and v2.0 on 2004-02-14. The technology is now considered a de-facto standard.

IPMI是智能型平台管理接口(Intelligent Platform Management Interface)的缩写,是管理基于 Intel结构的企业系统中所使用的外围设备采用的一种工业标准,该标准由英特尔、惠普、NEC、美国戴尔电脑和SuperMicro等公司制定。用户可以利用IPMI监视服务器的物理健康特征,如温度、电压、风扇工作状态、电源状态等。而且更为重要的是IPMI是一个开放的免费标准,用户无需为使用该标准而支付额外的费用。

自1998 年,IPMI论坛创建了IPMI标准依赖,其已经得到了170 多家供应商的支持,这使得其逐渐成为了一个完整地包括服务器和其他系统(如存储设备、网络和通信设备)的硬件管理规范,目前该标准最新版本为IPMI 2.0,该版本在原有基础上有了不少的改进,包括可以通过串口、Modem以及Lan等远程环境管理服务器系统(包括远程开关机),以及在安全、VLAN 和刀片支持等方面的提高。

IPMI针对大量监控、控制和自动回复服务器的作业,提供了智能型的管理方式。此标准适用于不同的服务器拓朴学,以及Windows、Linux、 Solaris、Mac或是混合型的操作系统。此外,由于IPMI可在不同的属性值下运作,即使服务器本身的运作不正常,或是由于任何原因而无法提供服务,IPMI仍可正常运作。

IPMI的核心是一个专用芯片/控制器(叫做服务器处理器或基板管理控制器(BMC)),其并不依赖于服务器的处理器、BIOS或操作系统来工作,可谓非常地独立,是一个单独在系统内运行的无代理管理子系统,只要有BMC与IPMI固件其便可开始工作,而BMC通常是一个安装在服务器主板上的独立的板卡,现在也有服务器主板提供对IPMI支持的。IPMI良好的自治特性便克服了以往基于操作系统的管理方式所受的限制,例如操作系统不响应或未加载的情况下其仍然可以进行开关机、信息提取等操作。

在工作时,所有的IPMI功能都是向BMC发送命令来完成的,命令使用IPMI规范中规定的指令,BMC接收并在系统事件日志中记录事件消息,维护描述系统中传感器情况的传感器数据记录。在需要远程访问系统时,IPMI新的LAN上串行(SOL)特性很有用。SOL改变IPMI会话过程中本地串口传送方向,从而提供对紧急管理服务、Windows专用管理控制台或Linux串行控制台的远程访问。BMC通过在LAN上改变传送给串行端口的信息的方向来做到这点,提供了一种与厂商无关的远程查看启动、操作系统加载器或紧急管理控制台来诊断和维修故障的标准方式。

 

IPMI 工作原理?

当需要对系统文本控制台进行远程访问时,Serial Over LAN (SOL) 功能将非常有用。SOL 通过 IPMI 会话重定向本地串行接口,允许远程访问 Windows 的紧急事件管理控制台 (EMS) 特殊管理控制台 (SAC),或访问 LINUX 串行控制台。这个过程的步骤是 IPMI 固件截取数据,然后通过局域网重新发送定向到串行端口的信息。 这就提供了远程查看 BOOT、OS 加载器或紧急事件管理控制台以诊断并修复服务器相关问题的标准方法,而无需考虑供应商。它允许在引导阶段配置各种组件。

而在命令传输的安全性方面,用户也无需担心,IPMI增强的认证(基于安全哈希算法1和基于密钥哈希消息认证)和加密(高级加密标准和Arcfour)功能有助于实现安全的远程操作。对VLAN的支持更是为设置管理专用网络提供了方便,并且可以以通道为基础进行配置。

IPMI 能干嘛?

IPMI Functionality?

An IPMI sub-system operates independently of the operating system and allows administrators to manage a system remotely even in the absence of an operating system or the system management software, or even if the monitored system is powered off, but connected to a power source. IPMI can also function after the operating system has started, and exposes management data and structures to the system management software. IPMI prescribes only the structure and format of the interfaces as a standard, while detailed implementations may vary. An implementation of IPMI version 1.5 can send out alerts via a direct serial connection or side-band local area network (LAN) connection to a remote client. IPMI uses what is called a side-band LAN connection, which utilizes the board Network Management Interface (NIC). This solution is less expensive of a dedicated LAN connection but also has limited bandwidth. Systems compliant with IPMI version 2.0 can also send alerts via serial over LAN. System administrators can then use IPMI messaging to query platform status, to review hardware logs, or to issue other requests from a remote console through the same connections. The standard also defines an alerting mechanism for the system to send a simple network management protocol (SNMP) platform event trap (PET).

Side-Band and Out-of-Band?

IPMI implements what is often called a “side-band” management LAN connection. This connection utilizes a System Management Bus (SMBUS) interface between the BMC and the boardNetwork Interface Controller (NIC). This solution has the advantage of reduced costs but also provides limited bandwidth – sufficient for text console redirection but not for video redirection. In other words, when a remote computer is down the system administrator can access it through IPMI and utilize a text console. This will be sufficient for a few vital functions, such as checking the event log, accessing the BIOS setup and perform power on, power off or power cycle. However, more advanced functions, such as remote re-installation of an operating system, may require an Out-of-band management approach utilizing a dedicated LAN Connection.

利用ipmi可以实现以下功能?

1.可以在服务器通电(没有启动操作系统)情况下,对它进行远程管理:开机,关机,重启

2.基于文本的控制台重定向,可以远程查看和修改bios设置,系统启动过程,登入系统等

3.可以远程通过sol连接服务器,解决ssh服务无法访问,远程安装系统,查看系统启动故障等问题

4.可以通过系统的串行端口进行访问

5.故障日志记录和 SNMP 警报发送,访问系统事件日志 (System Event Log ,SEL) 和传感器状况

IPMI 怎么做?

测试环境:dell r410服务器,支持ipmi 2.0,第一个网卡接交换机

Dell的BMC可以通过主板集成的第一块网卡实现网络管理,ipmi设置的IP需要单独占用。

Dell服务器在1850/2850系列中,实现了IPMI v1.5规范,也就是能够通过ipmi指令来关闭和重启服务器,但是不能ipmi控制台登录。Dell服务器在1950/2950之后,实现了IPMI v2.0规范,才能将控制台重定向到ipmi,这样可以远程连接服务器,就像连接了键盘和显示器。

在激活IPMI Over LAN 时会提示BMC Management traffic will not function properly if the LAN on Motherboad (LOM) is teamed with any network adapter add-in-cards,这表明如果主板上网卡和附加网卡 bonding时,IPMI功能将失效。

服务器端 设置?

1.ipmi配置SOL (Serial Over LAN) ): Remember to make sure that your Base management controller has IPMI 2.0 functionality.
当开机自检到以下屏幕的时候,按 ctrl-E进入ipmi的配置:
 ipmi介绍和使用
进入IPMI界面:
 ipmi介绍和使用
进入 LAN Parameters ,配置 nic selection 为 Share:
 ipmi介绍和使用
设置ipv4为静态, 设置ip。如果不需要通过外网来管理,可以不设置网关:
 ipmi介绍和使用
设置用户名和密码,这里我设置为ADMIN和password:
 ipmi介绍和使用

2.配置bios的console redirection:
开机按了f2 后,自检后会出现如下界面,
 ipmi介绍和使用
再按f2,选择 Serial Communication,
 ipmi介绍和使用
选择 "Serial Communication"后,配置如下:
 ipmi介绍和使用
And then modify the field labeled "Serial Communication" to be "On with Console Redirection via COM2". This will pipe all the console traffic to COM2, which is connected to the BMC.

注意?

Failsafe baud rate 设置为115200后,grub和kernel等相关的速度设置要一致,不然可能会显示乱码。
Remote Terminal Type设置为VT100/VT220后,client需保持一致。
Redirection After Boot设置为Enabled,以便能通过sol控制操作系统。
Instead of using "VT100/VT220" as your terminal type, you may select "ANSI", the output will not be as pretty though, since ANSI doesn't support some of the characters represented in the console.
Once your settings are configured press "Enter", then "Escape". Save the changes to the BIOS and Reboot.

ipmi的网络需和服务器第一块网卡即eth0通

3.配置操作系统:
vi /boot/grub/grub.conf
配置的结果为:

serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=3 console serial default=0 timeout=5 title CentOS (2.6.18-194.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/ console=tty0 console=ttyS1,115200n8 initrd /initrd-2.6.18-194.el5.img

配置解释如下:
在第一条Title的前面加入如下两行,将grub重定向到com口,这样到开始加载grub的时候,系统会显示:Press any key to continue.按任意键后就可以进入grub的选择菜单。

serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=5 serial console

注释 splashp_w_picpath,因为只能重定向文本内容

#splashp_w_picpath=(hd0,0)/grub/splash.xpm.gz

注释 hiddenmenu ,这样如果有多个内核或者操作系统,就可以选择grub了

#hiddenmenu

将参数console=tty1 console=ttyS1,115200传递到内核中就可以实现CONSOLE重定向到串口,就可以看到系统启动过程了

kernel /vmlinuz-2.6.18-194.el5 ro root=/dev/VolGroup00/LogVol00 console=tty1 console=ttyS1,115200

注: kernel 这行如果不配置 console=tty1,在系统的启动的时候即使接了显示器也不会显示内核启动的过程。

vi /etc/inittab
#必须是文本才能重定向,所以不能选择5 - X11

id:3:initdefault:

#为了显示登陆系统的界面

7:2345:respawn:/sbin/agetty -h ttyS1 115200 vt100

vi /etc/securetty #为了能通过sol登入系统

ttyS1

客户端 设置?

yum install -y OpenIPMI OpenIPMI-tools

mac下terminal 设置如下:注意: 将终端仿真程序窗口设置为 80x25。否则,屏幕可能会出现乱码。
有时行显示重叠,重新开一个tab,再连sol就会正常。
有些机器重启后在以下界面会停留近10分钟:

GRUB Loading stage2... Press any key to continue.

 

本地操作系统里操作?

chkconfig ipmi on service ipmi start

使用 ipmitool 命令设置IPMI:

ipmitool -I open lan set 1 ipaddr 10.10.10.8 ipmitool -I open lan set 1 netmask 255.255.255.0 ipmitool -I open lan set 1 access on

如果需要设置网关:

ipmitool -I open lan set 1 defgw ipaddr 10.10.10.99

加强BMC安全,修改默认的SNMP通讯串:

ipmitool -I open lan set 1 snmp COMUNIATION

设置null用户的密码:

ipmitool -I open lan set 1 password PASSWD

设置root用户密码:

ipmitool -I open user set password 2 PASSWD

检查配置:

ipmitool -I open lan print 1

远程操作?

检查目标服务器是否启动:开机,关机

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power status

软关机,相当于快速按下电源键:

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power soft

硬关机,相当于按下电源键几秒钟:

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power off

启动系统:

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power on

软重启:

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power cycle

硬重启(这跟人为的按电源键硬重启或者非正常掉电一样,可能会造成硬盘的raid丢失或者数据的丢失):

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD power reset

显示系统日志(sel, system event log):

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD sel list

修改密码:

ipmitool -I lan -H 10.10.10.8 -U ADMIN -P PASSWORD user set password 2 NEWPASSWORD

console重定向,按~.退出:

ipmitool -I lanplus -U ADMIN -P PASSWORD -H 10.10.10.8 sol activate

Note: Sometimes you'll find that when you exit the console, the BMC will still believe that the session is connected, and so when you try to connect again, it will say console redirection is already open. To fix this, type "sol deactivate" instead of "sol activate". This will disconnect the previously connected session and you'll be free to issue your command again (sol activate), and you should be able to connect without any problem.

其他命令见help:

ipmitool --help

#如果不用ipmi sol来实现远程管理,还可以用终端服务器解决方案:终端服务器有许多COM口,可以同时连接多个服务器(或者网络设备如思科路由器)的CONSOLE,以实现集中式管理。


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI