2

I am new to docker as well as virtual machines. When installing docker on Windows 10 for the first time it alerted me that it needed to enable Hyper-V. I don't really know what Hyper-V is, but I assume it has to do with virtualization, so I complied. However, for some tools I need to use a Linux environment so I am using Oracle's VM Virtualbox. When trying to run a VM in there, it kept giving me a blue screen. After searching, I found that to prevent this, I needed to disable Hyper-V. I did so, but now docker won't launch because the prerequisite of Hyper-V is not enabled.

What is the middle ground? How can I use Virtualbox as well as docker?

Bram Vanroy
  • 1,347

1 Answers1

2

There is no middle ground.

Both Hyper-V and Virtual Box do the exact same thing. They virtualize another OS on your system.

Docker uses the Hyper-V subsystem to create a virtual environment in which the Docker applications run, so Hyper-V needs to be active.

So why can't you have both Hyper-V and VirtualBox active at the same time?

The problem with virtualization is performance. Given that it emulates a computer, a fully software emulation is very slow. So to counter this, virtualization software communicates directly with your system's hardware. For this to be possible you have to enable vtx in the BIOS. These set of instructions allow the virtualization software to communicate directly with the main components such as your CPU and Graphics card, to keep performance high. The problem is that this is device exclusive. Once a claim on the hardware is made, no other software can get a claim. So VirtualBox and Hyper-V won't run side-by-side.

Is there really nothing I can do?

Well, you can recreate your VirtualBox inside Hyper-V. You can have a Hyper-V VM active while using Docker, so that is a way (probably the only way) to solve this issue. But Hyper-V and VirtualBox cannot be used at the same time.

LPChip
  • 66,193