====== IPMIコマンド ====== ===== ipmitool インストール ===== yum install OpenIPMI-tools ===== 書式 ===== ipmitool -I lanplus -H ホスト名 -U ユーザー名 [-P パスワード] コマンド ===== コマンド ===== ^ コマンド ^ 説明 ^ |power status|電源の状態を確認する| |power on|電源をオンにする| |power off|電源をオフにする| |power reset|電源を再起動する| |power soft|OS からシャットダウンさせる| |sol activate|シリアル接続する| |sol deactivate|シリアル接続を解除する| |lan print|IPMI の IP 情報などを表示する| |shell|shell のようなインタラクティブモードに入る| |sdr|ハードウェア情報を表示する| |sensor|センサー情報を取得する| |fru print|シリアルナンバーや筐体のモデル名、ベンダーなどのハードウェア情報を取得| === 下記のエラーの場合は、deactivateする === Info: SOL payload already active on another session **※コンソール画面を閉じたいときには、~ . と入力します。**\\ リモートのサーバへ SSH 経由でログインしてそこから ipmitool を使っている SSH 接続ごと落ちる。 ===== 例 ===== コンソールにログイン ipmitool -I lanplus -U root -P '' -H 192.168.xx.xx sol activate 電源ON ipmitool -I lanplus -U root -H 192.168.xx.xx chassis power on 電源OFF ipmitool -I lanplus -U root -H 192.168.xx.xx chassis power off ===== sol activate時サーバ側設定 ===== grub.confのkernel行の後ろに「**console=tty0 console=ttyS0,115200n8**」を追加 ※ttyS*の数字は、KVMコンソールが利用しない方を選ぶ 例として、DL360は1 でDL170は0だった。 ==== カーネルバージョン選択画面表示 ==== splashimageとhiddenmenuはコメントアウトしてterminalとserialの行を追加します。 kernelの行でrhgb quietがあった場合は削って、console=の2つを加えると良い。 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.32-642.13.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-642.13.1.el6.x86_64 ro root=/dev/mapper/VolG00-LogVol01 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=jp106 rd_LVM_LV=VolG00/LogVol01 rd_LVM_LV=VolG00/LogVol00 rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-642.13.1.el6.x86_64.img title CentOS 6 (2.6.32-642.6.2.el6.x86_64) ↓ ↓ terminal --timeout=5 serial console serial --speed=115200 --unit=1 --word=8 --parity=no --stop=1 #splashimage=(hd0,0)/grub/splash.xpm.gz #hiddenmenu title CentOS (2.6.32-642.13.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-642.13.1.el6.x86_64 ro root=/dev/mapper/VolG00-LogVol01 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=jp106 rd_LVM_LV=VolG00/LogVol01 rd_LVM_LV=VolG00/LogVol00 rd_NO_DM rhgb quiet console=tty0 console=ttyS0,115200n8 initrd /initramfs-2.6.32-642.13.1.el6.x86_64.img title CentOS 6 (2.6.32-642.6.2.el6.x86_64) === 見出し === ■ gettyの設定に追加 # /etc/init/serial-ttyS1.conf ~ # This service maintains a getty on /dev/ttyS1. start on stopped rc RUNLEVEL=[2345] stop on starting runlevel [016] respawn exec /sbin/agetty /dev/ttyS1 9600 vt100-nav ~ # initctl start serial-ttyS1 ■ securettyに追加 # vi /etc/securetty ~ ttyS1 ===== 補足1. ===== [[http://lxr.linux.no/#linux+v2.6.32/Documentation/kernel-parameters.txt#L514|カーネルパラメータ]] ttyS[,options] Use the specified serial port. The options are of the form "bbbbpnf", where "bbbb" is the baud rate, "p" is parity ("n", "o", or "e"), "n" is number of bits, and "f" is flow control ("r" for RTS or omit it). Default is "9600n8". consoleの値は、ttyS[,bbbbpnf]というフォーマットで記述しろと書かれている。ここで、ttySは、シリアル通信に利用するデバイスの指定であり、bbbbはボーレート、pはパリティ、nはデータビット数、fはフロー制御指定である。 今回の指定値の場合、"デバイスはttyS2、ボーレート115200、パリティなし、データビット8ビット、フロー制御なし"となる。 ===== 補足2. ===== DL170のBIOSシリアルコンソール設定方法 [[https://h50146.www5.hpe.com/lib/products/servers/proliant/manuals/616302-193-j.pdf]] 起動時 F10 を押してBIOSセットアップユーティリティへ [Advanced] -> [IPMI Configuration] -> [Serial Port Configuration] [Serial Port Assignment] - [BMC] [Serial Port Switching] - [Enabled] [Serial Port Connection Mode] - [Direct] [Advanced] -> [Remote Access Configuration] -> [BIOS Serial Console][Enable] Base Address/IRQ - 3F8h, 4 Serial Port Mode - 9600 8, n, 1 Flow Control - None Redirection after BIOS/POST - Enabled Terminal Type - VT100 BIOS セットアップユーティリティへのアクセスとファンクションキーの使用 [[http://sudarabuch.blog65.fc2.com/blog-entry-70.html]] ===== サーバ上から実行 ===== ==== 管理コントローラーのリセット ==== ipmitool mc reset [ warm | cold ] ==== ファームウェアバージョンの確認 ==== ipmitool mc info ===== CentOS7の場合 ===== [[01_linux:01_net:42_centos7_serial]] {{tag>ipmi}}