Windows Virtual Desktop running on Ephemeral OS Disks
Introduction
Last week, Microsoft has made Ephemeral OS Disks General Available in all Azure regions (see the blogpost)!
Some information about Ephemeral Disks (from the Microsoft Docs):
Ephemeral OS disks are created on the local virtual machine (VM) storage and not saved to the remote Azure Storage. Ephemeral OS disks work well for stateless workloads, where applications are tolerant of individual VM failures, but are more affected by VM deployment time or reimaging the individual VM instances. With Ephemeral OS disk, you get lower read/write latency to the OS disk and faster VM reimage.
The key features of ephemeral disks are:
- They can be used with both Marketplace and custom images.
- Ability to fast reset or reimage VMs and scale set instances to the original boot state.
- Lower latency, similar to a temporary disk.
- Ephemeral OS disks are free, you incur no storage cost for OS disk.
- They are available in all Azure regions.
The big question is: Can we use this for Windows Virtual Desktop?
The answer is not that simple, but let’s have a look…
Can you run Windows Virtual Desktop on Ephemeral OS Disks?
The simple answer is YES, you can! But (there is always a but) … It really depends on the deployment of your software/environment.
As you can read in the blogpost, the OS Disk is not written to Azure Storage, which makes the OS Disk stateless. If your application is writing data to the OS Disk, this could be an issue.
Nevertheless, if you use FSLogix for your profile management (which is highly recommended!), and you have a good Master Image with your software pre-installed, then you should be able to use Ephemeral OS Disks!
The things you have to consider:
- You cannot stop your VM to save costs on Compute. (restart is supported)
- The VM size (cache size) determines the Ephemeral Disk size. For Example: a Standard_DS3_v2 gives you the option to create an OS disk up until 172GB due to the 172 Gib cache size A Standard_D4s_v3 will be an OS Disk up to 100GB, which is not enough for a Win10 Enterprise for WVD from the Azure Marketplace!
- Resizing the Ephemeral OS disk is not supported, only during VM creation.
- Resizing your VM size means that the data on the OS disk is deleted and the OS is re-provisioned!
How to deploy WVD with Ephemeral OS Disk?
I did a little fork on the GitHub templates from Microsoft from the Github Repo, because of 2 reasons:
- You need to change the osDisk property in the ARM template
- I did not want to change the DSC configuration, only the linked template location.
You can find the changed base ARM Template here: https://cloudarchitectstaticsite.blob.core.windows.net/wvd-ephemeral-template/mainTemplate-EphemeralOsDisk-CloudArchitect.json
And the Linked Template here: https://cloudarchitectstaticsite.blob.core.windows.net/wvd-ephemeral-template/managedDisks-galleryvm.json
The template is not changed, except the URI to the linked template.
Note:
Only the Linked Template using Managed Disks and the Azure Marketplace Gallery is available.
If you want to use a Custom Image, or Unmanaged Disk, then you will need to modify the linked templates yourself from the GitHub page.
How fast is it?
I did some basic tests on it, but they speak for themselves 😃
- Deploy VM
- Premium SSD: average: 7min 30sec
- Ephemeral disks: average: 3min 10sec
- Join AD
- Premium SSD: average: 2min 40sec
- Ephemeral disks: average: 1min 40sec
- WVD DSC
- Premium SSD: average: 10min
- Ephemeral disks: average: 9min
And then a small stress test using ParkDale, again, no explanation needed 😉
Conclusion
Basically, you can run Windows Virtual Desktop on Ephemeral OS Disks, but you will need to have a good Master Image available, or a good deployment aftercare script.
But if you do, you will have a very fast running Sessionhost, with no OS Disk costs!