VirtualBox中无法开启VT-x?BIOS中明明开启了仍然解决不了问题?看这里。
Windows 10中如果使用Docker的话,需要开启Hyper-V。Hyper-V在启用的时候,宿主机也被虚拟化了,以至于在宿主机上直接访问CPU的其他虚拟技术会失效。即使VT-X在BIOS里面开了,Intel的CPU检测工具也会报告CPU不支持VT-X。
可以在管理员命令行下运行bcdedit /set hypervisorlaunchtype off之后重启来关闭Hyper-V。或者用下面的批处理:
@echo off
"%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\SYSTEM" >nul 2>nul
if %errorlevel%==0 goto :start
echo Please use administrator account to run.
echo 请以管理员身份运行。
pause
goto :end
:start
pushd "%~dp0"
:menu
echo MENU
echo 1. Set current boot item: hypervisorlaunchtype Auto
echo 2. Set current boot item: hypervisorlaunchtype Off
echo Q. Exit
echo.
echo Current status:
bcdedit /enum {current}|findstr hypervisorlaunchtype
echo.
set /p input=Please input:
if "%input%"=="1" goto :auto
if "%input%"=="2" goto :off
if /i "%input%"=="q" goto :end
echo.
goto :menu
:auto
bcdedit /set {current} hypervisorlaunchtype auto
goto :menu
:off
bcdedit /set {current} hypervisorlaunchtype off
goto :menu
:end
popd