12

i have already enabled virtualization in my BIOS, and also enable it in Windows feature enter image description here

furthermore, the android emulator with android studio working well, but when i try to run Docker for windows, i encounter this problem? enter image description here

i don't know where the problem is?

Osama Mohammed
  • 2,433
  • 13
  • 29
  • 61

4 Answers4

24

You need to autostart the hypervisor at startup.

Open a Powershell as Admin (right-click Powershell, click "Run as administrator").
Paste the line:

bcdedit /set hypervisorlaunchtype auto

enter image description here

"bcd" stands for Boot Configuration Data, to set it to automatically launch hypervisor. Then the hypervisor will start at the next boot and it should work.

For future information see: https://d3v.one/windows-10-changing-hyper-v-support-at-boot-time/

blackraven
  • 5,284
  • 7
  • 19
  • 45
hashtag-assist
  • 402
  • 6
  • 12
  • it is work, thanks, but i encounter another problem : Docker.Core.HttpBadResponseException: Unhandled exception: Operation failed with result 4096 at Docker.Core.Logging.ClientExceptionInterceptor.d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\Logging\ClientExceptionInterceptor.cs:line ........... – Osama Mohammed Jun 26 '20 at 16:55
  • Sorry I'm not that docker pro but there are some Google hits – hashtag-assist Jun 27 '20 at 17:14
3

Just re-enable Hyper-V.

Concrete steps:

  • Go to Apps & features.
  • Select Programs and Features on the right under Related settings.
  • Select Turn Windows features on or off.
  • Deselect Hyper-V, and click OK. (This disables Hyper-V).
  • Restart the computer.

After restart,

  • Go to Apps & features.
  • Select Programs and Features on the right under Related settings.
  • Select Turn Windows features on or off.
  • Select Hyper-V, and click OK. (This enables Hyper-V).
  • Restart the computer.

After restart, docker worked correctly.

Pang
  • 9,564
  • 146
  • 81
  • 122
0

What worked for my team was to make sure Containers and Hyper-V was enabled, then making sure Docker Desktop was updated.

Ronmel Ross
  • 1
  • 1
  • 1
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 16 '21 at 15:04
0

I tried both options described here without success:

  1. Unchecked Hyper-V in Windows feature(reboot), checked again(reboot)
  2. Run bcdedit /set hypervisorlaunchtype auto as Administrator in Powershell and reboot the PC

SOLUTION: What solved the issue for me was to update the Docker Desktop version (from 3.6 to 4.3)