Publishing Microsoft Pool VDI on UAG 2010 Portal

Posted by Ahmed Nabil In | 8 comments»
Virtual Desktop Infrastructure is becoming a hot issue nowadays with many companies adopting this technology due to its flexibility, machines density, mobility, security, manageability and overall total cost of ownership. VDI can be either dedicated/Personal desktop assigned for specific user or pool of desktops available for all users (First come is first served); both flavors have their own benefits/drawbacks depending on your exact need and infrastructure. Microsoft allows you to publish the VDI solution on its UAG portal/Trunk however it’s not straight forward and not well explained/documented.

For an introduction to VDI components, please check the following link.

To publish your VDI Pool on UAG for External users, you need to do the following:

1.    Ensure the UAG server is fully updated and patched with latest UAG Service Pack and Rollups.

2.      From the UAG 2010 Server Copy the file ...\Microsoft Forefront Unified Access Gateway\common\conf\rd-template.txt to ...\Microsoft Forefront Unified Access Gateway\common\conf\Custom Update\rd-template.txt. This is needed to modify some RDP Parameters to make the VDI redirection work. For more information please check the attached link

For more information on the UAG Custom Update mechanism and a detailed example please check the following articles

3.    Add the below two lines to rd-template.txt and save it in Custom Update folder (mentioned in previous steps).

use redirection server name:i:1


use redirection server name => Specifies whether a redirection server is allowed.

loadbalanceinfo => Contains the load balancing cookie used to choose the best server for the client computer. If you know your VDI Pool ID then you can change this command to be loadbalanceinfo:s:tsv://vmresource.1.PoolID

To get your VDI Pool ID, you need to connect to your Internal Connection Broker server then open the Server Manager – Roles – Remote Desktop Services – Remote Desktop Connection Manager – RD Virtualization Host servers– Pooled Virtual Desktops and then you can see all the properties including the Pool ID.

4.      From your UAG Portal/Trunk add new Application – Terminal Services– Remote Desktop (Predefined).

VDI Remote Desktop Predefined publishing rule

5.    In the Server Settings add the VDI Redirector session Host IP or Full Address and in the below space make sure to add all IP addresses or names of any system in your VDI solution (Session Broker, Gateway, Redirector, Session Host Virtualization and Virtual machines subnet). This is very critical step for the publishing rule to work fine. The Easiest thing is to add the full IP range for your VDI subnet. Then Activate your UAG.

UAG rule VDI Server settings

Note: If you already created the VDI publishing application and it wasn’t working, make sure to delete this application, apply all previous changes and then add the application again, the Custom update changes won’t work for existing published applications.



city Says:

nice posting.. thanks for sharing.

Cory Brethanny Says:

Thanks for the help. My pool repair phoenix company friends appreciates this so much. Keep blogging! Have a nice day.

JeffSH Says:

Thanks for the posting, but I haven't been able to get this to work in my environment.

If I have an HTTPS trunk named "Training" my rd-template.txt file should be Training1rd-template.txt... Correct?

Also it seems that when I follow the settings, it actually tries to remote desktop to the VDI host itself instead of one of the VMs

JeffSH Says:

Ok, I made the changed to just the rd-template.txt file, and I removed the VDI host's IP from the list on the Configure Server Settings which seems to carry me further.

Now, I'm getting an error:

Remote Desktop can't connect to the remote computer "" for one of these reasons:
1) Your user account is not listed in the RD Gateway's permission list
2) You might have specified the remote computer in NetBIOS format (for example, computer1), but the RD Gateway is expecting an FQDN or IP address format (for example, or
Contact your network administrator for assistance.

Any thoughts?

JeffSH Says:

Ok, I made it a little further still...
I found the error I mentioned above in a Microsoft support article:

I made the necessary registry changes, and now I have yet another error:

Remote Desktop can't find the computer "". This might mean that "" does not belong to the specified network. Verify the computer name and domain that you are trying to connect to.

In the process of trying to connect to the RD app through UAG, I see where it says it's "preparing the virtual machine," but when I get to "Initiating the remote desktop connection" it eventually times out with this error.

JeffSH Says:

Well, I ended up working it out on my own!

The final piece was a DNS issue where one of the NICs on my UAG server had pulled a bogus DNS entry. Once I corrected the DNS issues, the problem still remained.
So, I deleted the my RD app from my trunk and recreated it, and it worked!!!

Thanks anyway. Perhaps someone will find my notes helpful.

shubh Says:

Hi Ahmed,

We have followed these steps and this works perfectly for one VDI pool.

In our environment, we need to publish multiple VDI pools. As per my understanding, this would need multiple UAG trunks and we need to use "UAG Custom Update Mechanism" to pass different rd-template.txt parameters for backend pools. But this does not seem to be working.

We have placed two different files namely firsttrunk1rd-template.txt and secondtrunk1rd-template.txt in common/conf/customupdate/ folder. After that we have added, Remote Desktop(predefined) application on both trunks. but while trying to access, it does not redirect to backend pool and instead end up getting an error.

We have checked logs on Connection Broker server and seems like UAG is not passing on parameters from custom rd-template,txt file.

Please let me know if this is a supported publishing scenario. If yes, is there anything we are missing to make this work.


Amazing Quotes Says:

Very Nice And Interesting Post, thank you for sharing
Inspirational Quotes - Gym Quotes
Best Quotes - Success Quotes
Positive Life Quotes - Image Bank
Future Quotes - Excellence Quotes
كلام جميل - Keep Smiling Quotes

Post a Comment