Today we will show how to change hostname of an Esxi 6.5 host, if you have to do it anytime or for any reason. Admins have options when it comes to changing an ESXi 6.5 host name, but only the vSphere Web Client has full functionality in the latest release. So you can use vSphere windows client, web client or ssh with esxcli function.
Before making any changes of the hostname of the server, you need to put it into the maintenance mode, in order not rebooting it. Be carefull to move all the virtual machines running on the host before entering maintenance mode.
So under Actions -> Enter maintenance mode and press Yes for the warning.
To change the host name and DNS server configuration with the vSphere Web Client, select a host and go to the TCP/IP configuration page, which is under the Configure tab. Select the default TCP/IP system track and click the pencil icon to edit the settings.
Enter the new hostname that you will be provided to this host and save.
We can also connect to ESXi via Secure Shell (SSH) and use command-line tools to change the host name and DNS server configuration. The most popular of these tools is the PuTTY SSH client. You need to enable an SSH connection to your ESXi host to use PuTTY and SSH.
First check the hostname of the esxi using cat of the /etc/hosts file :
Then run the following esxcli commands to change the hostname and set the fqdn.
- esxcli system hostname set –host=hostname
- esxcli system hostname set –fqdn= fqdn
After that, we check the new hostname of the esxi, on html5 gui :
So as you see it’s relatively easy to rename an ESXi host and change a DNS server configuration.
Thank you !