IPMI是智能型平台管理接口(Intelligent Platform Management Interface)的缩写,是管理基于 Intel结构的企业系统中所使用的外围设备采用的一种工业标准,该标准由Intel,HP,DELL和SuperMicro等公司制定。用户可以利用IPMI监视服务器的物理健康特征,如温度、电压、风扇工作状态、电源状态等。

在我们生产环境的物理服务器中,绝大部分都采用了DELL与SuperMicro,都选购了 “DRAC 远程控制卡” 来支持IPMI,并分配了特定的网络段IP给每台服务器。这样,平时我们远程修改BIOS启动项,重启服务器,连接本地终端等操作就都可以通过IPMI来实现了。

以下,是我们生产环境中的实际应用场景:

环境介绍:
机器类型:DELL/SuperMicro
IPMI支持:已安装 “DRAC 远程控制卡” 并已通过BIOS配置好IP地址
机器列表:
管理机 idc1-admin1
服务器 idc1-server1, DRAC远程地址 idc1-server1-remote
OS: CentOS 6.6 x86_64 Minimal

具体配置:
1. 配置管理主机idc1-admin1
[root@idc1-admin1 ~]# yum install OpenIPMI ipmitool
[root@idc1-admin1 ~]# /etc/init.d/ipmi start
[root@idc1-admin1 ~]# lsmod | grep ipmi_devintf || insmod /lib/modules/`uname -r`/kernel/drivers/char/ipmi/ipmi_devintf.ko
[root@idc1-admin1 ~]# /etc/init.d/ipmi restart

2. IPMI功能 之 远程修改BIOS启动项为网络启动
[root@idc1-admin1 ~]# ipmitool -I lanplus -H idc1-server1-remote -U ADMIN -P ADMIN chassis bootdev pxe

Set Boot Device to pxe

3. IPMI功能 之 远程重启服务器
[root@idc1-admin1 ~]# ipmitool -I lanplus -H idc1-server1-remote -U ADMIN -P ADMIN power reset

Chassis Power Control: Reset

[root@idc1-admin1 ~]# ipmitool -I lanplus -H idc1-server1-remote -U ADMIN -P ADMIN power status

Chassis Power is on

4. 通过Cobbler网络自动好安装服务器idc1-server1

5. 登陆刚刚安装完成的服务器idc1-server1,启用IPMI Console支持
5.1. 安装所需软件

  1. [root@aikaiyuan ~]# yum install OpenIPMI ipmitool
  2. [root@aikaiyuan ~]# /etc/init.d/ipmi start
  3. [root@aikaiyuan ~]# lsmod | grep ipmi_devintf || insmod /lib/modules/`uname -r`/kernel/drivers/char/ipmi/ipmi_devintf.ko
  4. [root@aikaiyuan ~]# /etc/init.d/ipmi restart

5.2 配置grub启动参数
[root@idc1-server1 ~]# vi /boot/grub/grub.conf

  1. # grub.conf generated by anaconda
  2. #
  3. # Note that you do not have to rerun grub after making changes to this file
  4. # NOTICE: You have a /boot partition. This means that
  5. # all kernel and initrd paths are relative to /boot/, eg.
  6. # root (hd0,0)
  7. # kernel /vmlinuz-version ro root=/dev/mapper/mylvm-root
  8. # initrd /initrd-[generic-]version.img
  9. #boot=/dev/sda
  10. default=0
  11. timeout=5
  12. splashimage=(hd0,0)/grub/splash.xpm.gz
  13. hiddenmenu
  14. serial --unit=1 --speed=115200
  15. terminal --timeout=2 console
  16. title CentOS (2.6.32-504.el6.x86_64)
  17. root (hd0,0)
  18. kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/mylvm-root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 rd_LVM_LV=mylvm/root KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet rd_NO_DM rd_LVM_LV=mylvm/swap rhgb quiet console=tty1 console=ttyS1,115200
  19. initrd /initramfs-2.6.32-504.el6.x86_64.img

注:在上面的配置文件中,新增了以下配置用于支持IPMI Console:
第14行:serial --unit=1 --speed=115200
第15行:terminal --timeout=2 console
第18行末尾:console=tty1 console=ttyS1,115200

5.3. 重启服务器使参数生效
[root@idc1-server1 ~]# reboot

6. 待服务器启动成功后,在管理机上调用IPMI console
[root@idc1-admin1 ~]# ipmitool -I lanplus -H idc1-server1-remote -U ADMIN -P ADMIN sol activate

  1. Use ~~. to exit from console
  2. [SOL Session operational. Use ~? for help]
  3. CentOS release 6.6 (Final)
  4. Kernel 2.6.32-504.el6.x86_64 on an x86_64
  5.  
  6. idc1-server1-remote login:

在这个界面上,就可以登陆并操作本地终端了,我们通常在无法通过SSH登陆服务器时使用。

7. 厂商通常还提供了一套Web界面来支持IPMI的相关操作,登陆URL为http://idc1-server1-remote。
如下图所示的SuperMicro:

8. IPMI还提供了丰富的功能可用于对硬件进行监控,如风扇转速,硬盘等,以后我会对这方面的内容再进行一些总结

ipmitool基本使用

2012年12月02日       teddy.sun       运维笔记->系统管理       ipmitool

Linux的ipmitool工具可以方便地在Linux命令行下操作服务器的带外。
总结如下:
1.查看IPMI版本

  1. ipmitool -V

2.重置ipmi卡

  1. ipmitool mc reset cold

3.登录 ipmi console

  1. ipmitool -I lanplus -H IPADDR -U USERNAME -P PASSWORD -e ^ sol activate

4.带外重启机器

  1. ipmitool -I lanplus -H IPADDR -U USERNAME -P PASSWORD power reset

5.带外设置下次从pxe启动

  1. ipmitool -I lanplus -H IPADDR -U USERNAME -P PASSWORD chassis bootdev pxe

6.清空IPMI SEL

  1. ipmitool sel clear

7获得ipmi的channel

  1. for i in {1..14}; do ipmitool lan print $i 2>/dev/null | grep -q ^Set && echo $i; done

常见问题:
1. 遇到ipmitool去连接服务器的sol时,报错Info: SOL payload already active on another session 怎么办?
可以使用sol deactivate的来强制踢掉其他的session,具体方式:

  1. ipmitool -I lanplus -H IPADDR -U USERNAME -P PASSWORD sol deactivate

PMI中sol的使用

  1.  

ipmitool -I lanplus -H IPADDR -U USERNAME -P PASSWORD power reset的更多相关文章

  1. ipmitool -I lanplus -H 10.1.81.90 -U admin -P admin mc reset cold

    ipmitool -I lanplus -H 10.1.81.90 -U admin -P admin mc reset cold

  2. 问题:docker pull 用户登陆tricky,Error response from daemon: unauthorized: incorrect username or password

    问题描述: PS C:\WINDOWS\system32> docker pull rabbitmqUsing default tag: latest Please login prior to ...

  3. javaWEB小练习:在数据库中查找相同的username和password

    /*练习题: * 在Mysql数据库中创建一个person数据表,添加三个字段,id,user,password,并录入几条记录 * *练习题:定义一个login.html,里面定义了两个请求字段:u ...

  4. 解决git Push时请求username和password,而不是ssh-key验证

    转载自:https://blog.lowstz.org/posts/2011/11/23/why-git-push-require-username-password-github/ 之前开始用git ...

  5. 大型票务系统中username和password的安全性问题

    讨论请移步至:http://www.zhiliaotech.com/ideajam/idea/detail/307 相关文章: <今天你买到票了吗?--从铁道部12306.cn站点漫谈电子商务站 ...

  6. 最终结算“Git Windowsclient保存username与password”问题

    Git - How to use netrc file on windows - Stack Overflow 这就是正确答案,我们已经验证过了,以下具体描写叙述一下解决方法: 1. 在Windows ...

  7. redmine忘记username和password

    环境: Ubuntu 13.10 bitnami-redmine-2.5.1-1-linux-x64-installer.run 用bitnami安装完redmine以后,有是否忘记了username ...

  8. ubuntu下一个rootusername入口mysql,如何查看username和password,如何改变rootpassword

    mysql -u root -p 按Enter键,提示时输入密码access denied......ues password YES/NO错误. 第一步: 然后,你需要输入/etc/mysql夹.然 ...

  9. 给新手--安装tomcat后username和password设置以及项目怎么部署在tomcatserver上

    安装后tomcatserver后.登陆首先就是让输入username和password.但是我们在安装tomcat的过程中好像没有让设置username和password,这时候可能有人就抓狂了.还有 ...

随机推荐

  1. 【ProLog - 3.0 进阶:递归】

    [ProLog中的递归] 如果递归中的一个或多个规则引用谓词本身,则对该谓词使用"递归"定义 在使用时,这往往像一条食物链或者族谱的构成(A的爸爸的爸爸,即A的爷爷,是A的长辈) ...

  2. Appium 简介与自动化测试环境搭建

    1. Appium 简介 2. Appium 自动化测试环境搭建 1. Appium 简介 Appium 是一个开源测试自动化框架,可用于原生,混合和移动 Web 应用程序测试. 它使用 WebDri ...

  3. 在Bootstrap开发框架基础上增加WebApi+Vue&Element的前端

    基于Metronic的Bootstrap开发框架是我们稍早一点的框架产品,界面部分采用较新的Bootstrap技术,框架后台数据库支持Oracle.SqlServer.MySql.PostgreSQL ...

  4. hdfs文件系统挂载

    简要说明: 使用fuse将hdfs文件系统挂载远程服务器上,像使用nfs和glusterfs那样可以挂载共享存储 fuse安装 fuse可以编译安装或者通过CDH或ambari源yum安装 此处使用a ...

  5. BeetleX数据分析中间服务V3

    V3版可以对更多的数据场景分析,可以用在系统日志,销售数据,医疗门诊等不同行业的数据进行分析透视.而它的目标并不是简单地进行数据汇总,更注重于不同时间段和不同标签之前的数据的汇总和差异对比,通过数据的 ...

  6. Fiddler高级用法

    Fiddler高级用法 1. 简单用法 Fiddler作为一个基于http协议的抓包工具,一直在业界有广泛使用.很多测试或者前端在使用Fiddler时,仅仅用于查看前端和服务端之间的请求信息.包括我作 ...

  7. Standalone模式下,通过Systemd管理Flink1.11.1的启停及异常退出

    Flink以Standalone模式运行时,可能会发生jobmanager(以下简称jm)或taskmanager(以下简称tm)异常退出的情况,我们可以使用Linux自带的Systemd方式管理jm ...

  8. 脱壳——修复加密IAT

    脱壳--修复加密IAT 对两个练手程序进行脱壳修复加密IAT(其实是一个程序,只是用了几种不同的加壳方式) 第一个程序 Aspack.exe 下载链接:https://download.csdn.ne ...

  9. php将IP地址转换为真实地址的方法

    方法使用示例如下 define('WEB_ROOT',dirname(__FILE__)); echo convertip('111.63.244.69','full'); func converti ...

  10. Docker怎么实现容器之间的通信?

    //TODO 参考资料: https://developer.aliyun.com/article/55912 https://blog.csdn.net/u011541946/article/det ...