FTF 007: How to change ESXi hostname when NSX is configured on a cluster?
Some weeks ago my customer wanted to change ESXi hostnames. This is not difficult and can be done without VM downtime using the below steps:
- Place ESXi host into maintenance mode
- Remove the host from cluster/vCenter inventory
- Change a record in DNS (or vCenter hosts file)
- Add the ESXi host again to the vCenter inventory using a new name
- Exit from maintenance mode
A procedure is a little bit more complicated where NSX is deployed and configured on a cluster where the name of ESXi hosts have to be changed. There are (at least) two things needed to be taken into consideration if you want to replace ESXi hostnames in an elegant way.
VXLAN
If a vSphere cluster is configured for VXLAN, you should remember that NSX uses IP pool to address a special vmkernel interface - VTEP and:
- if you have a new vSphere cluster without VM running on it, you can just unconfigure NSX (VXLAN) on this cluster. Change ESXi hostnames and configure VXLAN again.
- if you have a vSphere cluster with VMs running and using VXLAN, a procedure is a little longer because you can't unconfigure VXLAN on the cluster (there are used by VMs). You should remove a host from the cluster (after placing the host into maintenance mode) and make it a standalone host outside of any cluster. NSX automatically removes NSX modules (vibs) and allocated IP addresses from the IP pool. If you remove the host from inventory when it is still in the NSX cluster you will have a stale IP address and you need to use Rest API to release it. For example, using this procedure.
Guest Introspection
The second thing is Guest Introspection. As you probably now, NSX deploys a system VM on each (at least in current NSX version 😉 ) ESXi host where antivirus protection by 3rd party needs to be used. Recently VMware changed a NSX behaviour and each VM name contains FQDN or IP address (it depends on how ESXi hosts are added to the vCenter inventory. I recommend FQDN) of ESXi hosting this VM. You should unconfigure vSphere cluster from Guest Introspection and configure it again after changing ESXi hostnames.
SummaryChanging ESXi hostnames can be time-consuming if there are many dependencies as the example mentioned above - NSX services. Another example outside of NSX can be VM backup. VMware hasn't introduced a special vmkernel just for VADP and if the backup/restore traffic is sent by a dedicated interface, the hosts file also needs to be updated on backup servers.
Category: FtF VMware Tags: FtF, NSX, troubleshooting custom footer text left custom footer text right Iconic One Theme | Powered by WordpressThis website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Read More
Privacy & Cookies Policy Privacy OverviewThis website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Always EnabledNecessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessaryAny cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.