ESXi: How to change the hostname of an ESXi host

root's picture

For this procedure you need to enable SSH access to your ESXi host.

You can change the hostname, also fqdn if you want, via two commands. Both will be shown below.

NOTE: In this example, I will change fqdn (meaning hostname.domain).

Via esxcfg-advcfg:

[root@local:~] esxcfg-advcfg -s mini.local /Misc/hostname
Value of HostName is mini.local

or via esxcli command:

[root@local:~] esxcli system hostname set --fqdn=mini.local
[root@mini:~]

In order to see your results, you can use also two commands, as shown below:

[root@mini:~] esxcli system hostname get
   Domain Name: local
   Fully Qualified Domain Name: mini.local
   Host Name: mini
[root@mini:~] esxcfg-advcfg -g /Misc/hostname
Value of HostName is mini.local

Done! ;)

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.

Recent content

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root
root