windows-subsystem-for-linuxdocker-desktop

Issue installing Docker Desktop 4.17.0 on an Azure VM


I am installing Docker Desktop 4.17.0 on an Azure Virtual Machine. As part of one of the prerequisites, I am setting up WSL2.

But it fails with the following error:

Installing: Ubuntu
Ubuntu has been installed.
Launching Ubuntu...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
The installation process for distribution 'Ubuntu' failed with exit code: 1.
Error code: Wsl/InstallDistro/WSL_E_INSTALL_PROCESS_FAILED
PS C:\Windows\system32>

Following the link for enabling virtualization, there is a CmdLet Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true which is not available on the VM where I am installing Docker. Is this CmdLet something that can be installed separately, or is this inherently an Administrative restriction during the VM provisioning process.


Solution

  • I have used Docker inside an Azure Virtual Machines for many years, but there is one gotach tha can give you trouble. My two tips to get Docker installed are:

    1. Ensure that the VM SKU size supports virtualization, and I usually use Standard_D2s_v3 or Standard_D2s_v4.

    2. Ensure you do not enable Trusted Launch Virtual Machines because this feature disables virtualization inside the VM.

    I blogged about the details about how to get Docker to run in Azure here: