User Profile
DanRobb
Brass Contributor
Joined 7 years ago
User Widgets
Recent Discussions
Re: Session Hosts Hanging Frequently
Robin_Kinetix We were never able to figure out a proper solution despite months of back and forth with MS Support. I ended up creating a scheduled task to reboot on the hosts every 8 hours (if nobody is logged in) which has reduced the frequency of the hangs from once every few days to once every few weeks/months. Here's the Powershell script that is called by the scheduled task - it runs every 5 minutes. $minHoursBetweenReboots = 8 # Minimum number of hours between reboots function Write-Log($logMessage) { $logFile = "$($PSScriptRoot)\ScheduledRestart.log" Write-Output "[LOG] [$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] $logMessage" Write-Output "[LOG] [$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] $logMessage" | Out-File $logFile -Append } Write-Log "Start of script" function End-Script { Write-Log "End of script" exit 0 } # Check for running installations. If any, then exit if((Get-Process).Name -match "msiexec|setup|wusa") { Write-Output "Detected software installation in progress. Exiting..." End-Script } # Check for active sessions. If any, then exit [array]$activeSessions = & query session | Select-String -SimpleMatch "Active" if($activeSessions.Count -gt 0) { Write-Log "There are $($activeSessions.Count) active sessions. Exiting..." End-Script } else { Write-Log "There are no active sessions" } # Get last boot time try { $osInfo = Get-WmiObject -Class Win32_OperatingSystem [datetime]$lastBootTime = $osInfo.ConvertToDateTime($osInfo.LastBootUpTime) Write-Log "Last boot time: $lastBootTime" } catch { Write-Log "ERROR: Unable to get last boot time. Exiting..." End-Script } # If more than $minHoursBetweenReboots since last boot time then reboot if($lastBootTime -lt (Get-Date).AddHours(-$minHoursBetweenReboots)) { Write-Log "Last boot time was more than $minHoursBetweenReboots hours ago. Restarting..." & shutdown -r -t 0 -f -c "Restart initiated by scheduled task/powershell script" } else { Write-Log "Last boot time was less than $minHoursBetweenReboots hours ago. Exiting..." End-Script } End-Script7.1KViews0likes0CommentsRe: Last heartbeat time
DeletedThe value used to get updated every few seconds (when WVD was still in public preview). Now it only gets updated when the RDAgentBootLoader service is started, or will show as "NoHeartbeat" if the RDAgentBootLoader service is stopped for 10 seconds. Interestingly, if a host hangs or blue screens, it will show a "NoHeartbeat" status after 10 seconds, but any users that were connected to it at the time will be unable to log into WVD again until the host comes back up or it is removed from the host pool. Even if the status is "NoHeartbeat" the WVD broker will still try connect the users to the hung session host.4.3KViews0likes0CommentsRe: Public IP Ranges for WVD
jasonhandThanks for your reply. That's useful to know (solves a totally different issue I'm currently working on) but won't work for this issue. Since the session hosts establish a reverse connection with the RD Broker, we don't really need to know what the public IP addresses of the session hosts are. It's the rest of the WVD infrastructure that we need them for (RD Web Access, RD Broker, RD Diagnostics etc.). Microsoft still haven't provided a list of WVD IP ranges. ScriptingJAK's list was created through trial and error, but Microsoft could add a new range or URL at any moment and break WVD connectivity for organisations that need to whitelist outbound internet connectivity.32KViews1like0CommentsRe: WVD outage / hosts unavailable with status "NoHeartbeat"
Nicholas Semenkovich These are the steps I followed: 1. Remove the session host from the host pool: Remove-RdsSessionHost -TenantName [TenantName] -HostPoolName [HostPoolName] -Name [SessionHostName] -Force 2. Get the host pool registration token (replace with New-RdsRegistrationInfo if the token has already expired) Export-RdsRegistrationInfo -TenantName[TenantName] -HostPoolName [HostPoolName] | Select -Expand Token 3. Log into the session host and update the following registry keys: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent Name: RegistrationToken Value: Token Goes Here Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent Name: IsRegistered Value: 0 4. Restart the RDAgentBootLoader service12KViews2likes3CommentsRe: WVD outage / hosts unavailable with status "NoHeartbeat"
Nicholas Semenkovich We experienced the same issue today. Came in this morning and 3 session hosts had a status of NoHeartbeat. Restarting the services/session host had no effect. Only way to fix it was to remove the session hosts from their pools and re-add them. Happened again to a 4th session host this afternoon. I've raised a ticket with Microsoft and sent them some logs.12KViews1like5CommentsSession Hosts Hanging Frequently
Wondering if anyone else is seeing regular VM hangs with the Windows 10 Enterprise for Virtual Desktops image, or has any advice on troubleshooting the issue we're experiencing? In our tenant we have 14 session hosts (each has 16 vCPU, 64GB RAM, 256GB Premium SSD) in a single host pool. FSLogix Apps is used for profiles and they're stored on a Premium Azure Files Storage Account (5TB Quota, 5000 allowed IO/s, 15000 burst IO/s) in the same region as the hosts. There are 225 users that use WVD for a full desktop environment (no RemoteApps). Average CPU and RAM usage during peak time is less than 50% per VM. Almost every day, usually during peak hours, at least one of the VMs hangs and needs to be restarted from the Azure portal. Users that are connected to the affected VM report that none of their opened applications are responsive, and that they can’t launch or close any applications, even using task manager. The start menu also becomes unresponsive. Any new connections (via Remote Desktop client or directly via RDP) fail. If we try to log off users using the "Invoke-RdsUserSessionLogoff" cmdlet, their session hangs at the "Signing you out" screen indefinitely. If we try to kill any of their processes using task manager (as an admin) we get an Access Denied error message, or the process doesn’t get killed. Typically in the event logs, about 30 minutes prior to the VM hanging, we start to a few of following events, but there is no commonality between applications, servers or users in the event descriptions. 1002 – Application Hang 7036 – Services entering a stop state 7011 – A timeout was reached wile waiting for a response from a service8.4KViews0likes4CommentsPublic IP Ranges for WVD
Hello, Are there any public IP address ranges/subnets specifically for connectivity to the Windows Virtual Desktop infrastructure? We have a secure environment which requires us to whitelist IP addresses on our on-prem firewall for external internet access. I've found the list of IP segments for Azure datacenters (https://www.microsoft.com/en-gb/download/details.aspx?id=41653) but we can't really whitelist all of those IP segments just for connectivity to WVD. Thanks, Daniel35KViews2likes14Comments
Recent Blog Articles
No content to show