VMware vSphere

 View Only
  • 1.  Cannot Run any vmsvc commands

    Posted Feb 18, 2021 07:41 PM

    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 



  • 2.  RE: Cannot Run any vmsvc commands

    Broadcom Employee
    Posted Feb 19, 2021 09:29 AM

    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





  • 3.  RE: Cannot Run any vmsvc commands

    Posted Feb 19, 2021 10:17 AM

    I agree with  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

     

     



  • 4.  RE: Cannot Run any vmsvc commands

    Posted Feb 19, 2021 11:29 AM

    Thanks,  & , 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