Make ipmitool working for ESXi 5.1
ESXi 5.1 has no ipmitool command built-in, and has limited IPMI capability, we can build a static ipmitool binary for ESXi 5.1.
1. Login to ESXi 5.1, check it’s libc.so.6 version by:
Compiled by GNU CC version 4.1.2 20070626 (Red Hat 4.1.2-14).
Compiled on a Linux 2.6.9 system on 2012-03-21.
This means the libc.so.6 is built on linux with kernel 2.6.9 and gcc 4.1.2, so we’d better setup a linux environment with the same linux kernel and gcc version, such as CentOS 4.8.
2. login to the linux environment, build static linked ipmitool binary
2.1 download the ipmitool source code from sourceforge
2.2 Compile. And adding “-static” linker option. The resulting binary I got back was not statically compiled, but worked. Omitting the -static flag caused ipmitool to throw compile errors, so I left it.
~/src/ipmitool-1.8.11$ ./configure CFLAGS=-m32 LDFLAGS=-static
~/src/ipmitool-1.8.11/src/$ ldd ipmitool
linux-gate.so.1 => (0x009f0000)
libm.so.6 => /lib/libm.so.6 (0x00c80000)
libc.so.6 => /lib/libc.so.6 (0x00ac4000)
2.3 copy the built binary to ESXi 5.1 server, it works fine