Unfortunately, is not possible to run both tools at the same time on Windows OS.
If you run Docker with Hyper-V disabled, you’ll receive the error message:
Hyper-V feature is not enabled.
Do you want to enable it for Docker to be able to work properly?
Your computer will restart automatically.
Note: VirtualBox will no longer work.
But if you enable Hyper-V (disabled by default), VirtualBox does not start, and show you the error message:
Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).
Result code:
E_FAIL (0x80004005)
Component:
ConsoleWrap
Interface:
IConsole {872da645-4a9b-1721-bee2-5585105b9eed}
The only thing you can do to handle this situation is enable or disable Hyper-V when you need.
To speed up this process I’ve created a simple script that you can save and run any time. When you run it, always as Administrator, just type if you want do Activate or Deactivate and agree with system reboot.
You can download the script here. Remember to right click the .bat file and “run as administrator”.
Code:
@echo off
@cls
echo.
echo.
echo *****************************************
choice /C ADC /M “Type A to activate HyperV, D to deactivate it, or C to cancel”
GOTO OPTION-%ERRORLEVEL%
:OPTION-1
echo Activating…
powershell -Command “Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor”
echo.
goto END:OPTION-2
echo Deactivating…
echo.
powershell -Command “Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor”echo.
goto END:OPTION-3
echo.
goto END:END
pause
Comments