Although the xserve is well past its prime I still have a couple that I use as part of my dev and lab environment. Although I don’t have a true need for production level uptime I do like to have it mirror a production level environment. As part of that I recently started playing with the LOM on my Xserves to see how well it works. I am on a Big Sur machine so I used HomeBrew to install IPMITOOL and I am connecting remotely over the lan.
Here is an example of a basic status check and what it returned:
#ipmitool -I lanplus -H <IP OR HOSTNAME> -U <USERNAME> -a chassis status System Power : on Power Overload : false Power Interlock : inactive Main Power Fault : false Power Control Fault : false Power Restore Policy : always-off Last Power Event : Chassis Intrusion : inactive Front-Panel Lockout : inactive Drive Fault : false Cooling/Fan Fault : true
Here I am connecting remotely to the LOM. I do not like the idea of a password in plain text on my command line so in place of using “-p <PASSWORD>” I am using the “-a” command this will present a password prompt when the command executes.
As a sidetone on the returned status both my xserves show a “Cooling/Fan Fault” when they are running, so I’m not sure what to think about that, but they seem fine so I am not worried about it so far.
I have my Xserves on a APC UPS since power does sometimes go out here. I have APC Network Shutdown setup to shutdown ESXi, however I have had issues getting them to reboot on their own. This is because the only 2 settings offered by the Apple UI for these machines are “previous” and “always-off”.
The Apple side of things provides no way to set things to “always-on” like most enterprise grade servers. So when the UPS shuts down the machine and cuts power it stays off even when power comes back on. The way that this is handled within MacOS ( previously OS X ) is to use a special command that keeps the machine up after shutdown. I wrote about it here, but the command I talk about in that post doesn’t work outside macOS. As a result I couldn’t find a good way to do a full graceful shutdown with ESXi.
The good news is that this is where LOM and IPMI come to the rescue! Using IPMITOOL you can set the power policy to “always-on” and as long as you don’t boot into Mac OS (previously OS X) the policy will persist through shutdowns and reboots! Here is the IPIMITOOL command you need to achieve this:
ipmitool -I lanplus -H <IP OR HOSTNAME> -U <USERNAME> -a chassis policy always-on
In case you are wondering what your options are they are typically:
always-on : turn on when power is restored previous : return to previous state when power is restored always-off : stay off after power is restored
You can also run the command below for a list of supported options from the machine you are querying:
#ipmitool -I lanplus -H <IP OR HOSTNAME> -U <USERNAME> -a chassis policy list Supported chassis power policy: always-off always-on previous
Once setting the power policy I tested the results by shutting down the machine, checking the power policy was still there with the status command ( see above ). I then pulled power power, waited a bit, and plugged it back in. Sure enough after a moment it fired right up like it should. It then booted and kept the power restore policy. Since it works for ESXi (linux based) it should work for any OS other than macOS ( OS X). If you boot into Mac OS (previously OS X) it will reset this setting and you will need to run the IPMITOOL command to set the policy again!