When virt-who adds an ESX host, it names it with it's UUID in Content Hosts, which can get confusing later. I wanted to rename the content host entry to be the actual ESX host name. To do this, I had to figure out what the UUID of each ESX host was and there's not an easy way to do this in the vSphere client.
PowerCLI to the rescue!
- Open power CLI
- Connect to the vCenter
- Connect-VIServer <vserver name>
- You will get prompted by windows for authentication
- Run this command to see the UUID's for every host in that vCenter
- Get-View -ViewType HostSystem -Propert Name, hardware.systeminfo | Select Name, @{N="UUID" ; E={$_.hardware.systeminfo.uuid } }
- Match up the UUID's from the command with the UUID entries in Content Hosts. Rename them with their real name.
- Done!