LoginSignup
2

More than 5 years have passed since last update.

ipmitool のリモート操作に必要な設定

Last updated at Posted at 2015-03-26

概要

OpenIPMI 等をインストールするだけでは、サーバローカルでコマンドを実行できても、リモートで Power Off/On の操作は出来ません。
ユーザーが作られていないことを前提として、ユーザ作成から実行までのメモです。

ユーザ作成

$ ipmitool user set name ${UID} ${UserName}

パスワード設定

$ ipmitool user set password ${UID}

ユーザの権限確認

Privilege Level が ADMINISTRATOR になっていないとリモートで Power Off/On は出来ません。

なお、USER でも参照(sdr, power status 等)は可能です。
その場合は -L オプションで USER を指定しましょう。
このオプションのデフォルトは ADMINISTRATOR になっています。
詳細は man 参照。

$ ipmitool channel getaccess ${ChannelNumber} ${UID}
(snip)
Link Authentication  : enabled
IPMI Messaging       : enabled
Privilege Level      : USER

ユーザ権限付与

privilege=4 は ADMINISTRATOR です。
setaccess 後、最後 getaccess にて Privilege Level が ADMINISTRATOR になっていることを確認しましょう。

その他の権限に関しては man 参照。

$ ipmitool channel setaccess ${ChannelID} ${UID} privilege=4

IPMI 経由で電源 OFF/ON

ここまで設定すれば、問題なくリモートから電源の OFF/ON が出来るはずです。

$ ipmitool -I lanplus -H ${IPMI_IPAddress} -U ${UserName} -P ${Password} power off
$ ipmitool -I lanplus -H ${IPMI_IPAddress} -U ${UserName} -P ${Password} power on

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2