windows10启动Hyper-V

Virtualization

For Docker Desktop to function correctly, your machine must have the following features:

  1. Hyper-V installed and working

  2. Virtualization enabled

Hyper-V

Docker Desktop requires Hyper-V as well as the Hyper-V Module for Windows Powershell to be installed and enabled. The Docker Desktop installer enables it for you.

Docker Desktop also needs two CPU hardware features to use Hyper-V: Virtualization and Second Level Address Translation (SLAT), which is also called Rapid Virtualization Indexing (RVI). On some systems, Virtualization must be enabled in the BIOS. The steps required are vendor-specific, but typically the BIOS option is called Virtualization Technology (VTx) or something similar. Run the command systeminfo to check all required Hyper-V features. See Pre-requisites for Hyper-V on Windows 10 for more details.

To install Hyper-V manually, see Install Hyper-V on Windows 10. A reboot is required after installation. If you install Hyper-V without rebooting, Docker Desktop does not work correctly.

From the start menu, type Turn Windows features on or off and press enter. In the subsequent screen, verify that Hyper-V is enabled:

windows10启动Hyper-V

Hyper-V driver for Docker Machine

The Docker Desktop installation includes the legacy tool Docker Machine which uses the old boot2docker.iso, and the Microsoft Hyper-V driver to create local virtual machines. This is tangential to using Docker Desktop, but if you want to use Docker Machine to create multiple local Virtual Machines (VMs), or to provision remote machines, see the Docker Machine topics. This is documented only for users looking for information about Docker Machine on Windows, which requires that Hyper-V is enabled, an external network switch is active, and referenced in the flags for the docker-machine create command as described in the Docker Machine driver example.

Virtualization must be enabled

In addition to Hyper-V, virtualization must be enabled. Check the Performance tab on the Task Manager:

windows10启动Hyper-V

If you manually uninstall Hyper-V or disable virtualization, Docker Desktop cannot start. See Unable to run Docker for Windows on Windows 10 Enterprise.

Networking and WiFi problems upon Docker Desktop for Windows install

Some users may experience networking issues during install and startup of Docker Desktop. For example, upon install or auto-reboot, network adapters and/or WiFi may get disabled. In some scenarios, problems are due to having VirtualBox or its network adapters still installed, but in other scenarios this is not the case. See the GitHub issue Enabling Hyper-V feature turns my wi-fi off.

Here are some steps to take if you experience similar problems:

  1. Ensure virtualization is enabled, as described above in Virtualization must be enabled.

  2. Ensure Hyper-V is installed and enabled, as described above in Hyper-V must be enabled.

  3. Ensure DockerNAT is enabled by checking the Virtual Switch Manager on the Actions tab on the right side of the Hyper-V Manager.

    windows10启动Hyper-V

  4. Set up an external network switch. If you plan at any point to use Docker Machine to set up multiple local VMs, you need this anyway, as described in the topic on the Hyper-V driver for Docker Machine. You can replace DockerNAT with this switch.

  5. If previous steps fail to solve the problems, follow steps on the Cleanup README.

    Read the full description before you run the Windows cleanup script.

    The cleanup command has two flags, -Cleanup and -ForceDeleteAllSwitches. Read the whole page before running any scripts, especially warnings about -ForceDeleteAllSwitches. {: .warning}

上一篇:Win10-无法启动虚拟机


下一篇:解决VMware Workstation下Win2012R2无法安装Hyper-v问题