I want to use Docker to build a virtual environment, but I had to use VMware, so I used VMware for a while. Development has settled down, so when I tried to start using Docker, a picture of a Docker whale with its cheeks dyed red was displayed on both the error screen. I disabled Hyper-V when using VMware, so I think that's the effect.
This time, I have summarized the necessary steps when the above error occurs!environment | version |
---|---|
Windows10 | 1909 |
Docker(Community Edition | 18.06.1 |
VMware Workstation 15 | - |
If the value of hypervisorlaunchtype
that can be confirmed by executing bcdedit
is "Off",
Execute $ bcdedit / set hypervisorlaunchtype auto
in PowerShell started with administrator privileges, and then restart the PC!
I also tried restarting the PC and checking the settings with commands, but the situation did not change.
When I looked it up again, I found that there were many cases where an error occurred even though Hyper-V was enabled. So, in light of the article below, I found that I needed to see the value of hypervisorlaunchtype
, which I could see with the bcdedit
command.
When I actually checked it, it was `hypervisorlaunchtype Off`, so execute the following command with Powershell started with administrator privileges.[Docker] Error handling when installing Docker for Windows https://qiita.com/LemonmanNo39/items/b1b104e7fb609464727b
#Switch hypervisor launch type
bcdedit /set hypervisorlaunchtype auto
** bcdedit **: Command to check the information (BCD) at PC startup ** hypervisorlaunchtype **: Hyper-V enable / disable setting value
What I ran with Powershell earlier is that I checked the settings with the bcdedit command and enabled Hyper-V.
Reference: ■ Change the display order and default of the boot menu with bcdedit on Windows https://www.atmarkit.co.jp/ait/articles/0905/08/news096.html ■ Back up / restore boot configuration information with bcdedit https://www.atmarkit.co.jp/fwin2k/win2ktips/1157bcdedit2/bcdedit2.html ■ Temporarily disable Hyper-V to use other virtual environments https://www.atmarkit.co.jp/ait/articles/1511/13/news032.html
ʻEnable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -Allcommand What is the difference between the
bcdedit / set hypervisorlaunchtype auto` command?
Regarding this, the former is the setting of enabling / disabling Hyper-V, and the latter is the setting of starting Hyper-V.
Therefore, even if hypervisorlaunchtype auto is set to auto
Enable-WindowsOptionalFeature -Online -FeatureName If Microsoft-Hyper-V setting is OFF
I thought that docker could not be used.
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
(image) Hyper-V is unchecked.
→ There was no value for hypervisorlaunchtype.
The value of hypervisorlaunchtype doesn't seem to be displayed unless Hyper-V is enabled.
■ The basics of Hyper v to understand from troubles P8 https://www.slideshare.net/NaokiAbe/hyper-v-25767921
It was hypervisorlaunchtype Auto
.
From the above, when using Docker, it seems necessary to ** set Windows Hyper-V ON → hypervisor launch type is Auto **.
Now that Docker is available, I would like to develop it again! Well then!
■Logs and troubleshooting https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled ■ Enable / disable the Windows 10 role in PowerShell http://www.vwnet.jp/windows/w10/WindowsOptionalFeature.htm ■ [Docker Desktop] What to do if you cannot start due to an error https://algorithm.joho.info/programming/docker-for-windows-hardware-assisted-virtualization-and-data-execution-protection-must-be-enabled-in-the-bios/ ■ Enable the virtualization platform "Hyper-V" on Windows 10 https://www.atmarkit.co.jp/ait/articles/1806/25/news026.html
Recommended Posts