Cry about...
MS-Windows Troubleshooting


Hyper-V Manager: An error occurred while attempting to connect to server ...


Symptom:

When using Hyper-V manager and attempting to connect to another computer (by right clicking on "Hyper-V Manger" and selecting "Connect to server..."), after having entered the computer name and clicked OK there is a long delay and then the following error is displayed:

An error occurred while attempting to connect to server "NAME". Check that the Virtual Machine Management service is running and that you are authorized to connect to the server.

The operation on computer 'NAME' failed: WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remove computers within the same local subnet.

Where "NAME" in the above is the name of the computer/server that you are trying to connect to.

Possible Causes and Remedies:

Hyper-V manager uses WinRM (Windows Remote Management) to establish a connection to Hyper-V running on the remove computer, but it can't connect:

  • WinRM has not been configured on the remote computer.

    On the remote computer - so the one you are trying to connect to - run the following in an elevated command prompt:

    winrm quickconfig

    If you get the message:

    WinRM service is already running on this machine.
    WinRM is already set up for remote management on this computer.

    Then this is not the problem and you should continue troubleshooting.

    Otherwise you should enter "y" to each of the dialogs:

    C:\>winrm quickconfig
    WinRM is not set up to receive requests on this machine.
    The following changes must be made:

    Start the WinRM service.
    Set the WinRM service type to delayed auto start.

    Make these changes [y/n]? y

    WinRM has been updated to receive requests.

    WinRM service type changed successfully.
    WinRM service started.
    WinRM is not set up to allow remote access to this machine for management.
    The following changes must be made:

    Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    Enable the WinRM firewall exception.

    Make these changes [y/n]? y

    WinRM has been updated for remote management.

    Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    WinRM firewall exception enabled.


These notes have been tested with clients running Windows 10, and may also apply to other versions of Windows.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.