How to disable/enable Hyper-V in Windows 10 for using Docker and VirtualBox

Hyper-v Logo

As a developer, from time to time I need to use Docker (btw I ❤️Docker) and VirtualBox. Sure, running two virtualizers at the same time is not a good idea but at least, I expect to be able to switch between each other. I mean that when closing one, I should run another easily. I should not restart my computer!

But unfortunately, I have to use Windows and Docker uses Windows’ Hyper-V tech on the Windows environment.

Hyper-V lets you run multiple operating systems as virtual machines on Windows.
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/

and

Hyper-V and Containers Windows features must be enabled. https://docs.docker.com/machine/drivers/hyper-v/

Maybe you will suggest using VMWare Player but some instant images require VirtualBox. For example, if you want to use Vagrant for creating a development environment of WordPress VIP, the instruction suggests using VirtuaBox.

Anyway, our aim is not to discuss which virtualization tool is better. So let’s focus on the main target.

If you want to use VirtualBox, you need to disable Hyper-V. Then when you want to switch to Docker, you need to enable Hyper-V.

How to disable Hyper-V?

  • Run “Command Prompt” as administrator.
  • Run below command:
bcdedit /set hypervisorlaunchtype off
The lovely black screen :)
  • Restart your computer.

How to enable Hyper-V?

  • Run “Command Prompt” as administrator.
  • Run below command:
bcdedit /set hypervisorlaunchtype auto
The lovely black screen :)
  • Restart your computer.

Good luck!

A Passionate Computer Engineer From İzmir

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store