启动 Docker Quickstart Terminal 报错 This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated

环境
Windows10 家庭版
DockerToolbox-18.03.0-ce
步骤

问题描述:

才发现家庭版本不能安装 Docker Desktop,由于我的是正版激活的,就不折腾为专业版了;

然后还是有选择的,就是安装DockerToolbox,结果安装后运行Docker Quickstart Terminal出错:

Running pre-create checks...
Error with pre-create check: "This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip this check, use --virtualbox-no-vtx-check)"

 

解决方法:

文件(根据你安装的位置):C:\Program Files\Docker Toolbox\start.sh

增加--virtualbox-no-vtx-check部分

STEP="Checking if machine $VM exists"
if [ $VM_EXISTS_CODE -eq 1 ]; then
  "${DOCKER_MACHINE}" rm -f "${VM}" &> /dev/null || :
  rm -rf ~/.docker/machine/machines/"${VM}"
  #set proxy variables if they exists
  if [ "${HTTP_PROXY}" ]; then
    PROXY_ENV="$PROXY_ENV --engine-env HTTP_PROXY=$HTTP_PROXY"
  fi
  if [ "${HTTPS_PROXY}" ]; then
    PROXY_ENV="$PROXY_ENV --engine-env HTTPS_PROXY=$HTTPS_PROXY"
  fi
  if [ "${NO_PROXY}" ]; then
    PROXY_ENV="$PROXY_ENV --engine-env NO_PROXY=$NO_PROXY"
  fi
  "${DOCKER_MACHINE}" create -d virtualbox --virtualbox-no-vtx-check  $PROXY_ENV "${VM}"
fi

 

posted @ 2021-01-27 21:06  浅笑19  阅读(1906)  评论(1编辑  收藏  举报