Steps listed to change the ESXi host name, FQDN and DNS IP
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
1. Put the host in maintenance mode, disconnect and remove from vCenter inventory
2. Take a ssh of the ESXi host
3. Run below commands to view and update hostname and fqdn (change the name as per requirement)
# esxcli system hostname get
# esxcli system hostname set --host=RequiredHostName
# esxcli system hostname set --fqdn=RequiredFqdn
4. Reboot the ESXi host
5. Connect the host to vCenter using new hostname
Run below commands to view, add and remove dns ip of ESXi host (change the IP as per requirement)
# esxcli network ip dns server list
# esxcli network ip dns server add -s 10.xx.yy.zz
# esxcli network ip dns server remove -s 10.aa.bb.cc
NOTE : If hosts are part of vDS, we may have to readd them to respective distributed switches
Add the DNS server IP in vCenter Configure the DNS, IP Address, and Proxy Settings