If the ESXi host is managed by vCenter Server, disconnect and remove the ESXi host from the vCenter Server
Please refer to the following Kb VMware Knowledge Base
To rename a VMware ESXi host:
- If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.
- If the ESXi host is managed by VirtualCenter/vCenter Server, disconnect and remove the ESXi host from the vCenter Server.
- Connect to the host directly with a vSphere Client.
- Click ESXi host.
- Click the Configuration tab.
- Click DNS and Routing.
- Click Properties.
- In the DNS Configuration tab, edit the Name field. Change anything else that is necessary in your environment.
- Click OK.
- Join the ESX host to VirtualCenter/vCenter Server and clusters.
Hope it helps!
My esx is a standalone esx (no cluster, no vca, or vsphere managment) . I just try to rename a system.
And when I use the vsphere client and apply the description you described above it did not worked even after a reboot.
What is working :
esxcfg-advcfg -s newhostname /Misc/hostname
Thanks Anyway !!