Wednesday, June 18, 2008

Restarting hostd service on the host

Sometime restarting management service on the host will not restart the “hostd ” service. It is in hung state or the script gets stuck when stopping the service. It may happen that the SSH session to the ESX host becomes unresponsive. To restart this without restarting the host follow below steps. This has been documented on KB for VMWare

1. Navigate to the /var/run/vmware directory:
# cd /var/run/vmware
2. List the files vmware-hostd.PID and watchdog-hostd.PID:
# ls -l vmware-hostd.PID watchdog-hostd.PID
3. Determine the Process ID (PID) management service, view the contents of the file vmware-hostd.PID:# cat vmware-hostd.PID
4. For example, [root@vmware]
# cat vmware-hostd.PID
5. Use the resulting PID to kill the process. Caution: Type the kill -9 command carefully, it kills the process of the supplied PID without exception or confirmation.
# kill -9 1191
6. Delete the vmware-hostd.PID and watchdog-hostd.PID files:
# rm vmware-hostd.PID watchdog-hostd.PID
7. Restart the management service, run:
# service mgmt-vmware restart

No comments: