Skip to main content
warning

SMBIOS Template Variables have been deprecated: please use the new Label Templates' Variables when possible.

Check the deprecated variables page and the conversion table for a smooth transition.

SMBIOS Template Variables​

The System Management BIOS (SMBIOS) specification defines data structures (and access methods) that can be used to read management information produced by the BIOS of a computer.

This allows us to gather hardware information about the running system and use that as part of our labels.

The Elemental Register Client gathers SMBIOS data running the dmidecode binary during the initial registration of the machine and sends that data to the Elemental Operator.

That data is used to render the template label variables in the MachineInventory associated to that machine.

Example

Having the following SMBIOS data:

System Information
Manufacturer: My manufacturer
Product Name: Awesome PC
Version: Not Specified
Serial Number: THX1138
Family: Toretto

And setting the machineName to serial-${System Information/Serial Number} would result in the final value of serial-THX1138

A good use of SMBIOS data is to set up different labels for all your machines and get those values from the hardware directly.

Having your machineInventoryLabels on the machineRegistration set to SMBIOS data would allow you to use selectors down the line to select similar machines.

For example using the following label cpuFamily: "${Processor Information/Family} would allow you to use a selector to search for i7 cpus in your machine fleet.

registration example with SMBIOS template variables
apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
metadata:
name: fire-nodes
namespace: fleet-default
spec:
config:
cloud-config:
users:
- name: root
passwd: root
elemental:
install:
reboot: true
device: /dev/sda
debug: true
machineInventoryLabels:
element: fire
manufacturer: "${Product/Vendor}"
productName: "${Product/Name}"
serialNumber: "${Product/Serial Number}"
machineUUID: "${Product/UUID}"