Restart ESXi Host Management Agents on 6.5 via SSH

I came in this morning with a Host that was disconnected from vCenter. It was showing the typical “Host Connection and Power State” and “Cannot Syncronize Host” errors. These normally happen when your host is not connected to vCenter, and usually means you’ve restarted it or it crashed.

Of course, I thought that the host had crashed. But I hadn’t noticed an emails, alerts, scrambling for VMs being down. I got on the KVM and did not see the expected “PSOD” (Purple Screen of Death- aka Kernel Panic, which is actually not a bad thing). The host was slow, but responding.

I went to restart the hostd and vpxd agents- the Management Agents, which is a common fix for something like this. You can do this via the DCUI, but the DCUI was really slow in responding. Instead, I opted to connect via SSH (which luckily I had on- I don’t normally).

Here are the commands to restart the host management agents via an SSH session:

/etc/init.d/hostd restart

/etc/init.d/hostd restart

If that works, the host should just reconnect to vCenter. You might also have to right-click the host in the GUI and go under Connection > Connect. This usually works.

If it doesn’t work, check to make sure you haven’t changed anything on the host’s management network, or that you haven’t had a switch configuration or hardware failure. This is why you do redundant NICs for management ;).

Leave a Reply

Your email address will not be published. Required fields are marked *