SOLVED

How to troubleshoot Unavailable Status of SessionHost

%3CLINGO-SUB%20id%3D%22lingo-sub-1352306%22%20slang%3D%22en-US%22%3EHow%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1352306%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20make%20a%20Customer's%20custom%20image%20work.%20I%20can%20add%20it%20to%20a%20hostpool%20but%20I%20can't%20connect%20to%20it.%3C%2FP%3E%0A%3CDIV%20class%3D%22modal-body%22%3E%3CSTRONG%3EWe%20couldn't%20connect%20to%20the%20gateway%20because%20of%20an%20error.%20If%20this%20keeps%20happening%2C%20ask%20your%20admin%20or%20tech%20support%20for%20help.%3C%2FSTRONG%3E%3C%2FDIV%3E%0A%3CP%3EAll%20prerequisites%20were%20done%2C%20sysprep%20ended%20without%20error%3B%3CBR%20%2F%3EHostpool%20creation%20completes%20without%20error%2C%20virtual%20machines%20join%20domain%20and%20register%20with%20hostpool%3B%20However%2C%20I%20can't%20connect%2C%20what%20I%20have%20seen%20is%20that%20all%20session%20hosts%20report%20as%20Unavailable%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESessions%20%3A%200%3CBR%20%2F%3ELastHeartBeat%20%3A%2001%2F05%2F2020%209%3A36%3A51%3CBR%20%2F%3EAgentVersion%20%3A%201.0.1932.4800%3CBR%20%2F%3EAssignedUser%20%3A%20%3CBR%20%2F%3EOsVersion%20%3A%2010.0.14393%3CBR%20%2F%3ESxSStackVersion%20%3A%20rdp-sxs200326004%3CBR%20%2F%3E%3CSTRONG%3EStatus%20%3A%20Unavailable%3C%2FSTRONG%3E%3CBR%20%2F%3EUpdateState%20%3A%20Succeeded%3CBR%20%2F%3ELastUpdateTime%20%3A%20%3CBR%20%2F%3EUpdateErrorMessage%20%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20I%20restart%20RDAgentBootLoader%2C%20the%20status%20shows%20as%20'available'%2C%20but%20in%20a%20few%20seconds%20(less%20than%2060)%20it%20returns%20to%20Unvailable%3B%3C%2FP%3E%0A%3CP%3EI%20can%20connect%20through%20RDP%20without%20problems%2C%20I%20have%20reviewed%20all%20RDS%20policies%2C%20I%20have%20reinstalled%20the%20agents%20several%20times%20(the%20last%20ones)%3B%20I%20tried%20to%20join%20Version1%20hostpool%20and%20Spring%202020%20Hostpools%2C%20but%20the%20result%20is%20the%20same%2C%20I%20am%20stuck.%3C%2FP%3E%0A%3CP%3EThe%20image%20is%20a%20Windows%2010%20ENT%20in%20Catalan%20with%20%26nbsp%3B30%20or%2040%20applications%20installed%3B%20I%20don't%20know%20if%20we%20has%20issues%20with%20localizations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOther%20virtual%20machines%20created%20from%20Marketplace%20images%26nbsp%3B%20in%20the%20same%20subnet%20work%20well.%20There%20are%20no%20NSG%2C%20firewall%20restrictions%20on%20WDS%20services%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20don't%20know%20how%20to%20continue%2C%20I%20open%20a%20support%20ticket%20in%20parallel.%3CBR%20%2F%3EAny%20ideas%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1353926%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1353926%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F644078%22%20target%3D%22_blank%22%3E%40Martinsd%3C%2FA%3E%20Thanks%20for%20opening%20the%20support%20ticket.%20That%20is%20the%20right%20approach%20as%20we%20would%20need%20to%20troubleshoot%20where%20the%20failures%20are%20coming%20from%20by%20looking%20at%20your%20logs.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1372951%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1372951%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F644078%22%20target%3D%22_blank%22%3E%40Martinsd%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20can%20relate%20to%20this.%20Created%20multible%20tenats%20via%20powershell.%20(Azure%20template%20does%20not%20work%20%3F).%3C%2FP%3E%3CP%3EEach%20VM%20regsitered%20in%20the%20host%20pool%20successfully.%20But%20each%20VM%20is%20unavailable.%20Tried%20different%20VM%C2%B4s%20and%20different%20Host%20Pools.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20Eventlog%20displays%20an%20error%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22Microsoft.RDInfra.Monitoring.AgentMonitoringService.AgentMonitoringServiceWorker%3CBR%20%2F%3EFail%20to%20set%20default%20dimensions%20Invalid%20Operation%3A%20Fail%20to%20set%20default%20dimensions%2C%20error%20code%20is%202147942487..%20Error%20code%20is%2080070057%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20I%20think%20the%20SxS%20Network%20Stack%20is%20broken%20%2C%20because%20i%C2%B4m%20not%20able%20to%20update%20it%20(corrupt%20ressources%3F).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20qwinsta%20is%20not%20very%20helpfull.%3C%2FP%3E%3CP%3ESESSIONNAME%20USERNAME%20ID%20STATE%20TYPE%3CBR%20%2F%3Eservices%200%20Disc%3CBR%20%2F%3Econsole%201%20Conn%3CBR%20%2F%3E%26gt%3Brdp-tcp%231%20appAdmin%203%20Active%3CBR%20%2F%3E31c5ce94259d4...%2065536%20Listen%3CBR%20%2F%3Erdp-tcp%2065537%20Listen%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecorrupt%20installation%20files%3F%20Anyone%20with%20a%20brilliant%20idea%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1622950%22%20slang%3D%22pt-BR%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1622950%22%20slang%3D%22pt-BR%22%3EGuys%2C%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Follow%20the%20step%20by%20step%20to%20resolve%20this%20situation%3A%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpt-br%2Fazure%2Fvirtual-desktop%2Ftroubleshoot-vm-configuration%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fpt-br%2Fazure%2Fvirtual-desktop%2Ftroubleshoot-vm-configuration%3C%2FA%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Error%3A%20The%20status%20filed%20in%20Get-AzWvdSessionHost%20cmdlet%20shows%20status%20as%20Unavailable%20%3CBR%20%2F%3E%20Get-AzWvdSessionHost%20cmdlet%20shows%20status%20as%20Unavailable.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Cause%3A%20The%20agent%20isn't%20able%20to%20update%20itself%20to%20a%20new%20version.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Fix%3A%20Follow%20these%20instructions%20to%20manually%20update%20the%20agent.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Download%20a%20new%20version%20of%20the%20agent%20on%20the%20session%20host%20VM.%20%3CBR%20%2F%3E%20Launch%20Task%20Manager%20and%2C%20in%20the%20Service%20Tab%2C%20stop%20the%20RDAgentBootLoader%20service.%20%3CBR%20%2F%3E%20Run%20the%20installer%20for%20the%20new%20version%20of%20the%20Windows%20Virtual%20Desktop%20Agent.%20%3CBR%20%2F%3E%20When%20prompted%20for%20the%20registration%20token%2C%20removethe%20entry%20INVALID_TOKEN%20and%20press%20next%20(a%20new%20token%20isn't%20required).%20%3CBR%20%2F%3E%20Complete%20the%20wizard%20installation.%20%3CBR%20%2F%3E%20Open%20Task%20Manager%20and%20start%20the%20RDAgentBootLoader%20service.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1855014%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1855014%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F361974%22%20target%3D%22_blank%22%3E%40BenjaminNiemann%3C%2FA%3E%26nbsp%3B%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20get%20around%20an%20solution%20to%20this.%20My%20problem%20is%20similar%2C%20I%20have%202%20tenant%20created%20and%20I%20have%202%20host%20pools%20.%20Everytime%20I%20build%20a%20VM%20it's%20resides%20as%20unavailable.%20The%20agents%20were%20reinstalled%20%2C%20but%20still%20the%20problem%20persists.%26nbsp%3B%20--%20Ayan%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2028837%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2028837%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F857934%22%20target%3D%22_blank%22%3E%40ayanbbhattacharya%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20manage%20to%20find%20a%20solution%20for%20this%3F%20Having%20the%20same%20problem.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137536%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137536%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F916979%22%20target%3D%22_blank%22%3E%40DrewPetrie%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F857934%22%20target%3D%22_blank%22%3E%40ayanbbhattacharya%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EAny%20luck%20with%20this%3F%20This%20just%20suddenly%20started%20happening%20to%20me%20today.%20My%20test%20user%20can%20connect%20to%20the%20host%20still%20despite%20it%20saying%20Unavailable.%20I%20can%20also%20login%20with%20the%20local%20admin%20account%20via%20Bastion.%20But%20I%20can't%20use%20MSIX%20App%20attach%20as%20it%20says%20none%20of%20my%20hosts%20have%20VMs.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138451%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138451%22%20slang%3D%22en-US%22%3E%3CP%3EUnfortunately%2C%20it%20was%20a%20year%20ago%20and%20I%20built%20a%20demo%20environment%20that%20no%20longer%20exists.%20Make%20sure%20that%20the%20VM%20is%20joined%20in%20the%20domain.%20I%20had%20password%20issues%20here.%20You%20need%20two%20passwords%20for%20Broker%20and%20AD.%20Make%20sure%20all%20prerequisites%20are%20installed.%20Microsoft%20has%20also%20reworked%20the%20management%20portal.%20You%20can%20now%20manage%20wvd%20in%20the%20Azure%20portal%20for%20a%20longer%20time.%20The%20Powershell%20patchwork%20is%20no%20longer%20necessary.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139478%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139478%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F361974%22%20target%3D%22_blank%22%3E%40BenjaminNiemann%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHa%20yeah...%20little%20aged.%3C%2FP%3E%3CP%3EOurs%20was%20fine%20and%20working%2C%20showing%20available%20and%20then%20yesterday%20both%20were%20unavailable%2C%20but%20we%20can%20connect%20fine.%20I've%20uninstalled%20and%20reinstalled%20the%20agent%2C%20bootloader%2C%20and%20did%20a%20new%20reg%20key%2C%20and%20entered%20that%20when%20I%20reinstalled%20the%20wvd-agent.%20What%20I%20don't%20get%20is%20the%20link%20to%20download%20the%20agent%20appears%20to%20be%20substantially%20older%20than%20the%20agent%20listed%20in%20the%20Azure%20Portal%2C%20and%20it%20never%20seems%20to%20reflect%20the%20Agent%20version%20after%20uninstalling%2Freinstalling.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2280849%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20troubleshoot%20Unavailable%20Status%20of%20SessionHost%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2280849%22%20slang%3D%22en-US%22%3EWe%20have%20the%20same%20problem%2C%20keep%20getting%20Update%20Failed%20in%20Azure%20Portal%20on%20one%20VM.%20I%20manually%20updated%20the%20Agent%203%20days%20ago%2C%20now%20it%20gives%20the%20same%20error%20again.%20Two%20other%20VM's%20are%20updating%20correctly.%3C%2FLINGO-BODY%3E
Microsoft

I am trying to make a Customer's custom image work. I can add it to a hostpool but I can't connect to it.

All prerequisites were done, sysprep ended without error;
Hostpool creation completes without error, virtual machines join domain and register with hostpool; However, I can't connect, what I have seen is that all session hosts report as Unavailable;

 

Sessions : 0
LastHeartBeat : 01/05/2020 9:36:51
AgentVersion : 1.0.1932.4800
AssignedUser :
OsVersion : 10.0.14393
SxSStackVersion : rdp-sxs200326004
Status : Unavailable
UpdateState : Succeeded
LastUpdateTime :
UpdateErrorMessage :

 

 

When I restart RDAgentBootLoader, the status shows as 'available', but in a few seconds (less than 60) it returns to Unvailable;

I can connect through RDP without problems, I have reviewed all RDS policies, I have reinstalled the agents several times (the last ones); I tried to join Version1 hostpool and Spring 2020 Hostpools, but the result is the same, I am stuck.

The image is a Windows 10 ENT in Catalan with  30 or 40 applications installed; I don't know if we has issues with localizations.

 

Other virtual machines created from Marketplace images  in the same subnet work well. There are no NSG, firewall restrictions on WDS services;

 

I don't know how to continue, I open a support ticket in parallel.
Any ideas?

 

9 Replies
best response confirmed by Eva Seydl (Microsoft)
Solution

@Martinsd Thanks for opening the support ticket. That is the right approach as we would need to troubleshoot where the failures are coming from by looking at your logs.

@Martinsd 

Hi,

 

i can relate to this. Created multible tenats via powershell. (Azure template does not work ?).

Each VM regsitered in the host pool successfully. But each VM is unavailable. Tried different VM´s and different Host Pools. 

 

- Eventlog displays an error like this:

 

"Microsoft.RDInfra.Monitoring.AgentMonitoringService.AgentMonitoringServiceWorker
Fail to set default dimensions Invalid Operation: Fail to set default dimensions, error code is 2147942487.. Error code is 80070057"

 

- I think the SxS Network Stack is broken , because i´m not able to update it (corrupt ressources?).

 

- qwinsta is not very helpfull.

SESSIONNAME USERNAME ID STATE TYPE
services 0 Disc
console 1 Conn
>rdp-tcp#1 appAdmin 3 Active
31c5ce94259d4... 65536 Listen
rdp-tcp 65537 Listen

 

corrupt installation files? Anyone with a brilliant idea?

Guys,

Follow the step by step to resolve this situation:

https://docs.microsoft.com/pt-br/azure/virtual-desktop/troubleshoot-vm-configuration

Error: The status filed in Get-AzWvdSessionHost cmdlet shows status as Unavailable
Get-AzWvdSessionHost cmdlet shows status as Unavailable.

Cause: The agent isn't able to update itself to a new version.

Fix: Follow these instructions to manually update the agent.

Download a new version of the agent on the session host VM.
Launch Task Manager and, in the Service Tab, stop the RDAgentBootLoader service.
Run the installer for the new version of the Windows Virtual Desktop Agent.
When prompted for the registration token, remove the entry INVALID_TOKEN and press next (a new token isn't required).
Complete the installation Wizard.
Open Task Manager and start the RDAgentBootLoader service.

@BenjaminNiemann :

 

Did you get around an solution to this. My problem is similar, I have 2 tenant created and I have 2 host pools . Everytime I build a VM it's resides as unavailable. The agents were reinstalled , but still the problem persists.  -- Ayan

 

@ayanbbhattacharya 

 

Did you manage to find a solution for this? Having the same problem.

@DrewPetrie 

@ayanbbhattacharya 

 

Any luck with this? This just suddenly started happening to me today. My test user can connect to the host still despite it saying Unavailable. I can also login with the local admin account via Bastion. But I can't use MSIX App attach as it says none of my hosts have VMs.

Unfortunately, it was a year ago and I built a demo environment that no longer exists. Make sure that the VM is joined in the domain. I had password issues here. You need two passwords for Broker and AD. Make sure all prerequisites are installed. Microsoft has also reworked the management portal. You can now manage wvd in the Azure portal for a longer time. The Powershell patchwork is no longer necessary.

@BenjaminNiemann 

 

Ha yeah... little aged.

Ours was fine and working, showing available and then yesterday both were unavailable, but we can connect fine. I've uninstalled and reinstalled the agent, bootloader, and did a new reg key, and entered that when I reinstalled the wvd-agent. What I don't get is the link to download the agent appears to be substantially older than the agent listed in the Azure Portal, and it never seems to reflect the Agent version after uninstalling/reinstalling.

We have the same problem, keep getting Update Failed in Azure Portal on one VM. I manually updated the Agent 3 days ago, now it gives the same error again. Two other VM's are updating correctly.