Changing the hostname of an ESXi host
search cancel

Changing the hostname of an ESXi host

book

Article ID: 307780

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to change the hostname of a VMware ESXi host.


Environment

VMware vSphere ESXi 7.X
VMware vSphere ESXi 8.X

VMware vSAN 7.x
VMware vSAN 8.x

Resolution

Notes:
  • If the management network of the ESXi host is on a vSphere Distributed Switch, migrate the network to a vSphere Standard Switch before proceeding. For more information, see Disabling vNetwork Distributed Switches
  • If the ESXi host is part of a vSAN cluster, the node in maintenance mode may still be the primary or backup node in the vSAN cluster, and you must manually drag the ESXi host out of the cluster to remove it from the cluster.

To rename a VMware ESXi host using the HTML5 client:

  1. If the ESXi host is part of a cluster, first enter the Maintenance mode to remove it from the cluster.
  2. If the ESXi host is managed by the vCenter Server, disconnect and remove the ESXi host from the vCenter Server.
  3. Connect to the host directly with a vSphere Client and select the ESXi host
  4. Select Configure - TCP/IP configuration
  5. Select the Default TCP/IP Stack, and then click the Edit button
  6. Set hostname and Domain Click OK.
  7. Join the ESXi host to vCenter Server and clusters

Additional Information

The iSCSI Qualified Name used for iSCSI storage configuration is based on the hostname of the ESXi host. If you are facing a storage connectivity issue after changing the hostname of the ESXi host, make sure to review your iSCSI software initiator configuration. 

Unable to rename the iSCSI initiator on the ESXi host
Disabling vNetwork Distributed Switches

NOTE: If there are VM's on the host when it is removed from inventory, these will be removed as well. When the host is added back to the vCenter, the VM's residing on the host will be added back as well. This will result in the VM's having a new Managed Object ID (the "vm-###" value associated with the VM in vCenter). To avoid this change, migrate the VM's to a different host prior to the above procedure.