티스토리 뷰

Server/EtcServer

IPMI admin setting by ipmitool

jacobbaek Jacob_baek 2020. 10. 14. 15:15

IPMI admin 설정을 하려면 OS 부팅시점에 ilo,drac으로 진입하여 설정을 해야 한다.

계속 재부팅을 할수 없는 서버를 재부팅하여 해당 시점에 접근시킨다는것은 사실상 불가능한 일이다.

하여 ipmitool을 사용하여 이를 손쉽게 제어하는 방법에 대하여 알아보도록 하자.

먼저 ipmitool 명령을 사용할수 있도록 설치해주자.

(참고로 기반은 CentOS 7이다.)

[root@localhost ~]# yum install -y ipmitool
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package ipmitool-1.8.18-9.el7_7.x86_64 already installed and latest version
Nothing to do
ceph003 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.kakao.com
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
Resolving Dependencies
--> Running transaction check
---> Package ipmitool.x86_64 0:1.8.18-9.el7_7 will be installed
--> Processing Dependency: OpenIPMI-modalias for package: ipmitool-1.8.18-9.el7_7.x86_64
--> Running transaction check
---> Package OpenIPMI-modalias.x86_64 0:2.0.27-1.el7 will be installed
--> Processing Dependency: OpenIPMI for package: OpenIPMI-modalias-2.0.27-1.el7.x86_64
--> Running transaction check
---> Package OpenIPMI.x86_64 0:2.0.27-1.el7 will be installed
--> Processing Dependency: OpenIPMI-libs = 2.0.27-1.el7 for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMIutils.so.0()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMIui.so.1()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMIposix.so.0()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMIglib.so.0()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMIcmdlang.so.0()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Processing Dependency: libOpenIPMI.so.0()(64bit) for package: OpenIPMI-2.0.27-1.el7.x86_64
--> Running transaction check
---> Package OpenIPMI-libs.x86_64 0:2.0.27-1.el7 will be installed
---> Package net-snmp-libs.x86_64 1:5.7.2-48.el7_8.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch        Version                  Repository    Size
================================================================================
Installing:
 ipmitool               x86_64      1.8.18-9.el7_7           updates      442 k
Installing for dependencies:
 OpenIPMI               x86_64      2.0.27-1.el7             base         243 k
 OpenIPMI-libs          x86_64      2.0.27-1.el7             base         523 k
 OpenIPMI-modalias      x86_64      2.0.27-1.el7             base          16 k
 net-snmp-libs          x86_64      1:5.7.2-48.el7_8.1       updates      751 k

Transaction Summary
================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 1.9 M
Installed size: 6.8 M
Downloading packages:
--------------------------------------------------------------------------------
Total                                              1.3 MB/s | 1.9 MB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:net-snmp-libs-5.7.2-48.el7_8.1.x86_64                      1/5 
  Installing : OpenIPMI-libs-2.0.27-1.el7.x86_64                            2/5 
  Installing : OpenIPMI-2.0.27-1.el7.x86_64                                 3/5 
  Installing : OpenIPMI-modalias-2.0.27-1.el7.x86_64                        4/5 
  Installing : ipmitool-1.8.18-9.el7_7.x86_64                               5/5 
WARNING: ipmi_devintf module isn't available.
WARNING: ipmi_msghandler module isn't available.
  Verifying  : 1:net-snmp-libs-5.7.2-48.el7_8.1.x86_64                      1/5 
  Verifying  : OpenIPMI-libs-2.0.27-1.el7.x86_64                            2/5 
  Verifying  : ipmitool-1.8.18-9.el7_7.x86_64                               3/5 
  Verifying  : OpenIPMI-2.0.27-1.el7.x86_64                                 4/5 
  Verifying  : OpenIPMI-modalias-2.0.27-1.el7.x86_64                        5/5 

Installed:
  ipmitool.x86_64 0:1.8.18-9.el7_7                                              

Dependency Installed:
  OpenIPMI.x86_64 0:2.0.27-1.el7                                                
  OpenIPMI-libs.x86_64 0:2.0.27-1.el7                                           
  OpenIPMI-modalias.x86_64 0:2.0.27-1.el7                                       
  net-snmp-libs.x86_64 1:5.7.2-48.el7_8.1                                       

Complete!Repository base is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository updates is listed more than once in the configuration

이후 아래와 같이 local IPMI mgmt정보가 출력되는지 확인해보자.

[root@localhost ~]# ipmitool lan print
Set in Progress         : Set Complete
Auth Type Support       : 
Auth Type Enable        : Callback : 
                        : User     : 
                        : Operator : 
                        : Admin    : 
                        : OEM      : 
IP Address Source       : Static Address
IP Address              : 192.168.1.200
Subnet Mask             : 255.255.255.0
MAC Address             : 11:11:a1:11:1a:1a
SNMP Community String   : 
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Default Gateway IP      : 192.168.1.1
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3
Cipher Suite Priv Max   : XuuaXXXXXXXXXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : Not Available

앞서 설정되어 있는 IP가 있다면 해당 IP로 접근을 해보자.

만약 로그인이 안될 경우 아래와 같은 설정을 추가해보자.
(아래 숫자 2의 경우 channel을 의미한다.)

[root@localhost ~]# ipmitool user set name 2 admin
[root@localhost ~]# ipmitool user list 2
ID  Name         Callin  Link Auth    IPMI Msg   Channel Priv Limit
1   Administrator    true    false      true       ADMINISTRATOR
2   admin            true    false      true       USER
3   (Empty User)     true    false      false      NO ACCESS
4   (Empty User)     true    false      false      NO ACCESS
5   (Empty User)     true    false      false      NO ACCESS
6   (Empty User)     true    false      false      NO ACCESS
7   (Empty User)     true    false      false      NO ACCESS
8   (Empty User)     true    false      false      NO ACCESS
9   (Empty User)     true    false      false      NO ACCESS
10  (Empty User)     true    false      false      NO ACCESS
11  (Empty User)     true    false      false      NO ACCESS
12  (Empty User)     true    false      false      NO ACCESS
[root@ceph001 ~]# ipmitool user set password 2
Password for user 2: 
Password for user 2: 
Set User Password command successful (user 2)

이후 admin 계정에 설정한 password로 로그인을 다시 해보자.

만약 IP 설정을 변경하고자 한다면 아래와 같은 변경작업을 수행해보면 된다.

[root@localhost ~]# ipmitool lan set 2 ipsrc static
[root@localhost ~]# ## ipmitool lan set 2 ipsrc dhcp ## 도 가능
[root@localhost ~]# ipmitool lan set 2 ipaddr 192.168.1.200
Setting LAN IP Address to 192.168.1.200
[root@localhost ~]# ipmitool lan set 2 netmask 255.255.255.0
Setting LAN Subnet Mask to 255.255.255.0
[root@localhost ~]# ipmitool lan set 2 defgw ipaddr 192.168.1.1
Setting LAN Default Gateway IP to 192.168.1.1
[root@localhost ~]# ipmitool lan set 2 arp respond on
Enabling BMC-generated ARP responses

IP설정의 경우 바로 적용되지 않는다.
하여 firmware reset을 수행해야 한다.

[root@deploy001 ~]# ipmitool mc reset cold
Sent cold reset command to MC

fireware의 reset을 통한 재구동시간(약 1~2분정도)을 약간 기다려준후 다시 연결해보면 적용된것을 확인할 수 있다.

참고사이트

 

 

 

'Server > EtcServer' 카테고리의 다른 글

IPMI admin setting by ipmitool  (0) 2020.10.14
memory doesn't recognize if memory is added at the slot  (0) 2020.07.01
Graylog  (0) 2017.10.12
HAProxy  (0) 2015.11.17
jenkins with scp plugin  (0) 2013.01.30
wiki engine  (0) 2013.01.04
댓글
댓글쓰기 폼
공지사항
최근에 달린 댓글
Total
48,538
Today
6
Yesterday
103
링크
«   2020/10   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함