for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Unable to start docker in windows - one of the Hyper-V components is not running

Open LarryMai opened this issue 7 years ago • 40 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: CBE3DDB0-7B81-4FBF-92B2-85FBF87E6393/20190808093037

Expected behavior

Every thing is fine.

Actual behavior

image

Information

  • Windows Version:
  • Docker Desktop Version:

Steps to reproduce the behavior

environment: windows 10.018362.30

image

Step : no need run any docker file. just install the latest version of Docker Desktop and run

LarryMai avatar Aug 08 '19 09:08 LarryMai

  1. Uninstall Docker 2. RESTART!!! (will not work if you don't)
  2. Install Docker

worked in my case

renedlog avatar Aug 08 '19 11:08 renedlog

PROBLEM

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID 7F4D8E7C-BC87-433F-BCDB-D69991784B59).

This error message is usually because you're running Docker Desktop in a nested virtualization environment, such as: VMWare, VirtualBox, Azure, Xen, AWS EC2, Google Compute Engine

SOLUTION

VMWare vSphere "expose hardware assisted virtualization to the guest OS" under CPU settings

VMWare Fusion https://github.com/docker/for-win/issues/4470#issuecomment-585651502 Set option:

  • Settings/Processors & Memory/Advanced/Enable hypervisor applications in this virtual machine.

VMWare Workstation

  • Enable Virtualize Intel VT-x/EPT or AMD-V-RVI (https://stackoverflow.com/a/48260575/1554346)

Also some people have had luck doing this:

  1. Uninstall Docker Desktop
  2. Deactivate Hyper-V
  3. Disable Windows Defender Credential Guard: https://docs.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-manage#disable-windows-defender-credential-guard
  4. Reboot, reinstall.

Windows Server in Hyper-V https://github.com/docker/for-win/issues/574#issuecomment-341621969

Azure windows 10 VM https://stackoverflow.com/a/50099965/1554346

mikeparker avatar Aug 08 '19 13:08 mikeparker

So, I get this error when installing Docker for Windows in a Windows Server 2019 1809 guest OS running with Virtualbox 6.0.10. My host is a MacBook Pro running macOS 10.14.6.

Hyper-V paravirtualization is selected for the VM and both the Host Compute Service and Virtual Machine Management show as running in Windows. The DHCP tweak mentioned above doesn't have any impact.

There's no errors in the system event log when Docker Desktop throws the error, but there is a warning from Hyper-V-VmSwitch:

Failed to complete operation 'Policy Enum' on switch DD771604-3814-45D1-87DC-294E3E94C569 (Friendly Name: DockerNAT) Property Id {1550e863-4337-4917-a040-5a27dbc58b59} Instance Id {00000000-0000-0000-0000-000000000000}. Status = {Drive Not Ready}
The drive is not ready for use; its door may be open. Please check drive %hs and make sure that a disk is inserted and that the drive door is closed..

Hope this additional data may help a bit.

mattlqx avatar Sep 04 '19 15:09 mattlqx

  1. Uninstall Docker 2. RESTART!!! (will not work if you don't)
  2. Install Docker

worked in my case

I don't know why but it worked in my case too.

senabd avatar Oct 15 '19 16:10 senabd

It worked for me too... but after the latest update, it's back again.

lastboy avatar Oct 24 '19 19:10 lastboy

I found that I needed to 'expose hardware assisted virtualization to the guest OS' in vSphere where I made the VM that Docker is running on.

mojiwa avatar Nov 12 '19 21:11 mojiwa

I'm seeing the same error. Installed docker on my Windows 10 VM and the docker can't start "because one of the Hyper-V components is not running". The following two services are up running: Hyper-V Host Compute Service Hyper-V Virtual Machine Management

Please help!

lusiahli avatar Nov 13 '19 22:11 lusiahli

I'm seeing the same error. Installed docker on my Windows 10 VM and the docker can't start "because one of the Hyper-V components is not running". The following two services are up running: Hyper-V Host Compute Service Hyper-V Virtual Machine Management

Please help! @lusiahli Yes, see my response above - this was exactly what was happening to me. I had to shut down the VM, goto the Windows 10 VM settings, under CPU you should be able to enable virtualization. That should fix the issue. Good luck

mojiwa avatar Nov 13 '19 22:11 mojiwa

I'm seeing the same error. Installed docker on my Windows 10 VM and the docker can't start "because one of the Hyper-V components is not running". The following two services are up running: Hyper-V Host Compute Service Hyper-V Virtual Machine Management Please help! @lusiahli Yes, see my response above - this was exactly what was happening to me. I had to shut down the VM, goto the Windows 10 VM settings, under CPU you should be able to enable virtualization. That should fix the issue. Good luck

@mojiwa Thanks for the detailed info. My VM actually is a VDI managed by another group. I've sent a request with your suggestions. Will see.

lusiahli avatar Nov 14 '19 15:11 lusiahli

Same error for me..

devgig avatar Nov 17 '19 03:11 devgig

And for me.. Windows 10 started in VirtualBox 6.1 on Ubuntu 19.10 host. Docker Desktop 2.1.0.5 is started on this virtual Windows machine. Nested Intel virtualization is enabled in the VM settings. Just in case I also selected Hyper-V Paravirtualization Interface. Note, Intel nested virtualization is something new in this VBox version, so I won't wonder if it's buggy.

Stack trace is the same. I also tried to uninstall docker with reboot and reinstall again, but this didn't help. Both aforementioned Hyper-V services are started.

From logs I see

  • Hyper-V-Compute service emits only "The Host Compute Service is starting." to the Operational log and nothing more. and Admin log report "The Host Compute Service started successfully.". That's a little bit weird.
  • Hyper-V-VMMS service's Admin log shows same errors as in the popup window. While Networking and Operational have just informational records. last records: Ethernet switch port connected (switch name = '7427EF61-240B-421C-A59C-FE0FE5A43474', port name = '32D6DF5C-B0B3-4BCF-9716-159BFDB0DC8B', adapter GUID = '{F58FF8E9-DE1D-4ADB-9FC2-6A4D3AED6202}'). and The system successfully compacted 'c:\programdata\dockerdesktop\vm-data\dockerdesktop.vhdx'.
  • Hyper-V-VmSwitch has just informational records , last of which Port 81E97CA7-0D79-48C3-9597-C9EDF53D79BD (Friendly Name: ) successfully created on switch 7427EF61-240B-421C-A59C-FE0FE5A43474 (Friendly Name: DockerNAT).

Ri0n avatar Dec 18 '19 16:12 Ri0n

Unfortunately ept instruction (for intel CPU for example) not passing into virtual cpu( https://www.virtualbox.org/manual/ch09.html#nested-virt

Therefore Hyper-V service not started in Windows, because it need support of ept instruction (see SLAT abbreviation)

Only Virtual-Box on Virtual-Box option available at this moment :((

i-usalko avatar Jan 10 '20 14:01 i-usalko

So I guess Docker devs might also report this to MS which likely won't be fixed since the case is quite rare. And yet VBox can alter some paging settings via vboxmanage, not sure if it's possible to gain desire effect though. see https://www.virtualbox.org/manual/ch10.html 10.6

Ri0n avatar Jan 13 '20 13:01 Ri0n

@mojiwa suggestion to "expose hardware assisted virtualization to the guest OS" under CPU settings worked for me. Running Windows Server 2019 on VMware 6.7.

genemcsween avatar Jan 16 '20 15:01 genemcsween

  1. Uninstall Docker 2. RESTART!!! (will not work if you don't)
  2. Install Docker

worked in my case

I don't know why but it worked in my case too.

This solution worked for me as well. Thank you.

faisalrazzak avatar Jan 21 '20 17:01 faisalrazzak

I have this issue still. My server is Win2019 VM server. What I found out is that since I run this server on Win2012 server host, this host OS does not support nested virtualization. For this I need Win10/Serv2019 host. and there is this command once you have all your OS software correct versions

Set-VMProcessor -VMName "your VM name" -ExposeVirtualizationExtensions $true

anato-s avatar Jan 28 '20 23:01 anato-s

1. Uninstall Docker
   **2. RESTART!!!** (will not work if you don't)

2. Install Docker

worked in my case

After restart doesn't work, until reinstalling.

belachkar avatar Feb 03 '20 01:02 belachkar

I am using VMware Fusion and installed Windows 10 and was getting the same error. I solved that issue by checking this option. Settings/Processors & Memory/Advanced/Enable hypervisor applications in this virtual machine. And It can be the reason for the lack of assigned Processors and RAM. Screen Shot 2020-02-13 at 2 13 03 AM

rubber-duck35 avatar Feb 13 '20 10:02 rubber-duck35

To add to this post as it really pertains to many other issues that folks have, is related to how the Docker Desktop for windows application installs. Specifically, when the installation is initiated, can we please have the installation include logic that looks for VMware Workstation? When a windows PC has VMware workstation installed, and the user installs Docker Desktop, it automatically installs Hyper-V components.

I would have seriously appreciated it if the installer had the logic to query my PC to look for an application called something like "VMware Workstation" and returned a warning before installation that would say, by continuing with this installation, VMware Workstation will no longer work.

This is because HyperV is a Type1 hypervisor and it will prevent VMware workstation from launching. The error that workstation gives isn't very helpful either and I spent half a day trying to figure out what happened, only to uninstall the HyperV components, which then broke Docker Desktop.

Just a thought.

5280tunage avatar Mar 11 '20 00:03 5280tunage

  1. Uninstall Docker 2. RESTART!!! (will not work if you don't)
  2. Install Docker

worked in my case

I don't know why but it worked in my case too.

Lol, this worked for me too. I'm installing Docker Desktop on a Windows 10 VM using VirtualBox.

tang2087 avatar Mar 24 '20 11:03 tang2087