Azure Pipeline – Deploying WVD Session Hosts to Availability Zones vs Availability Sets

Summary:

The official Windows Virtual Desktop ARM template provides a way to add Session hosts into Availability Sets for HA. However is Availability Sets just enough for a large WVD deployment? it just might not be the case. That is why I modified the ARM template such that the Session Hosts so created to join the Host Pools will be created in different Availability Zones instead of just Availability Sets. It offers better redundancy for the user sessions in the event of a zone failure within the Azure region.


Pointers to remember:

  • Each Azure region is divided into 3 Zones
  • These Zones provide resiliency for data, compute and networking for resources that you would deploy
  • Within Each Zone there are clusters of physical hardware

The following diagrams provide details on how the Azure regions, Zones, Clusters are laid out.
Figure1, shows how Azure regions are structured.
Figure2, illustrates difference between deploying machines in different availability zones vs in Availability Sets

Figure1: Azure Region
Figure 2: Availability Set vs Availability Zones

Strategies: Availability Sets vs Availability Zones

Availability SetAvailability Zone
Deploys VMs across different Physical nodes within a Zone Deploys VMs across different Clusters within a given Azure region
If the Zone within the region goes down there is no redundancy for the deployed serviceIf a single zone goes down within the given azure region, the service is still active.
If a Cluster within a zone goes down redundancy is offeredIf a Cluster within a zone goes down redundancy is offered
Suitable for Small – Medium deploymentsSuitable for large deployments

Hence, I went ahead and wrote this template that will help deploy session hosts into availability zones and add them to hostpools using the hostpool token generated referenced in my previous blog.

What does this Template + Pipeline do?

  • Generates a HostPool token and add it to Azure Secrets
  • Grabs the Admin Domain join password and HostPool token from Azure secrets
  • Reads the data in parameters file defined by admins, and deploys the Session Hosts in 3 availability zones instead of availability sets
  • Each Session Host is deployed to a different availability zone in incremental manner between (1,2,3 – zones)

Pre-Requisites:

  • Azure Devops Project setup with Service Connections
  • Some knowledge on writing Azure Pipelines
  • An Azure Key Vault with 2 secrets: Domainjoinaccountpassword, Hostpoolprodtoken
  • A Hostpool for Session Hosts to join
  • Check for support of availability zone based VM deployment in your Azure region
  • Update the Parameters file with required information pertaining to your Azure environment
  • Update the variables on pipeline as guided

Repository Link: GitHub-Repo

Other references:
If you are unsure how to build a pipeline? This Link should help

Leave a Reply