dmidecode UUID dependency on Hardware version
search cancel

dmidecode UUID dependency on Hardware version

book

Article ID: 334165

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:
UUID reported by dmidecode differs between virtual machines with hardware version under 13, HW Version 13 and above 13.

Cause

Linux dmidecode interpretation of BIOS UUID depends on SMBIOS version, and SMBIOS version reported by VMs depends on hardware version.

Resolution

Do not use dmidecode to convert BIOS UUID from binary to textual form.

On recent kernels format matching *.vmx config file can be obtained via following command:

# dd if=/sys/firmware/dmi/entries/1-0/raw bs=1 count=24 status=none | od -j8 -tx1 -Ax
000008 44 45 4c 4c 52 00 10 58 80 53 b4 c0 4f 57 31 32


Format matching dmidecode output can be achieved with following command:

# dd if=/sys/firmware/dmi/entries/1-0/raw bs=1 count=24 status=none | python -c 'import struct; import sys; print("UUID: %08X-%04X-%04X-%04X-%04X%08X" % struct.unpack(">8xLHHHHL", sys.stdin.read()))'
UUID: 44454C4C-5200-1058-8053-B4C04F573132


If your Linux kernel does not publish /sys/firmware/dmi/entries/1-0/raw, following script can be used to extract raw data from dmidecode -u output:

#! /bin/sh

dmidecode -u | awk '
BEGIN { in1 = 0; hd = 0 }
/, DMI type / { in1 = 0 }
/Strings:/ { hd = 0 }
{ if (hd == 2) { printf "%s-%s\n", $1 $2, $3 $4 $5 $6 $7 $8; hd = 0 } }
{ if (hd == 1) { printf "UUID: %s-%s-%s-", $9 $10 $11 $12, $13 $14, $15 $16; hd = 2 } }
/, DMI type 1,/ { in1 = 1 }
/Header and Data:/ { if (in1 != 0) { hd = 1 } }'


Alternatively, advanced configuration option acpi.smbiosVersion2.7 can be set to FALSE in virtual machine's advanced configuration. It should be used as last resort, as older SMBIOS versions cannot correctly describe new processors and memory limits in hardware version 13.