Deploy an Azure Dedicated host for Azure Virtual desktop session hosts

Hi There,

Welcome to another blog post about Azure Virtual Desktop. In this post I’m going to talk about Azure Dedicated hosts. I’ll discuss what they are and why you can use them. I’ll also deploy a dedicated host and do this with Terraform. Let’s get started.

What is an Azure dedicated host?

An Azure dedicated host is a service that provides physical servers to host virtual machines. There are a lot of sku’s available. Using a dedicated host ensures that you don’t have to share the hardware with another company. For companies who are looking to increase the security of their Azure environment this service is a very good idea. The use case for this blog post is a dedicated host for AVD session hosts.

Since a dedicated host requires a lot of vCPU’s, you will need to do a quota request in the Azure portal. I opened a quota request but it took a long time before I got a vm size that was available in West Europe. Eventually I got 120 vCPU’s for the DDSv4.

For more information about dedicated hosts see Overview of Azure Dedicated Hosts for virtual machines – Azure Virtual Machines | Microsoft Learn.

Lets have a look at what resources we need. The first one is a dedicated host group. This group will contain your dedicated hosts. Off course you can create multiple host groups for example to split prd and dev resources.

resource "azurerm_dedicated_host_group" "dhg" {
  provider            = azurerm.avd
  name                        = "dhg-${var.spoke}-${var.prefix}-${var.solution}-01"
  resource_group_name         =
  location                    = data.azurerm_resource_group.rg-avd-backend.location
  platform_fault_domain_count = 2
  automatic_placement_enabled = true
    tags = {
    "Location"    = "We"
    "Costcenter"  = "IT"
    "Purpose"     = "AVD Shared Dedicated Host Group"
    "Environment" = "Prd"

Now that we have the host group we can deploy our dedicated host. For this host the vm size is DDSv4-Type2 that requires 119 vcpu’s. I also put auto replace on failure on true.

resource "azurerm_dedicated_host" "dh" {
  provider            = azurerm.avd
  name                    = "dh-${var.spoke}-${var.prefix}-${var.solution}-01"
  location                = data.azurerm_resource_group.rg-avd-backend.location
  dedicated_host_group_id =
  sku_name                = "DDSv4-Type2"
  platform_fault_domain   = 1
  auto_replace_on_failure = true
  license_type = "None"
    tags = {
    "Location"    = "We"
    "Costcenter"  = "IT"
    "Purpose"     = "AVD Shared Dedicated Host"
    "Environment" = "Prd"

When the host is deployed you can very easy check what virtual machines sizes are available for you to deploy on this host in the overview.

Very important when you deploy a virtual machine that you go to the advanced tab. Here you need to specify the host group. You can choose to have automatic assignment or manual. This assignment type is important if you have multiple dedicated hosts in the host group. 

If you don’t do the above step Azure will tell you that you don’t have enough vCPU’s to deploy the vm.

You can also check what virtual machines are running on the hosts in the instance menu.

There you go, we now have a virtual machine running on this dedicated that we can use as an AVD session host.

Feel free to reach out if you have any questions about this topic. See you next time.

1 thought on “Deploy an Azure Dedicated host for Azure Virtual desktop session hosts

Leave a Reply

Your email address will not be published. Required fields are marked *