4 Techniques for Troubleshooting WinRM Errors with VMM

0

Microsoft Virtual Machine Manager (VMM) depends on many Windows Server System Services. Windows Remote Management is an example that uses the WinRM service for Windows remote management. If WinRM is not working properly, VMM will also have problems. In this article, I will show you some WinRM troubleshooting techniques.

WinRM Troubleshooting Techniques

Common WinRM Errors Stop the VMM of communicating with a Hyper-V Host or host cluster. When troubleshooting a suspected WinRM erroruse the following 4 techniques.

1. Check the WinRM service

The first thing to do when troubleshooting WinRM issues is to ensure that the WinRM service is running on the Hyper-V server. The easiest way to do this is to follow these steps:

  1. Open an elevated PowerShell session on your Hyper-V server.
  2. Enter the following command, but remember to use the -ComputerName parameter if you are running a remote system: Get-Service WinRM.
  3. Check the Status column to see if the service is running.
  4. Provide the -ComputerName parameter, if you are working remotely: WinRM Boot Serviceif the WinRM service has stopped.
  5. Enter the Get-Service WinRM command again to verify that the service is running.

Make sure the WinRM service is running and start the service if needed.

2. Check the firewall port

WinRM use a listener to listen for commands from a remote system. For the listener to work, make sure that the firewall does not block the listening port. The default port for WinRM is TCP port 5985. Instructions for opening a firewall port vary widely from firewall to firewall. Be sure to follow your firewall instructions to switch to the default WinRM port.

3. Check WinRM configuration

You don’t normally configure WinRM on your Hyper-V hosts. That said, you may find that the system has a incorrect configuration. For test a server’s WinRM configurationproceed as follows:

  1. Log in to a managed Hyper-V host as an administrator.
  2. Open an elevated command prompt window.
  3. Enter winrm identifier.
  4. Verify that the command does not generate an error message.
Screenshot of a CMD window showing the results returned for the winrm id command.

The WinRM ID command should show output similar to this.

If the above commands generate an error, you will need to perform a WinRM Quick Setup. You must also create a WinRM listener. Fortunately, this is a simple process. To configure WinRM and create the required listener, follow these steps:

  1. Open an elevated command prompt window on your Hyper-V server.
  2. Enter WinRM Quick Setup.
  3. Enter the following command to create the WinRM listener: WinRM Quick Setup -transport:https.

It should be noted that these the steps assume VMM server and Hyper-V host exist in the same domain. If not, you will need to create a Customs Configuring WinRM.

Screenshot of a CMD window showing that you cannot configure anything while WinRM is running.

You won’t need (or can) do a quick setup if WinRM is already running.

4. Check WinRM communication with WMI providers

At this point you will need to verify that WinRM can communicate with everything necessary WMI Providers. Specifically, WinRM needs to communicate with the WMI provider for the operating system, Hyper-Vand the VMM agent. To test this, follow these steps:

  1. Open an elevated command prompt window.
  2. Enter the following command to test the WMI operating system provider: winrm and wmi/root/cimv2/Win32_ComputerSystem.
  3. Use this command to test the Hyper-V WMI Provider: winrm and wmi/root/virtualization/v2/msvm_computersystem.
  4. Test it VMM Agent WMI Provider with this command: winrm and 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 VMM agent. If you receive such an error, you will need to uninstall and reinstall the agent.

Screenshot of the CMD window showing the error returned by the VMM agent.  Variables with values ​​are provided in a concise list.  This can help you quickly identify which part of the code is not working.

This error indicates a problem with the VMM agent.

Final Thoughts

Repair WinRM means check to make sure WinRM the service is runningand firewall ports are open. You should also check the WinRM configuration and that the WinRM listener exists. Finally, check that WinRM is able to communicate with WMI.

FAQs

Is WinRM part of System Center Virtual Machine Manager?

No, WinRM is part of the Windows Server operating system. VMM depends on WinRM service and you cannot run your VMM without it. When this happens, check if the WinRM service is running and the firewall ports are open. Something may have changed, so check the WinRM configuration as well. Finally, verify that WinRM is able to communicate with the target system. Find additional details about these troubleshooting techniques in the article above.

What services does VMM depend on other than WinRM?

VMM depends on the WinRMWMI, BITS, DCOM, and WCF Services. You cannot log in or use VMM without running them. Test the status of these services using the Task Manager Where cmd window. You will also need check both the server and agent systems to see if they are functioning properly.

What is WMI?

WMI represented Windows Management Instrumentation. This is Microsoft’s version of the Web-Based Enterprise Management Initiative (WBEM). It acts like a 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 WinRM service status instead of using PowerShell?

Yes. That said, most Hyper-V Servers run a server core configuration. This means that the Service Control Manager is not installed locally. You will either need to run the service control manager remotely or use PowerShell. This is only possible if your VMM agent is running and the firewall ports are open.

Is there a PowerShell shortcut to enable WinRM?

Yes. Just use the Enable-PSRemoting cmdlet. you have to run this cmdlet from an elevated PowerShell session and generally does a good job fixing WinRM issues.

Resources

Troubleshooting WinRM with PowerShell Basics

Learn how to troubleshoot WinRM with PowerShell here.

Advanced WinRM Troubleshooting with PowerShell

Learn more about troubleshooting WinRM with PowerShell here.

Troubleshooting WinRM

Find basic troubleshooting tips for WinRM here.

Discover WinRM

Learn 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:
ten

Continued Quick tips articles



Share.

Comments are closed.