Cannot connect to Vmware server – kill the hostd

Sometime the Vmware infrastrcture client shows an error –  “Unable to connect to the server, the connection has timed out”.

Simplest solution is to restart the mgmt-vmware and vmware-vpxa services using following commands

[ad#co-3]

service mgmt-vmware restart
service vmware-vpxa restart

However, life isn’t that simple. Restarting the mgmt-vmware service can keep you waiting for hours, as it doesn’t terminate / restart the hostd process.

This can be done by following steps.

Log in as root to the ESX host command-line via the physical console / KVM connection / or through SSH.

[ad#co-2]

Go to the /var/run/vmware directory with the command:

cd /var/run/vmware

Determine the Process ID (PID) management service. View the contents of the vmware-hostd.PID file with the command:

cat vmware-hostd.PID

For example:

[root@myvmwarehost]# cat vmware-hostd.PID
5061[root@myvmwarehost]#

kill the process using the PID.

kill -9 <PID>

e.g. kill -9 5061.

Then restart the vmware-vpxa service.

Share

Leave a Reply