Saturday, May 28, 2011

Restarting vmware-hostd

Today I had an issue here an ESX host became unresponsive in vCenter, yet the VMs that were running on the host were fine. The normal remedy for this issue would be to restart the management agent on the ESX host via the Service Console:

/etc/init.d/mgmt-vmware restart

However, this did not work. The mgmt-vmware restart command hung while stopping the "VMware ESX Server Host Agent". Ten minites after executing mgmt-vmware restart, I decided to break out of the process by pressing Ctrl+z.

Clearly, there was a problem with the existing running instance of the management agent, vmware-hostd. The only way to get this working without a host reboot, is to find the PID for vmware-hostd and kill it:

To locate the PID for the running vmware-hostd process execute:

ps -auxwww |grep vmware-hostd

You will see output similar to: (I've marked the PID in BOLD text)

root 13089 1.3 2.6 179080 6988 ? S 2008 1695:23 /usr/lib/vmware/hostd/vmware-hostd /etc/vmware/hostd/config.xml -u

To kill the running process, execute:

kill -9 (I had to run "kill -9 13089")

Once vmware-hostd is no longer running, you can restart the management agent by running:

/etc/init.d/mgmt-vmware restart

-or-

service mgmt-vmware restart

No comments:

Post a Comment