virt-who reports a different UUID of VM to Red Hat Satellite 6.

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.x
  • virt-who
  • VCenter 6.5

Issue

  • Why is the UUID reported by virt-who different from dmidecode of VM?

Resolution

  • Verify VM's UUID on VCenter GUI:
Login to VCenter GUI >  Select the ESX > Select Virtual Machines(tab) > On this page, search for the VM and it's UUID shall be displayed
If it is not displayed, add uuid column from dropdown menu next to any tab description

VCenter UUID: 421250eb-e096-9c97-8e46-121d5977a347 
  • Verify VM's UUID through dmidecode:
[root@client]# dmidecode| egrep -i uuid | tr '[:upper:]' '[:lower:]' 
    uuid: eb501242-96e0-979c-8e46-121d5977a347
  • With VMware ESXi version 6.5 and above, "compability support 6.1" needs to set in VMware side (bug in VMware )
    UUID uses different formats on different ESX version:

Reference:
https://kb.vmware.com/s/article/1880
WMI UUID Differs from VirtualCenter UUID (1880)
How to set compatibility
https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-AE539AD0-CAE9-4FE9-AD42-00DBA542ED4F.html
How to set default compatibility for new machines
https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-FD9DC4FF-4420-4FCA-AEF4-6E19AFF869F5.html#GUID-FD9DC4FF-4420-4FCA-AEF4-6E19AFF869F5

Root Cause

  • The UUID reported by VMware is not as per RFC 4122 standards. Red Hat reports UUID per RFC 4122 standards. Find below examples:
[root@SMBIOS 2.6 client ~]# dmidecode |head -n 3
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

# dmidecode|grep -A 5 '^System Information'
System Information
    Manufacturer: VMware, Inc.
    Product Name: VMware Virtual Platform
    Version: None
    Serial Number: VMware-42 19 a0 7a fd ee d5 09-5f b8 4b 7e 5c 2d 92 c5     <<=====
    UUID: 7aa01942-eefd-09d5-5fb8-4b7e5c2d92c5                                              <<=====

The 'dmidecode' command tries to swap the bytes in the first 3 fields if the system's SMBIOS version is 2.6 or greater.

Eg:

SMBIOS 2.7 present

Serial Number: VMware-42 19 a0 7a fd ee d5 09-5f b8 4b 7e 5c 2d 92 c5

SMBIOS >= 2.6

  7a    a0    19    42    ee    fd    09    d5    5f    b8     4b     7e     5c     2d     92     c5
p[3], p[2], p[1], p[0], p[5], p[4], p[7], p[6], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]

UUID: 7aa01942-eefd-09d5-5fb8-4b7e5c2d92c5
[root@SMBIOS 2.4 client ~]# dmidecode |head -n 3
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.

# dmidecode|grep -A 5 '^System Information'
System Information
    Manufacturer: VMware, Inc.
    Product Name: VMware Virtual Platform
    Version: None
    Serial Number: VMware-42 25 0e e6 f5 eb 85 76-46 f1 f1 f5 c1 9c bf 2a     <<=====
    UUID: 42250ee6-f5eb-8576-46f1-f1f5c19cbf2a                                              <<=====


The 'dmidecode' command doesn't swap the bytes in the first 3 fields if the system's SMBIOS version is less than 2.6.

Eg:

SMBIOS 2.4 present.

Serial Number: VMware-42 25 0e e6 f5 eb 85 76-46 f1 f1 f5 c1 9c bf 2a

SMBIOS < 2.6

  42    25    0e    e6    f5    eb    85    76    46    f1     f1     f5     c1     9c     bf     2a
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]

UUID: 42250ee6-f5eb-8576-46f1-f1f5c19cbf2a

Diagnostic Steps

  • While troubleshooting for virt-who's host-guest mapping search using VCenter's UUID:
"facts": {
                "hypervisor.type": "VMware ESXi", 
                "dmi.system.uuid": "4c4c4544-004c-3510-8034-b9c04f514d32", 
                "cpu.cpu_socket(s)": "2", 
                "hypervisor.cluster": "Cluster4", 
                "hypervisor.version": "6.5.0"
            }
        }, 
        {
            "hypervisorId": {
                "hypervisorId": "esx1.redhat.com"
            }, 
            "name": "esx1.redhat.com", 
            "guestIds": [
{
                    "guestId": "421250eb-e096-9c97-8e46-121d5977a347",      <<====== UUID of VM as reported by VCenter
                    "state": 1, 
                    "attributes": {
                        "active": 1, 
                        "virtWhoType": "esx"
                    }
                }, 

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

1 Comments

Is there a fix for this problem?