配置管理网络(ipmi/ilo)
#重启BMC
ipmitool mc reset cold
#LocalAdmin
ipmitool user set name 5 mp_localadmin
ipmitool user set password 5
ipmitool user priv 5 4 1
ipmitool channel setaccess 1 5 callin=on ipmi=on link=on privilege=4
ipmitool sol payload enable 1 5
ipmitool user enable 5
ipmi设置
ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 192.168.142.11
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 192.168.142.254
ipmitool lan print
1
2
3
4
5
6
配置登录用户
查看现有用户列表
[root@localhost ~]# ipmitool user list 1
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 admin false false true ADMINISTRATOR
4 alibaba true true true ADMINISTRATOR
6 taobao true true true ADMINISTRATOR
1
2
3
4
5
发现1,4,6都被用掉了,所以新建的用户我们使用id=2
ipmitool user set name 2 root
ipmitool user set password 2 12345678
ipmitool user enable 2
1
2
3
查看新建的用户,是没有访问权限的
[root@localhost ~]# ipmitool user list 1
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 admin false false true ADMINISTRATOR
2 root true false false NO ACCESS
4 alibaba true true true ADMINISTRATOR
6 taobao true true true ADMINISTRATOR
1
2
3
4
5
6
通过如下方式设置,可以让用户拥有administrator权限,administrator的id是4
[root@localhost ~]# ipmitool user priv 2 4 1
[root@localhost ~]# ipmitool user list 1
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 admin false false true ADMINISTRATOR
2 root true false false ADMINISTRATOR
4 alibaba true true true ADMINISTRATOR
6 taobao true true true ADMINISTRATOR
1
2
3
4
5
6
7
其他
推荐做法
管理网,ipmi,主要解决无法跑机房或者不方便跑机房的问题。
建议做法是,新服务上架后,配上管理网段的dhcp,让所有服务器都自动分配。然后页面登录进去,更改ip地址什么的。不建议使用上面的ipmitool这么来做,因为我有几台机器,自己手工配置后,ipmi反倒连不上去了。。。原因还没定位