17
votes

I am getting an error upon installing docker on azure virtual machine.

enter image description here

m/c configuration: azure vm, windows 10 enterprise, Intel 2.4 GHz, 7 GB RAM, 64-bit operating system, x64-based processor. I went through a few blogs and they asked me to enable nested virtualization on azure vm as follows.

Set-VMProcessor -VMName MobyLinuxVM -ExposeVirtualizationExtensions $true

But this also didn't help and the virtual m/c MobyLinuxVM failed to start. I have installed Hyper-V and Container components from windows features. But the error shows "because one of the Hyper-V components is not running" whereas all the components of Hyper-V are running. I checked the task manager performance tab and I don't see the virtualization option there. I can't modify the virtualization settings in the BIOS as I am installing docker on an Azure VM. Also I tried disabling the windows firewall but that didn't help. So how to run docker on azure virtual m/c windows 10 enterprise.

3
You could install docker on Azure Windows 10 enterprise. Please ensure you should enable Hyper-V firstly. Virtualization is available on DV3 and EV3 VM. Please refer to azure.microsoft.com/en-us/blog/nested-virtualization-in-azure - Shui shengbao
I test in my lab, it works fine on my Windows 10 VM which sku is Standard D2 v3. - Shui shengbao

3 Answers

15
votes

Here is a solution if you are getting this error on Azure Windows 10 VM where you have installed Docker:

  1. Ensure Windows Hyper-V featutes are enabled by running PowerShell cmdlet:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose

  1. Ensure Windows Containers feature is enabled by running PowerShell cmdlet:

Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose

  1. Ensure Hypervisor is set to auto start in the Boot Configuration Database (BCD) by running in elevated command prompt the command:

bcdedit /set hypervisorlaunchtype Auto

After running all of the above and you restart the Azure VM, Docker should be starting normally.

11
votes

Azure doesnt yet allow for nested virtualization.
You need to use DSv3 or E3 instances for that. Just use docker like you normally would

1
votes

Microsoft offers images with preinstalled docker enterprise. This works even on a B2s VM. Just select any of the "Microsoft Server 2019/2016 Datacenter with containers" image while creating the VM.