Let’s face it, you deserve a little break on those pricey Azure bills

Scroll

Azure Windows Virtual Desktop (WVD) is becoming more and more popular as teleworking becomes the new normal. However, maintaining an Azure WVD environment can be costly.  As a cloud consultant, we are always looking for ways to minimize the cost of operating systems in the cloud.  Microsoft understands these cost concerns coming from their customers and is continuously releasing solutions to help ease the monthly Azure bills.

In this blog, we are going to share a method on how to significantly reduce the cost and boost the performance of a WVD environment.  This method involves implementing your WVD session hosts in a diskless fashion, with the help of Azure Ephemeral OS disks.  I will refer to these VMs as “diskless VMs” in this blog because in the Azure portal you will not see a disk associated with Ephemeral OS disks.

Everything in the world has pros and cons and so does utilizing an Ephemeral OS disk.  So let’s take a deeper look into the pros and cons of implementing an Ephemeral OS disk for your WVD environment.

Pros:

  • FREE to use, no storage costs incurred
  • Low latency, like temporary disks
  • Supported by Shared Image Gallery
  • Ability to fast reset or reimage session host VMs and scale set instances to the original boot state
  • Can be used with both marketplace and custom images
  • Supports both WVD and WVD (classic)

Cons:

  • Limited VM sizes supported: VM sizes that support Premium storage such as DSv1, DSv2, DSv3, Esv3, Fs, FsV2, GS, LSv2, M (cache size must be bigger than the marketplace or custom image)
  • VMs cannot be deallocated (stopped from the portal)
  • Any VM that is built on an Ephemeral OS disk will be reset if a resize happens

Note:  Even though Ephemeral OS disks support both WVD and WVD (classic), for the purposes of this article, we will only be focusing on implementation with WVD (Spring 2020 version with ARM integration).

Now, you may be wondering, can I use Ephemeral OS disks for all of the session hosts in my WVD pool?  Well, you can, but to minimize the cost, you may not want to.  As we all know, Azure charges for compute and storage costs on all Azure VMs, and because diskless VMs cannot be stopped or deallocated, you will have to pay the compute costs which, in most cases, will be more than the cost of a managed disk.

To give you a perspective of compute costs vs disk costs, here is a calculation of a DS3_v2 VM with a 128 GB premium SSD, using the Azure Pricing Calculator.

Compute cost: $170.38/month

Disk cost: $17.92/month

From a cost perspective, it’s pretty clear that the pros outweigh the cons of using an Ephemeral OS disk for the following scenarios:

  1. The number of hosts in a pool is static; meaning it isn’t necessary to scale up or down.
  2. You have a few hosts in a host pool that are running all the time to support a minimum number of users; the rest of the session hosts will be deallocated and started automatically when necessary using a scaling script.

For session hosts that run 24/7/365, it makes more sense to run them with Ephemeral OS disks to completely cut out the cost of disks and boost the performance.

Now let’s walk through the process of automating this task!

Permissions needed:

  • Azure Active Directory Global Administrator to register WVD to Azure AD
  • Active Directory Administrator account on your AD DS servers to join session hosts to your domain and run administrative tasks as needed

Note:  These accounts can be different or the same account.

 

Infrastructure (must already be built prior to creating session hosts):

  • Create WVD host pool
  • Create Active Directory domain for the new VM(s) to join
  • Create a central file share for WVD profiles
  • Generate a host pool registration token

Step 1:  Download the publicly available ARM template here, thanks to Dean Cefola!

Step 2:  Scroll down and look for “New Ephemeral Host” and click “Deploy to Azure.”

Step 3:  Authenticate to the Azure Tenant where the WVD host pool was built and you will then be prompted to input the information needed to create an ephemeral session host.

Under Parameters:

Prefix:  This is the starting portion of the session host’s name followed by the numbers automatically created by the script.  (Ex: wvd-01, wvd-02)

Admin Username:  The domain admin credentials used to join session hosts to the domain

Instance:  Number of session hosts you want to create

Operating System:  Client (20h1-evd-o365pp), Server (2019-Datacenter-smalldisk)

VM Size:  Small (Standard_DS3_v2), Medium (Standard_F16s), Large (Standard_DS14_v2)

Profile Path:  Path of user profiles for FSLogix

Registration Token:  Find this through the following path: WVD blade > Host pools > Overview > Registration Key

Click “Generate new key”

Step 4:  Click “Create”

Great!  You’ve just saved yourself a great amount of money on your monthly Azure bill!  I hope you’ve gained some valuable Azure knowledge from this blog.  Now you know the benefits of using Azure Ephemeral OS disks and how to reduce costs in your organization when using Azure WVD.

Now it’s your turn!

If you want to learn more about Azure WVD or Azure services in general, visit Azure Academy where I got this idea from!

Vu Hoang

Author

Vu is a Systems Engineer here at Cloudforce and has an ever-growing resume of experience in IT. Since completing his bachelor’s degree in Information Systems and Organization Management from George Mason University, Vu has acquired multiple renowned certifications including the Cisco Certified Network Associate (CCNA) and the Microsoft Certified: Azure Solutions Architect Expert.

Scroll