Unable to add new ESXi hosts to a vSphere Configuration Profile-enabled cluster
search cancel

Unable to add new ESXi hosts to a vSphere Configuration Profile-enabled cluster

book

Article ID: 403353

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When attempting to add or remediate hosts against the configuration profile, the following errors are observed:

  • /host-specific/48197000-7831-XXec-80XX-7XX25XX198a0/esx/network/vmknics/1/ip/ipv4_address
    Can not set default gateway on 'vmk1' because ip address unset.
  • /profile/esx/network/net_stacks/0/routing_config/ipv4_default_gateway
    Can not set default gateway '10.XX.XX.XX' on netstack 'defaultTcpipStack', network unreachable.
  • /host-specific/48197000-7831-XXec-80XX-7XX25XX198a0/esx/network/vmknics/0/ip/ipv4_address
    Can not set default gateway on 'vmk0' because ip address unset.
  • Verification confirms that the vmkernel adapters on the reference host do have correct IP settings, including the gateway.

Cause

While the core configuration for the vSphere Configuration Profile is derived from a reference host, specific network settings such as IP addresses and default gateways are inherently host-specific. These individual host details were not explicitly defined within the configuration profile for the additional hosts being added or remediated.

Resolution

Follow the below steps to add the missing "host-specific"


1) Move the ESXi in question to a test cluster.
2) Fetch host UUIDs from VCDB

  •    /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB
  •    select id, dns_name, ip_address, uuid_bios from vpx_host;

Example:
VCDB=# select id, dns_name, ip_address, uuid_bios from vpx_host;
    id | dns_name | ip_address | uuid_bios
    ----+----------------+----------------+--------------------------------------
    12 | ESXI-FQDN | 192.XX.XX.XX | 8a571d42-XXXX-e5YY-d1e5-aaXYZcfa4290
    16 | ESXI-FQDN | 192.XX.XX.XX | 95b01d42-XXXX-68YY-02c6-0fXYZ964fe38

  • Export Current Desired State:

    • Navigate to your Datacenter (or Cluster) in vCenter.
    • Go to Configure -> Desired State -> Configuration.
    • Click EXPORT to download the current desired state as a JSON file.
  • Edit the Exported Document:

    • Open the exported JSON file.
    • Locate the section for host-specific configurations.
    • For each host you intend to add or remediate, add or modify the host-specific entries to include their unique IP addresses for the relevant vmkernel adapters (vmk0vmk1, etc.) and ensure the correct default gateway is associated with the appropriate netstack. Ensure the UUIDs for each host are correct within this section.
  • Import the Modified Document:

    • Navigate back to DC (or Cluster) -> Configure -> Desired State -> Configuration.
    • Click IMPORT and upload the modified JSON file.

3) Remediate/Add Hosts:

    • Once the updated desired state is imported, you can proceed to remediate the existing hosts or add new hosts to the cluster, and the network configuration should now apply correctly.