I’ve recently upgraded my home lab ESXi hosts to ESXi 6.0 Update 2 (6.0u2).
One of the features added is the VMware Host Client – an HTML5 standalone web interface for managing an ESXi host. This has been available as a VMware Labs “Fling” for a while but it’s now part of the default installation. It allows you to manage a standalone ESXi server without needing vCenter or the Windows-only vSphere Client (aka the C# client).
When I tried to access the new client (https://[yourhost-ip-or-name]/ui/) , I was faced with an error:
503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http16LocalServiceSpecE:0x1f0a2c70] _serverNamespace = /ui _isRedirect = false _port = 8308)
A bit of web searching brought me to a blog article by the ever-comprehensive William Lam about an issue with the original Fling when installing on a host which has been upgraded from ESXi 5.5 or earlier.
Part of the Reverse HTTP Proxy config does not get updated during the upgrade, leaving the new UI broken.
The fix is:
- Log on to your ESXi host (either via SSH or DCUI/ESXi Shell)
- Edit /etc/vmware/rhttpproxy/endpoints.conf
- Remove the line:
/ui local 8308 redirect allow
- Now restart the rhttpproxy:
- You should now be able to access the Host Client at https://[yourhost-ip-or-name]/ui/
Last week I was working on an HA cluster of VMware ESXi hosts.
Whatever I tried I couldn’t get the hosts to play nicely when HA was turned on. Further investigation showed that the hosts were resolving their own names to a previous IP address.
Checking the console on each host showed the correct information, but the error messages when turning HA on indicated that they were still resolving to their old incorrect addresses.
The usual problem with HA is that DNS records don’t match what is actually set up, but in this case DNS checked out fine.
It would appear that:
- ESXi uses a local ‘/etc/hosts’ file for resolving names in preference to DNS. You can view this file by pointing a browser at http://youresxservername/host/hosts
- The local hosts file doesn’t get updated when you change the settings using the console interface. It keeps whatever was in there the first time you set up the hostname and IP address for the host
Most of the time this doesn’t matter much as the host doesn’t often need to look itself up, but when VMware HA is turned on, name resolution becomes much more important.
There are two ways to edit the /etc/hosts file. Because ESXi doesn’t have a normal Console Operating System (COS) that full ESX enjoys, both methods are relatively awkwards.
- Use ‘unsupported’ mode to get a local root shell and edit using ‘vi /etc/hosts’
- Use the Remote CLI to change the file remotely.
- vifs.pl –sessionfile <yoursessionfile> –get /host/hosts C:\temp
- Edit the file with notepad
- vifs.pl –sessionfile <yoursessionfile> –put C:\temp\hosts /host/hosts
With that done HA started working again. Probably worth doing a reboot just to make sure it’s ‘taken’.