Cohabitation Docker & VirtualBox on Windows Cohabitation Docker & VirtualBox on Windows docker docker

Cohabitation Docker & VirtualBox on Windows


I understand your pain-point, but AFAIK this is just not possible to attain because of the simple fact that the virtualization technologies you mentioned here are of different types.

Hyper-V is a "Type 1" hyper-visor which runs on host machine hardware. Other examples in this category include Citrix XenServer and VmWare ESXi.Virtual Box is a "Type 2" hosted hyper-visor which runs within an OS. Other examples in this category include VmWare Player.

If you need to toggle b/w these, a restart is eminent.

A quick way to see the mode is by running "bcdedit" from Command Prompt to see the current config.

  1. To disable Hyper-V run:

bcdedit /set hypervisorlaunchtype off

  1. To turn Hyper-V back on run:

bcdedit /set hypervisorlaunchtype auto

However, you would need to reboot in both the cases. I just mentioned a easy config way to make you understand what was happening in the boot loader when toggling between the Type 1 and Type 2 hyper-visor modes.


You can't have Hyper-V and VirtualBox together. But you can use the older docker toolbox if you wish. Unlike Docker for Window, Docker Toolbox uses VirtualBox and then you won't need Hyper-V.


No there isn't.

Just do as I did and create those VMs in Hyper-V. Hyper-V is super fast and the only problem is graphics. Well nat also, and shared folders.

I installed a Xserver for Windows (xming) and sent the display from the VM to the desktop and works perfectly.

  1. Download and install xserver in windows from here: https://sourceforge.net/projects/vcxsrv/
  2. Install your distribution in a new Hyper-V virtual machine. Look in internet for instructions.
  3. Run your virtual machine and open a command prompt outside the GUI: Ctrl+Alt+F2. Type the following commands:

sudo apt install xfce4echo xfce4-session >~/.xsessionenv DISPLAY=yourwindowsip:0.0 LIBGL_ALWAYS_INDIRECT=1 startxfce4

It should start a xfce desktop in windows. You can reduce the panels, and also hide the desktop window. It works very well and well integrated with windows desktop

UPDATE Check that your virtual machine and your host won't get the same IP. If it happens put an static IP in your virtual machine.