The ESXi host was installed without a specified DNS entry and currently identifies as localhost or localhost.localdomain.
An administrator needs to rename an ESXi host to align with updated corporate naming conventions or CMDB requirements.
You are unable to add the ESXi host to vCenter Server because the hostname does not resolve to the management IP address (DNS mismatch).
The ESXi host's SSL certificate contains an incorrect "Subject Alternative Name" (SAN), requiring a hostname change and subsequent certificate regeneration.
Notes:
Note: vSAN Specifics: If this host is a member of a vSAN cluster, consult Changing the vSAN ESXi Host Name to ensure the object maintenance policy is correctly handled.
Maintenance Mode: Place the host in Maintenance Mode. If it is in a cluster, drag it out of the cluster first.
Inventory Cleanup: Right-click the host in vCenter, select Connection > Disconnect, then right-click again and select Remove from Inventory.
Direct Access: Log in to the ESXi Host Client directly (https://<ESXi_IP>/ui).
Network Config: Navigate to Networking > TCP/IP stacks.
Modify: Select the Default TCP/IP stack, click Edit settings, and input the new Hostname and Domain.
Rejoin: Log back into vCenter and use the Add Host wizard to re-add the host using its new FQDN.
Preparation: Follow the same Maintenance Mode and vCenter Removal steps as above.
SSH Session: Establish an SSH connection to the ESXi host.
Execute Rename:
Set Hostname: esxcli system hostname set --host=new-hostname
Set FQDN: esxcli system hostname set --fqdn=new-hostname.domain.com
Validation: Verify the change by running:
esxcli system hostname get
Rejoin: Add the host back to vCenter Server.
Note: After renaming, vCenter will generate a new SSL certificate for the host. Ensure your backup and monitoring agents trust the new certificate.