VMware - vCetntre/vSphere shows virtual machine as 'Unknown VM' and inaccessible
Within the vSphere client or vCentre your virtual machine(s) are named as 'Unknown VM' and are inaccessible.
This can be caused by connectivity issues between the hypervisor and its datastore. To resolve the issue follow these steps,
- Log into the virtual machines host via SSH.
- Then change directory via the command 'cd /var/lib/vmware/hostd/stats'.
- List the files in the directory via 'ls'. There should be 4.
- Remove the files using 'rm *'.
- Then restart the management agents via the command '/etc/init.d/hostd restart && /etc/init.d/vpxa restart'.
~ # cd /var/lib/vmware/hostd/stats /var/lib/vmware/hostd/stats # ls hostAgentStats-20.stats hostAgentStats.idMap hostAgentStats.xml /var/lib/vmware/hostd/stats # rm * /var/lib/vmware/hostd/stats # /etc/init.d/hostd restart watchdog-hostd: Terminating watchdog process with PID 4982 hostd stopped. hostd started. /var/lib/vmware/hostd/stats # /etc/init.d/vpxa restart watchdog-vpxa: Terminating watchdog process with PID 5279 vpxa stopped. /var/lib/vmware/hostd/stats #