Microsoft’s Virtual Machine Manager (VMM) depends on many Windows Server system services. Windows Remote Management is one example that uses the WinRM service for Windows Remote Management. If WinRM isn’t working correctly, VMM will also suffer problems. In this article, I’ll show you some techniques for troubleshooting WinRM.
WinRM Troubleshooting Techniques
WinRM errors commonly stop the VMM from communicating with a Hyper-V host or host cluster. When troubleshooting a suspected WinRM error, use the following 4 techniques.
1. Check the WinRM Service
The first thing you should do when troubleshooting WinRM problems is to make sure that the WinRM service is running on the Hyper-V server. The easiest way to do this is to follow these steps:
- Open an elevated PowerShell session on your Hyper-V server.
- Enter the following command, but don’t forget to use the -ComputerName parameter if you are running a remote system: Get-Service WinRM.
- Check the Status column to see if the service is running.
- Supply the -ComputerName parameter, if working remotely: Start-Service WinRM, if the WinRM service has stopped.
- Enter the Get-Service WinRM command again to verify the service is running.
2. Check the Firewall Port
WinRM uses a listener to listen for commands from a remote system. In order for the listener to work, ensure the firewall isn’t blocking the listener port. The default port for WinRM is TCP port 5985. The instructions for opening a firewall port vary widely from one firewall to the next. Make sure you follow your firewall's instructions to change to the default WinRM port.
3. Check WinRM Configuration
You don’t configure WinRM on your Hyper-V hosts normally. That said, you may find the system has an incorrect configuration. To test a server’s WinRM configuration, complete the following steps:
- Log in to a managed Hyper-V host as an administrator.
- Open an elevated Command Prompt window.
- Enter winrm id.
- Verify the command doesn’t produce an error message.
If the commands above result in an error, you’ll need to perform a WinRM quick configuration. You also must create a WinRM listener. Fortunately, this is a simple process. To configure WinRM and create the required listener, complete the following steps:
- Open an elevated Command Prompt window on your Hyper-V server.
- Enter WinRM quickconfig.
- Enter the following command to create the WinRM listener: WinRM quickconfig -transport:https.
It’s worth noting that these steps assume the VMM server and Hyper-V host exist in the same domain. If that isn’t the case, you’ll need to create a custom WinRM configuration.
4. Check WinRM Communication with the WMI Providers
At this point, you’ll need to check WinRM can communicate with all the required WMI providers. More specifically, WinRM needs to communicate with the WMI provider for the operating system, Hyper-V, and the VMM agent. To test for this, follow these steps:
- Open an elevated Command Prompt window.
- Enter the following command to test the OS WMI provider: winrm e wmi/root/cimv2/Win32_ComputerSystem.
- Use this command to test the Hyper-V WMI provider: winrm e wmi/root/virtualization/v2/msvm_computersystem.
- Test the VMM agent WMI provider with this command: winrm i wmi/root/scvmm/AgentManagement.
If you receive an error, you should remove and reinstall the component. For example, the figure below shows a WMI error related to a faulty VMM agent. If you received an error like this, you would need to uninstall and reinstall the agent.
Troubleshooting WinRM means checking to make sure the WinRM service is running, and firewall ports are open. You should also check the WinRM configuration and that the WinRM listener exists. Finally, check to ensure WinRM is able to communicate with WMI.
Is WinRM a part of System Center Virtual Machine Manager?
No, WinRM is part of the Windows Server operating system. VMM depends on the WinRM service and you can’t run your VMM without it. When that happens, check if the WinRM service is running, and that the firewall ports are open. Something could’ve changed, so also check the WinRM configuration. Finally, check WinRM is able to communicate with the target system. Find additional details on these troubleshooting techniques in the article above.
What services does VMM depend on other than WinRM?
VMM depends on the WinRM, WMI, BITS, DCOM, and WCF services. You’re unable to either connect or use VMM without running these. Test these services’s status using the task manager or cmd window. You’ll also need to check both the server and agent systems to see if they’re working correctly.
What is WMI?
WMI stands for Windows Management Instrumentation. It’s Microsoft’s version of the Web-Based Enterprise Management Initiative (WBEM). This acts as an API that allows remote management tools to interact with many Windows components in a standardized way.
Can I use the Service Control Manager to check the status of the WinRM service instead of using PowerShell?
Yes. That said, most Hyper-V servers run a server core configuration. This means the Service Control Manager isn’t locally installed. You’ll either have to run the Service Control Manager remotely or use PowerShell. This is possible only if your VMM agent is running and the firewall ports are open.
Is there a PowerShell shortcut for enabling WinRM?
Troubleshooting WinRM with PowerShell Basics
Learn how to troubleshoot WinRM with PowerShell here.
Advanced Troubleshooting WinRM with PowerShell
Read more on how to troubleshoot WinRM with PowerShell here.
Find basic WinRM troubleshooting tips here.
Read more about how WinRM can help you here.
Troubleshooting VMM tips
Find more VMM Troubleshooting tips here.
Troubleshoot Network Issues
Learn how to troubleshoot network issues like a pro here.
Post Views: 46