Installing docker on azure virtual machine windows 10
Asked Answered
V

5

20

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.

Vitia answered 29/6, 2017 at 5:44 Comment(2)
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-azureWink
I test in my lab, it works fine on my Windows 10 VM which sku is Standard D2 v3.Wink
L
19

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.

Leblanc answered 30/4, 2018 at 11:56 Comment(1)
Docker will try to start by using WSL by default will show up a crash screen on startup. There will be a prompt for switching the back end also. Just close the crash message window and select "Use Hyper-V" when prompted. Docker will be restarted without any issues.Crista
K
13

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

Kloof answered 29/6, 2017 at 5:47 Comment(4)
tested with a Standard D2s v3 (2 vcpus, 8 GB memory), created the VM, installed docker for windows, when prompted to activate hyper-V, selected yes and rebooted. everything was fineSpermatid
well, dsv3 were not available at the time of writing so... @CedricDumontKloof
I had this same problem with D2s_v3. I did not expect it to work, but when I changed it to D4s_v3 Docker started successfully.Pronoun
Switching from D2s_v3 -> D4s_v3 worked for me as well. Thanks!Myeloid
M
3

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.

Marquardt answered 9/7, 2020 at 18:6 Comment(0)
Y
1

I had the same problem while installing Docker Hub on Azure Win 10 VM, but i find vary easy fix to this.

  1. Make sure the VM you are choosing is supported by nested virtualization. Here I used D4s_v4 (4vCPU and 16GB Ram). Description Of D4s_v4 VM

2.While Creating the VM make sure you have change the security type to "Standard" from "Trusted Lunch Virtual machines" Security Type Image

  1. Also make sure that you've enabled the Hyper-v , Windows Subsystem For Linux and etc. etc. you found till now on google....
Yasukoyataghan answered 1/2, 2024 at 5:21 Comment(0)
A
0

As mentioned above use DSv3 or E3 instances. in case it doesn't work for you, check for security type while creating Azure Virtual Machine, Now a days it 'Trusted Launch Virtual Machine", switch it back to Standard and install docker as usual. It should be working.

Alyssaalyssum answered 27/10, 2023 at 11:5 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.