Trying to restart a vm by command line in ESXi. The web gui isn't loading but I can SSH into it.
I've SSH'd in and have tried to run:
vim-cmd vmsvc/getallvms
But I get 'Failed to login: Connection refused'
I've already restarted the management engines, vpxa, hostd as per this guide here. https://kb.vmware.com/s/article/1003490
I notice that when I go to restart vpxa it's not actually running so I have to start it, but still get the connection refused error.
Any suggestions? it's ESXi 6.5.0
vim-cmd uses hostd, so if that service is failing due to an underlying issue no vim-cmd will work. Check out why hostd is failing, most likely cause for it not to respond at all or hang are major storage related issues.
edit: in 2 SSH sessions, do:
tail -F /var/log/hostd.log
/etc/init.d/hostd restart
I agree with @vbondzio most likely hostd is crashing (probably you will find hostd dump file in /var/log/vmware/ folder), for troubleshooting refer to https://kb.vmware.com/s/article/1002849