Correlating hostname and hostId in a VMware HA cluster
search cancel

Correlating hostname and hostId in a VMware HA cluster

book

Article ID: 342952

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article provides steps to determine the hostname of an ESXi host from the hostId located in VMware log files.

Symptoms:

  • An unexpected failover in the vSphere HA (High Availability) cluster occurs.
  • The vpxd logs on vCenter Server contains entries referencing hostId.

The vCenter server vpxd.log at /var/log/vmware/vpxd/ shows:
faultDomainId = "44BA0E8A-D6E9-4902-86FE-A0BDE160ACF8-9-d409ae6-vCenter01", version = 21,

info 'Default'] [VpxdMoHost::UpdateDasState] VC state for host host-1208 (initialized -> initialized), FDM state (Live -> FDMUnreachable), src of state (host-406 -> host-406)
info 'Default'] [VpxdMoHost::UpdateDasState] VC state for host host-1214 (initialized -> initialized), FDM state (Live -> FDMUnreachable), src of state (host-406 -> host-406)

The /var/log/fdm.log on ESXi hosts contains log entries referencing hostId similar to:
T14:48:45.563Z [48D03B90 info 'Cluster' opID=SWI-d75xxx09] [ClusterManagerImpl::StoreDone] Wrote hostlist version 21 verbose 'Cluster' opID=SWI-2bc8xxx9] [ClusterSlave::LiveCheck] Heartbeat still pending for slave @ host-1208
verbose 'Cluster' opID=SWI-2bc801f9] [ClusterSlave::LiveCheck] Heartbeat still pending for slave @ host-1214

Note: The preceding log excerpts are examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vCenter Server 6.5.x
VMware vCenter Server 6.7.x
VMware vCenter Server 7.x
VMware vSphere ESXi 7.x
VMware vCenter Server 8.x
VMware vSphere ESXi 8.x

Cause

This issue occurs because vCenter Server and ESXi reference hostIds rather than hostnames in log files.

Resolution

To resolve this issue, determine the hostId from vpxd.log or fdm.log and match the hostId in the logs with ESXi hostnames.
 
To determine the hostname of an ESXi host from the hostId located in vpxd.log.
In /var/log/vmware/vpxd/log search for 'Synchronizing host'.
Example:
T17:44:31.563Z [7FB34D20A700 info 'vpxdvpxdInvtHostCnx'] [VpxdHostSync] Synchronizing host: host-1208 of the host (ESX123.domain.local, XX.XXX.XXX.XX)
In the above log, host-1208 corresponds to host ESX123.
 
To determine the hostname of an ESXi server from the hostId located in fdm.log.
When vCenter Server logs are not accessible, it is possible to determine the hostname via the fdm.log file.
  1. SSH into the host as root user.
  2. Run the command:
    $ /opt/vmware/fdm/fdm/prettyPrint.sh hostlist

    Example output:
    <faultDomainId>44BA0E8A-D6E9-4902-86FE-A0BDE160ACF8-9-d409ae6-vcbr04</faultDomainId>
    <version>21</version>
    <hostId> host-1208 </hostId>
    <hostName>ESX123.domain.local</hostName>
    <sslThumbprint>yy:yy:yy:yy:9F:BC:CC:AF:84:E7:6A:95:02:4C:ED:22:8A:BD:zz:zz</sslThumbprint>
    <ipAddress>xx.xx.xx.xxx</ipAddress>
    <mac>xx:xx:xx:xx:xx:xa</mac>
    <mac>xx:xx:xx:xx:xx:xi</mac>
    <build>474610</build>

Additional Information

Command syntax:
/opt/vmware/fdm/fdm/prettyPrint.sh <hostlist|clusterconfig|compatlist|vmmetadata>