Create virtual machines for Remote Desktop
Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016
Use the following steps to create the virtual machines in the tenant's environment that will be used to run the Windows Server 2016 roles, services, and features required for a desktop hosting deployment.
For this example of a basic deployment, the minimum of 3 virtual machines will be created. One virtual machine will host the Remote Desktop (RD) Connection Broker and License Server role services and a file share for the deployment. A second virtual machine will host the RD Gateway and Web Access role services. A third virtual machine host the RD Session Host role service. For very small deployments, you can reduce VM costs by using AAD App Proxy to eliminate all public endpoints from the deployment and combining all the role services onto a single VM. For larger deployments, you can install the various role services on individual virtual machines to allow better scaling.
This section outlines the steps necessary to deploy virtual machines for each role based on Windows Server images in the Microsoft Azure Marketplace. If you need to create virtual machines from a custom image, which requires PowerShell, check out Create a Windows VM with Resource Manager and PowerShell. Then return here to attach Azure data disks for the file share and enter an external URL for your deployment.
Create Windows virtual machines to host the RD Connection Broker, RD License Server, and File server.
For our purpose, we used the following naming conventions:
RD Connection Broker, License Server, and File Server:
- VM: Contoso-Cb1
- Availability set: CbAvSet
RD Web Access and RD Gateway Server:
- VM: Contoso-WebGw1
- Availability set: WebGwAvSet
RD Session Host:
- VM: Contoso-Sh1
- Availability set: ShAvSet
Each VM uses the same resource group.
Create and attach an Azure data disk for the user profile disk (UPD) share:
- In the Azure portal click Browse > Resource groups, click the resource group for the deployment, and then click the VM created for the RD Connection Broker (for example, Contoso-Cb1).
- Click Settings > Disks > Attach new.
- Accept the defaults for name and type.
- Enter a size (in GB) that is large enough to hold network shares for the tenant's environment, including user profile disks and certificates. You can approximate 5 GB per user you plan to have
- Accept the defaults for location and host caching, and then click OK.
Create an external load balancer to access the deployment externally:
- In the Azure portal click Browse > Load balancers, and then click Add.
- Enter a Name, select Public as the Type of load balancer, and select the appropriate Subscription, Resource Group, and Location.
- Select Choose a public IP address, Create new, enter a name, and select Ok.
- Select Create to create the load balancer.
Configure the external load balancer for your deployment
- In the Azure portal click Browse > Resource groups, click the resource group for the deployment, and then click the load balancer you created for the deployment.
- Add a backend pool for the load balancer to send traffic to:
- Select Backend pool and Add.
- Enter a Name and select + Add a virtual machine.
- Select Availability set and WebGwAvSet.
- Select Virtual machines, Contoso-WebGw1, Select, OK, and OK.
- Add a probe so the load balancer knows what machines are active:
- Select Probes and Add.
- Enter a Name (like HTTPS), select TCP, enter Port 443, and select OK.
- Enter load balancing rules to balance the incoming traffic:
- Select Load balancing rules and Add
- Enter a Name (like HTTPS), select TCP, and 443 for both the Port and the Backend port.
- For a Windows 10 and Windows Server 2016 Deployment, leave Session persistence as None, otherwise select Client IP.
- Select OK to accept the HTTPS rule.
- Create a new rule by selecting Add.
- Enter a Name (like UDP), select UDP, and 3391 for both the port and the **Backend port.
- For a Windows 10 and Windows Server 2016 deployment, leave Session persistence as None, otherwise select Client IP.
- Select OK to accept the UDP rule.
- Enter an inbound NAT rule to directly connect to Contoso-WebGw1
- Select Inbound NAT rules and Add.
- Enter a Name (like RDP-Contoso-WebGw1), select Customm for the service, TCP for the protocol, and enter 14000 for the Port.
- Select Choose a virtual machine and Contoso-WebGw1.
- Select Custom for the port mapping, enter 3389 for the Target port, and select OK.
Enter an external URL/DNS name for your deployment to access it externally:
- In the Azure portal, click Browse > Resource groups, click the resource group for the deployment, and then click the public IP address you created for RD Web Access and RD Gateway.
- Click Configuration, enter a DNS name label (like contoso), and then click Save. This DNS name label (contoso.westus.cloudapp.azure.com) is the DNS name that you'll use to connect to your RD Web Access and RD Gateway server.