WVD Troubleshooting Options Tips Tricks – Windows Virtual Desktop

0
WVD Troubleshooting Tips

I have seen many scenarios where I was not able to connect to the WVD host pool (VM) and host pools are not appearing. Since I’m new to WVD, I didn’t know how to start WVD Troubleshooting. In this post, I’m trying to help to WVD community to begin the troubleshooting process.

NOTE!WVD is GA’d Generally Available World Wide with App Attach Feature?

Introduction

There could be many ways to perform WVD troubleshooting. However, I’m going to share my experience in this blog. These are random tips to troubleshoot WVD issues. The WVD Error codes are available in Microsoft documentation here.

What are the WVD Troubleshooting Options?

  • Azure Portal – Check whether VMs are up and Running
  • Try to run the Remote commands from Azure Portal -> Virtual Machines -> Operations -> Run Command.
  • Evaluate Group Policies from AD to check whether those policies are blocking access to the WVD Host Pool VM.
  • Confirm whether the user is assigned to appropriate WVD host pool application groups
  • PowerShell, PowerShell, and PowerShell
  • Event Logs – Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational
Oops, we couldn't connect to "Session Desktop" - We couldn't connect to the gateway because of an error. If this keeps happening, ask your admin or tech support for help. Reconnect / Cancel - WVD Troubleshooting Tips
Oops, we couldn’t connect to “Session Desktop” – We couldn’t connect to the gateway because of an error. If this keeps happening, ask your admin or tech support for help. Reconnect / Cancel – “Can’t login to HostPool” WVD Troubleshooting Tips.

Azure VM Run Commands – WVD Troubleshooting

What is RUN Commands? Run Command uses the VM agent to run PowerShell scripts within an Azure Windows VM. More details about Azure Windows VM Run commands are here.

NOTE! – You can’t connect to Azure Windows VM because WVD host pool VMs don’t have public IP and RDP ports enabled for external connectivity.

Run PowerShell Commands

The most useful run command which found for WVD troubleshooting is RunPowerShellScript.The helps to execute a PowerShell script or any other PS commands. As you can see in the following, I’m trying to get the list of Group Policies applied to that VM.

RSOP.MSC didn't give any output because of obvious reason - WVD Troubleshooting
RSOP.MSC didn’t give any output because of obvious reason – WVD Troubleshooting

 WVD Qwinsta Command

The command Qwinsta will help to understand whether the RD client is working fine on the VM or not. If it’s not that is the problem with WVD host pool. We could get connection or gateway errors when the WVD RD Client is not listening.

PS C:\Users\ACNWinENTImage> qwinsta
SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE services                                    0  Disc
console                                     1  Conn
>rdp-tcp#1         ACNWinENTImage          2  Active
31c5ce94259d4...                        65536  Listen
rdp-tcp                                 65537  Listen
WVD Troubleshooting  qwinsta
WVD Troubleshooting qwinsta

Check Event Logs Using Run CommandsRemoteDesktopServices

You can also run a Powershell command as mentioned below to get the Remote Desktop Services logs. More details about PowerShell commands to collect event logs here.

Get-EventLog -logname RemoteDesktopServices

NOTE! – Also, you can try to get the WVD related event logs from Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational.

Group Policies

I have seen group policies are creating trouble with VMs in the WVD host pool. Evaluate the group policies applied to the OU where the WVD VMs are part of.

I have seen scenarios removal of some of the group policies helped to regain access to VMs in the host pool. So, the group policies are one of the main WVD troubleshooting steps. Don’t apply all the security policies to the VMs without testing it thoroughly.

PowerShell Command-lets

The WVD troubleshooting with Powershell command-lets is another useful way to resolve the issue. Make sure you have all the required PowerShell modules installed and imported on to the machine before starting the WVD troubleshooting.

##Install & Import AzureAD Module 
Install-Module -Name AzureAD

Import-Module -Name AzureAD
##Install & Import RD - WVD Module
Install-Module -Name Microsoft.RDInfra.RDPowerShell
Import-Module -Name Microsoft.RDInfra.RDPowerShell
## Login with Azure AD Account
Add-RdsAccount -DeploymentUrl https://rdbroker.wvd.microsoft.com
WVD Troubleshooting - Install & Import Azure and RDInfra Module
WVD Troubleshooting – Install & Import Azure and RDInfra Module

Rds Diagnostic Activities

Make sure you have appropriate access to Azure AD and WVD Tenant before running the following PowerShell commands. Use the following command commands to:

Get-RdsDiagnosticActivities -UserName “[email protected]” -TenantName $tenant -Detailed

The output with failures – This error was because of GPO policies! I had to remove the security related group policies to get the WVD VM connectivity issue fixed.

WVD Event Logs

WVD RD Application troubleshooting can be done via event viewer. You can follow event log path:

ActivityId: be333145-645e-4767-9df7-13a7246f0000
ActivityType      : Connection
StartTime         : 8/16/2019 6:08:12 PM
EndTime           : 8/16/2019 6:08:16 PM
UserName          : [email protected]
RoleInstances     : rdwebclient;mrs-eus2r1c002-
Outcome           : Failure
Status            : Completed
Details           : {[ClientOS, Win32 IE 11.0], [ClientVersion, 1.0.19.2], [ClientType, HTML], [PredecessorConnectionId, ]…}
LastHeartbeatTime : 8/16/2019 6:08:16 PM
Checkpoints       : {OnClientDisconnected}
Errors            : {Microsoft.RDInfra.Diagnostics.Common.DiagnosticsErrorInfo}ActivityId: a802a7c4-f6e6-40ee-86a5-c58e78160000
ActivityType      : Connection
StartTime         : 8/16/2019 6:07:59 PM
EndTime           : 8/16/2019 6:08:03 PM
UserName          : [email protected]
RoleInstances     : rdwebclient;mrs-eus2r1c002-
Outcome           : Failure
Status            : Completed
Details           : {[ClientOS, Win32 IE 11.0], [ClientVersion, 1.0.19.2], [ClientType, HTML], [PredecessorConnectionId, ]…}
LastHeartbeatTime : 8/16/2019 6:08:03 PM
Checkpoints       : {OnClientDisconnected}
Errors            : {Microsoft.RDInfra.Diagnostics.Common.DiagnosticsErrorInfo}

Event Viewer (EventVwr)-> Application and Service Logs > Microsoft > Windows> RemoteDesktopServices-RdpCoreTS/Operational

WVD Troubleshooting -  RemoteDesktopServices-RdpCoreTS/Operational
WVD Troubleshooting – RemoteDesktopServices-RdpCoreTS/Operational

Sample WVD Event Logs

 Disconnect trace:CUMRDPConnection Disconnect trace:'calling spGfxPlugin->PreDisconnect()' in CUMRDPConnection::PreDisconnect at 4983 err=[0xb], Error code:0xB
Interface method called: PreDisconnect(11)
Interface method called: SetErrorInfo(0xb)
Interface method called: DisconnectNotify
Interface method called: GetServerAutoReconnectInfo
The disconnect reason is 11
Channel rdpdr has been closed between the server and the client on transport tunnel: 0.
Channel cliprdr has been closed between the server and the client on transport tunnel: 0.
Channel rail has been closed between the server and the client on transport tunnel: 0.
Channel railenc has been closed between the server and the client on transport tunnel: 0.
'WINHTTP_CALLBACK_STATUS_REQUEST_ERROR WebSocket operation 'WINHTTP_WEB_SOCKET_RECEIVE_OPERATION'' in CHttpIoRequestWinHttp::StatusCallback at 2257 err=[0x2efe]
Websocket WINHTTP_CALLBACK_STATUS_REQUEST_ERROR
'Forcing Websocket shutdown.' in CHttpIoRequestWinHttp::Shutdown at 1048 err=[0x0]
'Closing Websocket Handle=0x160ef360' in CHttpIoRequestWinHttp::Shutdown at 1058 err=[0x0]
WSSSTATETRANSITION: An error was encountered when transitioning from WSStateDisconnecting in response to  WSSGenericEvent (error code 0x80072EFE).
'WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING called Handle=0x6f4fef98' in CHttpIoRequestWinHttp::StatusCallback at 2063 err=[0x0]
'Handle closing - stream type: 3' in CHttpIoRequestWinHttp::ContinueProcessingCallback at 2926 err=[0x0]
Interface method called: OnDisconnected(server initiated)

Resources

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.