I've had the same issue:
--
--root@esx1234 /--# service mgmt-vmware status
vmware-hostd is stopped
--root@esx1234 /--# service mgmt-vmware start
Starting VMware ESX Server Management services:
VMware ESX Server Host Agent is already running
Availability report startup (background) OK
--root@esx1234 /--# service mgmt-vmware status
vmware-hostd is stopped
I found that the PID files weren't cleaned up after the hostd agent was stopped the last time. Therefore when you try to restart the agent with service mgmt-vmware restart, the script finds what it thinks is a "life" PID for the vmware-hostd daemon, and therefore gives the "VMware ESX Server Host Agent is already running" line.
This is what I had to do to get past this:
If the commands "
ps -auxwww |grep -i hostd" or "
pidof vmware-hostd" returns no process IDs , you know that the management agent is not running! We therefore need to find the files that reports a false PID.
As the root user, do:
cd \var\run\vmware
ls -l
If any of the following files exists, delete them:
vmware-hostd.PID
watchdog-hostd.PID
Once you are sure those files are deleted, try restarting the management agents again:
service mgmt-vmware restart
-or-
/etc/init.d/mgmt-vmware restart
Hope this helps a bit.
Regards
Rynardt Spies
VCP, vExpert
www.virtualvcp.com