How to Determine and Export the Correlated Trusted Root Certificate Utilized by an ESXi Host
search cancel

How to Determine and Export the Correlated Trusted Root Certificate Utilized by an ESXi Host

book

Article ID: 437641

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

This document outlines the diagnostic procedure to identify and export the specific trusted root certificate residing in the vCenter Server Endpoint Certificate Store (VECS) that issued an ESXi host's active machine SSL certificate.

Environment

VMware vCenter Server

VMware vSphere ESXi

Cause

Precise cryptographic mapping utilizing the Issuer Distinguished Name (DN) and Authority Key Identifier is mandatory in topologies containing multiple VMCA or custom enterprise roots. This ensures accurate trust chain validation and isolates the exact root certificate responsible for ESXi host issuance.

Resolution

Execute the following multi-phase procedure utilizing command-line interfaces on both the ESXi host and the vCenter Server Appliance (VCSA).

Phase 1: Extract Cryptographic Identifiers from the ESXi Host

  1. Establish an SSH session to the target ESXi host utilizing root credentials.
  2. Extract the Issuer and Authority Key Identifier from the active machine SSL certificate (rui.crt):
    Bash
    openssl x509 -in /etc/vmware/ssl/rui.crt -noout -text | grep -E "Issuer:|Authority Key Identifier" -A1
    

Phase 2: Correlate Identifiers within the vCenter Server VECS Store

  1. Establish an SSH session to the managing VCSA and authenticate as root.
  2. Access the Bash shell:
    Bash
    shell
    
  3. Enumerate the metadata for all certificates residing in the TRUSTED_ROOTS store:
    Bash
    /usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep -E "Alias|Subject:|Subject Key Identifier" -A1
    
  4. Analyze the output to locate the VECS entry matching the exact parameters extracted in Phase 1:
    • The Subject must match the ESXi Issuer.
    • The Subject Key Identifier must match the ESXi Authority Key Identifier.
  5. Record the Alias associated with the matched entry.

Phase 3: Export the Correlated Root Certificate

  1. Utilize the recorded Alias from Phase 2 to export the raw certificate payload:
    Bash
    /usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias <RECORDED_ALIAS> --output /tmp/<RECORDED_ALIAS>.crt
    
    (Note: Replace <RECORDED_ALIAS> with the exact string identified in Phase 2)
  2. Validate the exported certificate formatting and integrity:
    Bash
    openssl x509 -in /tmp/<RECORDED_ALIAS>.crt -noout -text | head -n 15
    
  3. Transfer the /tmp/<RECORDED_ALIAS>.crt file from the VCSA utilizing a secure file transfer protocol (e.g., SCP, SFTP) to the target administrative workstation.