I faced a unique situation where-in some of the ESXi hosts when rebooted via different methods (vCenter, ESXi web interface, ssh, iLO (DCUI)) did not reboot and had to be reset via the iLO. Post
reset the host came up fine but did not auto connect to vCenter, I had to manually connect and supply the ESXi root credentials again.
Now when I again rebooted the host (via vCenter),this time the host rebooted fine as viewed via the iLO console, and also auto connected fine to the vCenter.
So in what scenario host will not reboot and when cold rebooted (reset) why will it not connect to the vCenter ? Note that the ESXi root credentials have not changed.
First, you should be aware of connection problems between the ESXi and the vCenter server is not related to the root credential. So you should check the vpxa and hostd services inside the ESXi and also their log files inside the /var/log directory in the host.
Also, please try the following command to restart the host and give the result:
esxcli system shutdown reboot --reason "" ....
This issue you faced happens when the ESXi vpxa agent lost communication with the vCenter and usually something change during that lost of communication. For example it could be certificates, a DNS Record, and IP, etc.
This should not happen to you again.
Since the reboot command was given, the vpxa agent will loose communication with the host, but the host should reboot which did not happen. It would be though good to know as to what would prevent the host from rebooting.
I never stated that the connection problem is related to root credentials, I just stated what I observed, Is there anything specific to look in the logs?
As for the reboot command, this will now work fine as the later reboots worked as expected, its the initial reboot where this issue was observed, the host did not reboot and post reset, required root credentials to connect to the vCenter.
connect via shell or CLI and run the following command for investigation about any related issue (do it for all of the related)
tail -100 /var/log/vpxa.log | grep -i "error"
(you can replace "error" word with any other strings like "failure" or etc.)
Note: Please do it whenever you retry for connecting the ESXi to the vCenter after reboot operation.