Dell Server LCD Update Script

So here is the back story on this idea/script:

I was at my VMware Fast-track class in Dallas when the instructors mentioned an interesting story. They said they knew of a IT shop that had a pretty strict policy on labeling their servers.  That was fine and good pre-virtualization. But after moving to a VMotion-enabled VMware cluster they had the problem of their servers not matching their labels. So did they change the policy? Nope, they got magnetic labels and had an admin run down to the server room every time they used VMotion. True?  Maybe, but it got me thinking.

Why not use the front panel LCD on newer Dell servers to list what VM‘s are residing on the host? I pitched the idea to the instructors and they thought it was spiffy. A couple months later I have finally given it a shot. I debated whether to try and write this in C but opted to use Bash because it is easier to implement and I am so rusty at C it isn’t funny(and I should be spending those hours on Powershell).

To start off here are the prereqs:

  1. Dell OpenManage installed and running on the ESX host (needed for ipmi drivers)
  2. ipmitool 1.8.10 installed (SCP over, ./configure, make, make install….)
  3. My lcd_update.sh script

I wrote the script to only use what was available on the ESX 3.5 host(besides prereqs). I place mine in the /root folder and put “/root/lcd_update >> /dev/null &” into my /etc/rc.d/rc.local file to make it start on boot.
If you prefer you can just start it manually with nohup.

The script is pretty simple. It takes inventory of what VM’s are running and lists them on the LCD using IPMI. It keeps a semaphore file in /etc to keep track (index) of what VM it listed last. The Dell LCD can only display 14 characters (unless someone out there figured something else out) so if your VM name is longer it will be truncated. Overall the effect is pretty slick and with the way it is timed it appears to be a scrolling marquee of server names. Also, if you host has no VM’s or there is a problem with vmware-cmd it will just list the ESX hostname (it will trim a FQDN).

I am sure major improvements can be made to this and I am planning on writing one for server health and hosts in maintenance mode. This is more of a ‘can it be done’ utility and my first *public* script for something VMware related.

***Update*** v .2

I changed the script to use vmware-vim-cmd instead of vmware-cmd.  This should give a list of VM names instead of just taking the name from the VMX file (incase they don’t match). Kudos to Duncan Epping’s post @ Yellow-Bricks which gave me the idea.

***Update***

Scott(@DellTechCenter) from www.delltechcenter.com has posted a video of the output: http://www.youtube.com/watch?v=Slm3MDMD7Dc

Tools

10 Comments Leave a comment

  1. Great idea and cool little script. Going to try it on some of my servers in the lab. Hope you don’t mind if I blog about it over on the SystemsEdge blog (http://en.community.dell.com/blogs/systems_edge/default.aspx)

    Also, we’ve got an area on our Dell TechCenter site for user scripts, maybe you can throw it up there as well (http://www.delltechcenter.com/page/OpenManage+Scripts+and+Tools)

    Great to find you out here in the internets 🙂

    – Scott aka @DellServerGeeks on twitter

    • Sorry but you have to have Dell OM on the server and since there is no svc console on ESXi it wouldn’t work.

      You can run IPMI commands across a network but the ESXi has to have a driver installed to receive 😦

      nick

%d bloggers like this: