I'd like to change a host's display name in vSphere. right now it's displaying the wrong name and I'd like to correct it.
Just to be clear, I'm not talking about changing the hostname/FQDN,
Hi Friend,
Below blog answers your question:
http://techhead.co/how-to-change-a-vmware-esx-hosts-name/
Also there is VMware KB article for the same :VMware KB: Changing the name of an ESX or ESXi host
If you need script to do the same : Refer: Virtuin: Rename ESXi Hosts in vCenter (Without Losing Historical Data)
Thanks buddy!
Unfortunately, this is not exactly what I'm looking for, though it did help 🙂
The hostname/dns/fqdn are correct - it's the display name that shows up in vSphere inventory that is incorrect.
For example: esxcli system hostname get gives me the correct information. When I use the vsphere client (web/desktop) the host display name is different 😕 and I can't find a way to change it.
I didn't set up this system and I think someone mixed up 2 hosts names when adding the hosts to vCenter/vSphere.
turns out vCenter gives priority to DNS A record over hostname in /etc/hosts
once I changed the A record I had to remove the host from vCenter and then re-add with the new name
Case closed
Is there a way to do it without removing it from inventory and shutting down the VMs?
You don't need to shutdown anything, do you?
In the period while the host isn't in the vCenter,
it continues operating, and
its VMs could be managed from the host's own web interface.
You can remove it from the inventory with VMs running only if you don't have a distributed service (NSX, vSAN, vSphere Distributed Switch, etc)
If the host is using vSphere Standard Switch it wouldn't be an issue.
I would recommend placing it in maintenance mode and evacuating all its VMs before removing it from inventory, just to be sure.
Edit: I just checked, you can't remove a host from inventory without putting it in maintenance mode first.