For customers who run ESXi on Apple Hardware, retrieving the Apple hardware specific information such as the Board ID, EFI Boot Room and SMC Version for troubleshooting or auditing purposes can be challenging. Historically, this information is only available when running the hardware with an Apple MacOS operating system and customers would have to either boot the system into the MacOS Recovery Mode to run the system profiler tool from the command-line or install a full blown MacOS operating system to retrieve the necessary information as outlined in this Apple KB.
For some customers, this may not even be an option as Apple hardware does not provide any remote management capabilities and customers must physically be in front of the system to perform this process and imagine needing to do this across a fleet of Apple servers.
While working on a recent case with a customer, I was curious if the Apple specific information could be retrieved from within ESXi and remove the need to boot into MacOS? I reached out to one of the Engineers, Darius Davis, who I work with on a frequent basis when it comes to MacOS-related topics to see if this was possible.
He was able to quickly put together a Python script called esxi-show-mac-hardware-info.py which runs within the ESXi Shell to extract the Model, Serial ID, Board ID, EFI Boot ROM & SMC Version from any Apple systems running ESXi (including Mac Mini and Mac Pro). To use the script, simply download and upload it to your ESXi host (you can store it on a shared datastore so it can be accessed by multiple ESXi hosts). Once uploaded, simply run the following command:
python esxi-show-mac-hardware-info.py
Note: If you need to update the EFI Boot ROM and SMC version, you will still need to boot into the latest Apple MacOS operating system and perform the update there.
For those interested, a subset of these Apple hardware properties can also be retrieved programmatically using the vSphere API, specifically the Model, Serial Number and EFI Boot ROM Version. Below are quick PowerCLI snippets demonstrating the specific vSphere API properties:
(Get-VMHost -Name 192.168.30.11).ExtensionData.Hardware.SystemInfo.Model
(Get-VMHost -Name 192.168.30.11).ExtensionData.Hardware.SystemInfo.OtherIdentifyingInfo | select IdentifierValue,IdentifierType -ExpandProperty IdentifierType
(Get-VMHost -Name 192.168.30.11).ExtensionData.Hardware.BiosInfo.BiosVersion
Carib Mendez says
Wow…thanks…was looking for this info the other day!
Oran Turner says
Can this be modified to obtain the hardware UUID as well?
simplijm says
I tried running this on a MacPro7,1 just to see what info would be returned. I got the model, serial number, board ID and the boot ROM version but it failed trying to get the SMC version. I checked the files in /vmfs/devices/char/mem/ and the applesmc file is 0 KB.
Any chance this script can be updated to look in the right location for the SMC version?