VMware Cloud Community
hughesejs
Contributor
Contributor

Cannot Run any vmsvc commands

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 

0 Kudos
3 Replies
vbondzio
VMware Employee
VMware Employee

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



0 Kudos
szafa
Enthusiast
Enthusiast

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

 

 

0 Kudos
hughesejs
Contributor
Contributor

Thanks, @vbondzio & @szafa, it turned out to be a certificate issue. Got them reset back to defaults and was able to login again. 

I had checked hostd and that was fine, it was vpxa that had a certificate issue in its log file

0 Kudos