Čerpáno z http://wiki.hetzner.de/index.php/IPMI/en
/download/IPMI/ipmicfg_1.20.3_20141105/linux/64bit/ipmicfg-linux.x86_64# ipmitool lan print
Set in Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback : MD2 MD5 PASSWORD
: User : MD2 MD5 PASSWORD
: Operator : MD2 MD5 PASSWORD
: Admin : MD2 MD5 PASSWORD
: OEM : MD2 MD5 PASSWORD
IP Address Source : Static Address
IP Address : 192.168.1.27
Subnet Mask : 255.255.255.0
MAC Address : 00:25:90:fc:3a:d3
SNMP Community String : public
IP Header : TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Default Gateway IP : 192.168.1.254
Default Gateway MAC : 00:00:00:00:00:00
Backup Gateway IP : 0.0.0.0
Backup Gateway MAC : 00:00:00:00:00:00
802.1q VLAN ID : 722
802.1q VLAN Priority : 0
RMCP+ Cipher Suites : 1,2,3,6,7,8,11,12
Cipher Suite Priv Max : XaaaXXaaaXXaaXX
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
Bad Password Threshold : Not Available
# ipmitool user list ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN false false true ADMINISTRATOR 3 skoumal true true true ADMINISTRATOR 4 guest true true true ADMINISTRATOR
ipmitool user set name 6 <name> ipmitool user set password 6 <passwd> ipmitool channel setaccess 1 6 link=on ipmi=on callin=on privilege=4 ipmitool user enable 6
# ipmitool user list 1 ID Name Callin Link Auth IPMI Msg Channel Priv Limit 2 ADMIN false false true ADMINISTRATOR 3 skoumal true true true ADMINISTRATOR 4 guest true true true OPERATOR
skoumal oc... guest guest
COM2/SOL Console Redirection na Enabled/etc/default/grub změnit/přidat tyto řádky:GRUB_CMDLINE_LINUX_DEFAULT="nomodeset console=tty0 console=ttyS1,115200n8" GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
a zadat příkaz
grub-install /dev/sdb
/etc/init/ttyS1.conf s tímto obsahem:# ttyS1 - getty # # This service maintains a getty on ttyS1 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -L ttyS1 115200 vt100
(Pozor na změnu oproti návodu na webu — není to S0 ani S2, ale S1.)
$ ipmitool -C 3 -I lanplus -H <ipaddr> -U <user> -P <pass> sol activate [SOL Session operational. Use ~? for help] Debian GNU/Linux 7 Debian-70-wheezy-64-minimal ttyS0 Debian-70-wheezy-64-minimal login:
V našem případě
ipmitool -I lanplus -C 3 -H 192.168.1.27 -U skoumal sol activate
Neobjeví se login, ale jako by tam byl. Připojení zrušíme takto:
~.
Pamatuje si to poslední stav, takže zůstaneme-li přihlášení, při dalším připojení se vrátíme do té své “session”.
ipmitool -H 192.168.1.27 -U skoumal chassis status
ipmitool -H 192.168.1.27 -U skoumal lan print
ipmitool -H 192.168.1.27 -U skoumal power on
https://192.168.1.27
a přihlásíme se. (https je důležité, jinak se neustále odpojuje)
Remote Control → Console Redirection