Happy 2025! 🎉 Here is a fun one to kick off the New Year ☺️
Last year, I demonstrated a method for customizing the SMBIOS hardware string using Nested ESXi, but the solution was not perfect and required hacking up a VM ROM file and it was also limited to using the BIOS firmware for your Nested ESXi VM as the behavior for EFI firmware was different.
I was doing some research towards the end of last year and I came across a much more elegant solution that works for both physical and virtual ESXi!
There is an ESXi kernel setting that can be toggled to just ignore the default hardware SMBIOS and then we can then simulate our own custom SMBIOS information.
Step 1 - SSH to your ESXi host and then edit the /bootbank/boot.cfg configuration file and append ignoreHwSMBIOSInfo=TRUE to the kernelopt line and then reboot.
Step 2 - Next, we need to run a vsish command to configure the desired SMBIOS information but instead of making users manually generate the command by hand, I have created a very simple PowerShell function that will make this more user friendly.
Either save or run the PowerShell snippet below which will define a new function called Generate-CustomESXiSMBIOS which accepts the following six arguments:
- Uuid - The UUID to use in the simulated SMBIOS information
- Model - The model name to use in the simulated SMBIOS information
- Vendor - The vendor name to use in the simulated SMBIOS information
- Serial - The serial number to use in the simulated SMBIOS information
- SKU - The SKU ID to use in the simulated SMBIOS information
- Family - The family string to use in the simulated SMBIOS information
Function Generate-CustomESXiSMBIOS { param( [Parameter(Mandatory=$true)][String]$Uuid, [Parameter(Mandatory=$true)][String]$Model, [Parameter(Mandatory=$true)][String]$Vendor, [Parameter(Mandatory=$true)][String]$Serial, [Parameter(Mandatory=$true)][String]$SKU, [Parameter(Mandatory=$true)][String]$Family ) $guid = [Guid]$Uuid $guidBytes = $guid.ToByteArray() $decimalPairs = foreach ($byte in $guidBytes) { "{0:D2}" -f $byte } $uuidPairs = $decimalPairs -join ', ' Write-Host -ForegroundColor Yellow "`nvsish -e set /hardware/bios/dmiInfo {\`"${Model}\`", \`"${Vendor}\`", \`"${Serial}\`", [${uuidPairs}], \`"1.0.0\`", 6, \`"SKU=${SKU}\`", \`"${Family}\`"}`n" }
Here is an example of the using the function to generate the vsish command:
Generate-CustomESXiSMBIOS -Uuid "43f32ef6-a3a8-44cb-9137-31cb4c6c520a" -Model "WilliamLam HAL9K" -Vendor "WilliamLam.com" -Serial "HAL-9000" -SKU "H9K" -Family "WilliamLam"
Step 3 - Once you have the generated command, run that on your ESXi host as shown in the screenshot below:
vsish -e set /hardware/bios/dmiInfo {\"WilliamLam HAL9K\", \"WilliamLam.com\", \"HAL-9000\", [246, 46, 243, 67, 168, 163, 203, 68, 145, 55, 49, 203, 76, 108, 82, 10], \"1.0.0\", 6, \"SKU=H9K\", \"WilliamLam\"}
You will need to restart hostd for the information to be available by running:
/etc/init.d/hostd restart
If you now login to ESXi Host Client, vCenter Server or vSphere API (including PowerCLI), you will find that that Hardware manufacturer, model, serial & UUID is reflecting the custom values you have provided rather than the underlying physical hardware!
Note: The custom SMBIOS is not persisted upon reboot and you will need to re-run the command each time your ESXi host reboots.
war59312 says
Tip: Add to /etc/rc.local.d/local.sh and it will run on startup 😉
Like it says, as long as not using UEFI Secure boot.