Giter Site home page Giter Site logo

ysheldon / docker-build-static-ipmitool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewenmcneill/docker-build-static-ipmitool

0.0 0.0 0.0 116 KB

Docker build environment for statically linked ipmitool (eg, to run on VMWare ESXi hosts)

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%

docker-build-static-ipmitool's Introduction

Docker build environment for static ipmitool

A 32-bit staticly built ipmitool can be run on VMWare ESXi 5.x (and maybe 4.x). This one is built on a 32-bit (i386) CentOS 4.9 base image, as that has libraries of approximately the same age as VMWare ESXi 5.0.

Conveniently it turns out that the Dell iDRAC cards also support (parts of) the IPMI interface, which means that Dell servers with iDRAC cards running VMWare ESXi can have their IP addresses checked/configured via this static tool.

Our basic testing shows that this statically linked ipmitool will allow checking and setting the Dell iDRAC cards LAN (local network) parameters on ESXi 5.0. Other IPMI and iDRAC features have not been tested.

We would recommend testing this on a lab machine or machine in VMWare Maintenance mode before trying it on any of your production machines. Tool usage is at our own risk; see the LICENSE for disclaimer of warranty and liability.

Building static ipmitool

centos4_i386

The build requires a 32-bit CentOS 4.9 base image, called centos4_i386.

Unfortunately the Official CentOS Docker Images are (a) only 64-bit and (b) only go back to CentOS 5. Fortunately Brian Lalor has created a script and Dockerfile that can build a CentOS 4 base image, but it is designed for x86_64 (ie, 64-bit). However it is possible to adapt to building an image that will work as a 32-bit image:

git clone https://github.com/blalor/docker-centos4-base.git
cd docker-centos4-base
vi build.sh       # Change arch from x86_64 to i386, comment out EPEL
docker run --privileged -i -t -v $PWD:/srv centos:centos6 /srv/build.sh i386
docker build -t centos4_i386 .

It appears for some reason that the EPEL setup does not work with the i386 install, possibly due to not having changed enough yum repositories at that point, but since EPEL is not required for the ipmitool build it can just be commented out.

Building ipmitool.static

To build the Docker image:

docker build -t ipmitool_build --rm .

And then run it, with an output directory mounted over /mnt to get a copy of the static binary:

docker run -i -t -v $PWD:/mnt ipmitool_build

Using the static ipmitool

Once built, you can enable the SSH server on your ESXi host, then use scp to copy the static binary onto the ESXi host. Eg,

scp -p ipmitool.static root@${ESXHOST}:/scratch

And then log into the ESXi host as root:

ssh root@${ESXHOST}

and run the binary, eg:

~ # /scratch/ipmitool.static lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD
Auth Type Enable        : Callback : MD2 MD5
                        : User     : MD2 MD5
                        : Operator : MD2 MD5
                        : Admin    : MD2 MD5
                        : OEM      :
IP Address Source       : Static Address
IP Address              : 10.0.9.17
Subnet Mask             : 255.255.255.0
MAC Address             : 14:fe:b5:d5:52:b4
SNMP Community String   : public
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Default Gateway IP      : 10.0.9.1
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          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
~ #

If for some reason you need to set the LAN interface, the usual ipmitool commands for setting will work, eg:

/scratch/ipmitool.static lan set 1 ipaddr 10.0.9.17
/scratch/ipmitool.static lan set 1 defgw ipaddr 10.0.9.1

and you can do ipmitool lan print 1 to verify that the settings were updated.

docker-build-static-ipmitool's People

Contributors

ewenmcneill avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.