Forum Discussion

WaySlow's avatar
WaySlow
Copper Contributor
Feb 18, 2025

VMs not being added to host pool or AD

I've been provisioning session host monthly for the last year or so, but this month it started to fail.  If I use the portal to add session host to a host pool, the VMs get created but most do not get added to the host pool and/or AD.  From what I can tell the RDagent and RDagent bootloader are not being installed.  If I manually install the two, it gets added to the host pool and I can manually add them to AD.  If I create 40 new hosts, about 5 get added to the host pool without joining AD. The remaining 35 don't get the RD agents installed at all.  This is new to me, so I'm struggling with how to troubleshoot.  I don't know what changed from last month to this month.  I've tried using the older golden image and I get the same result, so it doesn't appear to be anything that was installed recently (which would've been Windows patches).  I've tried in three different regions; West Europe, Southeast Asia, US East.  The inconsistency with the issue is throwing me off.  Anyone have any ideas or suggestions on where to look?  

  • Great, but I still recommend you do what I indicated in the other thread, since this also solves the on-prem part. I have performed tests with that environment and the registration and availability of the hostpool has been normal and I have not had any errors like the ones you mention. If you decide to try it, please confirm it so that other users can also solve it.

    Regards!!!

  • WaySlow's avatar
    WaySlow
    Copper Contributor

    Thanks for the tips.  The session hosts are joining to our on-prem Active Directory.  I did some more poking around and found that after 3-4 hours or so the RDagent and the RDagentbootloader eventually get installed.  The error message for this is: "message": "Provisioning of VM extension Microsoft.PowerShell.DSC has timed out. Extension provisioning has taken too long to complete. The extension did not report a message.

    It takes about 2 hours for the Microsoft.PowerShell.DSC to have the error message and timeout, then after another 2-3 hours, it eventually completes successfully.  I guess it continues to try. My colleague mentioned that DSC is like that, it'll keep trying. 

    The second part of it not joining the domain, I found that the "joindomain" extension is being applied to the VM's.  In the "Extensions + applications" section of the VM's properties, the "joindomain" is not listed at all. So it seems like its not even attempting it.  I checked on a couple of the new VM's and there isn't any log in C:\WindowsAzure\Logs\Plugins.
     

  • Hi,

    I've had similar issues when trying to join hosts to Entra ID. However, when I tried to do it with Entra ID's domain services, it worked fine. What type of domain will the VMs be joined to? It's possible that during deployment, everything looks fine and indicates success, but there may still be issues. I'll investigate and test.

  • Take this:

     

    • Check VM Image: Ensure that the VM image you're using is correctly configured and doesn't have any issues. Since you've tried using an older golden image, it might be worth creating a new image from scratch to rule out any image-related problems.
    • Verify Network Connectivity: Ensure that the VMs have the necessary network connectivity to reach the Azure Virtual Desktop service and the domain controllers. Check for any network issues or firewall rules that might be blocking communication.
    • Review Logs: Check the logs for the RDagent and RDagent bootloader installation. Look for any error messages or warnings that might provide more insight into why the agents are not being installed.
    • Check Azure AD Join Configuration: Verify that the Azure AD join configuration is correct and that the VMs have the necessary permissions to join the domain. Ensure that the domain join account has the required permissions.
    • Update VM Extensions: Ensure that the VM extensions, such as the Azure Virtual Desktop agent and bootloader, are up to date. You can manually update these extensions if needed.
    • Use Custom Script Extension: Consider using a custom script extension to manually install the RDagent and RDagent bootloader during the VM provisioning process. This can help ensure that the agents are installed correctly.
    • Check for Recent Changes: Review any recent changes in your environment, such as updates to policies, configurations, or permissions, that might be affecting the VM provisioning process.

Resources