Solving WinRM Host connection errors in SCVMM - System Center Virtual Machine Manager 2012 R2
Here is my advice for tracking down the problems. Most are related to WinRM.
Step 1: Check the Health status of the Host
To check the Health status of a host, perform the following steps:
Lets start with the easy stuff.
Make sure WMI is working...
net start winmgmt
If you think the WMI repository is corrupted, you could try this:
There is more detail on fixing WMI here:
After checking WMI, I moved on to finding solutions for WinRM problems.
When troubleshooting WinRM the process is like running a simple ping test.
Type the command below at an elevated command prompt:
This should produce output similar to below:
ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor = Microsoft Corporation
ProductVersion = OS: 6.1.7201 SP: 0.0 Stack: 2.0
If you get an error instead of the output above, perform a Quick Configuration of WinRM:
You should see something like this below. Answer ‘Yes’ to any questions.
WinRM already is set up to receive requests on this machine.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:
Enable the WinRM firewall exception.
Make these changes [y/n]?
WinRM has been updated for remote management.
WinRM firewall exception enabled.
WinRM can now be tested again
If "winrm qc" fails with this error:
WSManFault Message = The system cannot find the file specified.
Error number: -2147024894 0x80070002
Then try this:
Articles for configuring the WINRM service manually:
Installation and Configuration for Windows Remote Management
I checked my hosts and WinRM seemed to be running fine, but this article went into more detail:
How to troubleshoot the “Needs Attention” and “Not Responding” host status in System Center 2012 Virtual Machine Manager http://support.microsoft.com/kb/2742246
Highlights from that Knowledge Base Article are as follows:
- Use the Virtual Machine Manager Configuration Analyzer (VMMCA)
- Verify the VMM service account is a member of the local administrators group on the host
- Check for corrupted performance counters
- Check the Svchost.exe process of the Windows Remote Management service
- Increase the default values for WinRM (Shown in this code sample)
I also found some reference to SPN issues.
Issue: The Service Principal Names (SPNs) that VMM requires were not correctly registered when the VMM management server was set up on the specified server. This is a known issue in System Center 2012 Virtual Machine Manager.
Impact: The VMM console may not be able to connect to the VMM management server and/or deploying a Hyper-V host to a bare-metal computer may not work.
Resolution: Manually add the SPNs that are required by VMM by running the following commands as an administrator at an elevated command prompt:
Still having SPN Problems?
- Use setspn.exe to create SPN for vmmserver using following command "C:\Windows\system32\setspn.exe -S SCVMM/hostname.domain accoutname"
- Add SPN values to following registry key "Software\Microsoft\Microsoft System Center Virtual Machine Manager Server\Setup\VmmServicePrincipalNames"
- Run "C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\setup\ConfigureSCPTool.exe -install" to configure SCP.
Enable Powershell Remoting via Group Policy
After all that it turns out that our problem was due to a certificate error with PowerShell on the host servers. We fixed it by removing the certificate from PowerShell on those servers.
If your getting this error, "The WinRM client received an HTTP server error status (500)", then these two articles should help.