Build Host Pool Demo
Start course

In this course, you will learn about host pools and session hosts in Azure Virtual Desktop.

Learning Objectives

  • Deploy and configure host pools and session hosts
  • Set up autoscaling for Azure Virtual Desktop
  • Understand Azure Virtual Desktop limits
  • Set high availability options for Azure Virtual Desktop
  • Use Azure Virtual Desktop session host join options
  • Automate Azure Virtual Desktop

Intended Audience

This course is for anyone planning to take the Azure Virtual Desktop Specialty exam and anyone interested in learning how to deploy an AVD environment.


To get the most out of this course, you should have an administrator-level understanding of Azure Virtual Machines, Azure high availability solutions, Windows management join options, ARM templates, PowerShell, and the Azure CLI.


Let's build our first host pool. In the Azure portal, click the plus at the top to create a new resource. Type host pool in the search box, then you'll want to click on the second option for host pool. Now click the 'Create' button, select the desired subscription, and then click here to create a new resource group. You'll need to give the resource group a name and the name should follow your company's standard naming convention. 

For me, that uses the name of the project-resource type. So, in my environment, I'll use FirstPool-RG. Now the host pool name should also match your naming convention. So, for me this will be FirstPool-HP. Now we need a location, and this is where the metadata of the host pool will be stored. The metadata is extra information about your Azure virtual desktop resources that are needed to maintain your connections, users, and application associations, and that's all stored in a Cosmos database per geography. As of this recording, there are five metadata locations. Canada, Europe, Japan, United Kingdom, and the United States. Since my users are located near the East US, that's where I'll be deploying. 

Next, we have the validation environment setting. This feature controls two things: Access to some of the preview features, and how AVD session host agent updates are rolled out. It is recommended to have a validation host pool for each production pool if they're built from unique images, or one validation pool if they're all built from the same image. This will allow you to test the AVD agent update's potential impact on your pools in advance of production. It is very rare to see an issue, but if you do, open a support ticket as quickly as possible so the issue can be resolved before updates are rolled out to production pools.

Functionally, this will not impact your pool, so I'll leave it on 'No' in this case. And let's look at the last choice we need to make on this page concerning our host pool type. We have two options, personal and pooled. If you select personal, you'll now have to decide how your users will be assigned to their session host virtual machines, automatically or directly. The only reason I find that customers want to go against the general best practice that all VMs in the host pool are the same, is because if they're built from different sizes or have special applications or configurations. If so, you'll want to choose the direct method. And don't get me wrong, it is a viable option, just not an optimal one. The other option is to choose pooled. 

Here, you have to choose the load balancer algorithm of either breadth-first or depth-first. Breadth-first is where we will have users logging in across all of the session hosts in the pool evenly. This is most advantageous during those morning logon storms, so each user can log in as fast as possible. Depth-first is where you'll want to have the maximum number of users log on to the first VM before anyone is allowed to log on to a second. This is usually best after the logon storm during the normal business operations, so that you can have the fewest number of session hosts running as possible, which helps to keep costs down. But since you have to pick one method, which one is right? I'm going to say both and neither, which might be confusing right now but it will become a lot clearer as we configure our host pools in our next section. 

For now, I'll pick breadth-first and now we need to set the max session limit, and this controls how many users can log on to the VM at the same time. I'm going to set this to 20, and now click 'Next'. This is where we could provision our session host VMs, but we'll skip over this for now. Click 'Next', here's where you could provision a workspace, but that's another course, so we'll skip that as well. Here on the advanced tab, you can set up your monitoring, and I do definitely recommended this. You check the box here at the top and then you select the preferred logging method, which is going to depend on your monitoring solution. To leverage the native AVD insights monitoring tool, you'll need to select a log analytics workspace. I'm actually going to remove these options for now so I can show you how to do this on an existing host pool in just a moment. 

So, I'll uncheck the box here and click 'Next'. Here we can add another form of metadata with Azure tags. These are key and value pairs that tell you not only a lot about your resources, but they can be leveraged for automation and management as well. The standard tags that I use are for application, cost center, environment, owner, and support contact. Add the tags that are part of your governance plan and then click the 'Review and Create' button. Here we have a summary of everything that you selected to build, but before you click 'Deploy', click over here on download a template for automation. This is a JSON arm template that will be used to provision your host pool. And you can click the 'Download' button at the top to save this for our future use or customization. We'll talk more about armed templates during our automation section later in this course. For now, click the 'X' in the top corner and then click the 'Create' button at the bottom.


About the Author

Dean Cefola is a Principal Azure Engineer at Microsoft and has worked in the IT industry for over 20 years. Dean has been supporting Azure Virtual Desktop from the beginning and is the Microsoft FastTrack Global Leader for AVD.