Reputation: 367
I am getting an error upon installing docker on azure virtual machine.
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.
Upvotes: 20
Views: 27097
Reputation: 19901
I had the same problem, and my solution was to do the following:
Ensure that the VM SKU size supports virtualization, and I usually use Standard_D2s_v3 or Standard_D2s_v4.
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: Running Docker in an Azure Windows Virtual Machine – Not so fast!
Upvotes: 0
Reputation: 11
I had the same problem while installing Docker Hub on Azure Win 10 VM, but i find vary easy fix to this.
2.While Creating the VM make sure you have change the security type to "Standard" from "Trusted Lunch Virtual machines" Security Type Image
Upvotes: 1
Reputation: 532
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.
Upvotes: 0
Reputation: 4578
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.
Upvotes: 3
Reputation: 2346
Here is a solution if you are getting this error on Azure Windows 10 VM where you have installed Docker:
- Ensure Windows Hyper-V featutes are enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose
- Ensure Windows Containers feature is enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose
- 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.
Upvotes: 19
Reputation: 72151
Azure doesnt yet allow for nested virtualization.
You need to use DSv3 or E3 instances for that. Just use docker like you normally would
Upvotes: 13