Remote reset VMware ESXi when vSphere Client cannot connect

I’ve had several issues when I could not connect to vmWare ESXi. The vSphere Client only reported connection failure. The server was running as it should and none of the virtual mashines was affected by this, only the login.

Since the server is hosted in a remote location there has been no other way of fixing it  than to do a hardware reboot. Not the nicest way of solving it.

But since it happen regulary, I’ve turned the SSH as default. So I had one way in to the server when this happen. And there was no problem to log in with a SSH client.

I’ve tried to find a way to reset the service that vSphere Client connected to, but could not find anything. Some posts at the VMware site suggested that some processes should be restarted, but that was no luck. One suggestion was even that there was a problem with the local network, didn’t even try that.

After a while I gave up and decided to reboot the whole vmWare host with shutdown -r now. But in the vmWare host I could not find the shutdown command. Instead there was a shutdown.sh in the bin  (sbin) folder.

Maybe there was some clues in the shutdown.sh script.? It sure was! One of the lines in shutdown.sh was /sbin/services.sh stop. I just had to try and do a restart instead of a stop on that script. My backup plan was that if anything went terribly wrong, I would have to call the off site and have them do a physical power down on the server.

And it turned out a success! After the script had finished there was no problem at all to log in with the vSphere Client. None of the virtual mashines was affected and none of the web site neither.

/sbin/services.sh restart

Connecting to Server with Hyper-V Manager without Domain

After installing Windows Server 2016 Hyper-V on a small office network without domain or AD, I had big troubles with managing the server from Hyper-V Manager.

Found a guide from Microsoft that looked that it would solve the problem. But after trying “all” the steps there was still no luck with connecting to the server.

https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/remote_host_management

These were the steps that most useful to me:

On the Hyper-V host to be managed, run the following as an administrator:

  1. Enable-PSRemoting
    • Enable-PSRemoting will create the necessary firewall rules for private network zones. To allow this access on public zones you will need to enable the rules for CredSSP and WinRM.
  2. Enable-WSManCredSSP -Role server

On the managing PC, run the following as an administrator:

  1. Set-Item WSMan:\localhost\Client\TrustedHosts -Value “fqdn-of-hyper-v-host”

  2. Enable-WSManCredSSP -Role client -DelegateComputer “fqdn-of-hyper-v-host”

  3. Additionally you may need to configure the following group policy: ** Computer Configuration | Administrative Templates | System | Credentials Delegation | Allow delegating fresh credentials with NTLM-only server authentication **

    • Click Enable and add wsman/fqdn-of-hyper-v-host

I did not do the last and optional step because I didn’t know how to do it. Of course that was the missing part!

To get to the Computer Configuration you have to start the “Local Group Policy Editor“. You can search for it in Windows or run the command “gpedit.msc“.

Also for those who don’t know, FQDN is “Fully Qualified Domain Name”.