Having problems installing Docker for Windows in your Azure Virtual Desktop? Here's probably why!

As I might have mentioned, I’m using a Macbook and I recently switched from using VMWare for my Windows development (.NET Framework) to Azure Virtual Desktop and I have not regretted this decision for a second.

However when setting up my Azure Virtual Desktop I had som issues installing Docker and I thought I would share the solution.

When installing Docker for Windows on your Virtual Machine you might run in to an error saying something like "Hyper-V feature is not enabled, do you want to enable it?" This can be done using powershell and you also want to enable the Windows container feature to be able to run Docker.

However when I tried doing this on my newly created VM I didn’t manage to enable the Hyper-V feature and the problem was related to my VM size.

Some Azure VM Sizes doesn’t support Hyper-V with Nested Virtualization!

When you set up your Azure Virtual Desktop you are asked to select a VM Size from a long list of available options. This list can be a bit overwhelming and you might only look at the standard things like RAM, CPU, Disk Size and obviously Cost/month!

However, there is a feature you should pay extra attention to if you plan on using Docker when you're selecting a VM Size and it’s the Nested Virtualization feature.

A lot of VM sizes does not have this feature supported and a lot of them does, so choose wisely. For example the Dv4 series has this feature supported but the much cheaper B series does not.

By selecting a VM size that supported this feature I was able to install Docker successfully on my Windows 10 Azure Virtual Desktop.

Hope it can help someone!

Cheers friends! ❤️