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.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.
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:
Edit the Exported Document:
host-specific configurations.host-specific entries to include their unique IP addresses for the relevant vmkernel adapters (vmk0, vmk1, 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:
JSON file.3) Remediate/Add Hosts: