1. 程式人生 > >安裝Docker Toolbox後出現的問題

安裝Docker Toolbox後出現的問題

Installing Docker on Windows is a fairly simple and straightforward process. It is very well documented here. However if you have Hyper-V installed as I do, the instructions will not work right out of the box. If you try to start the Docker Quickstart Terminal, you'll get the following error message:

Running pre-create checks...
Error with pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. If it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Looks like something went wrong in step ´Checking if machine default exists´

The issue is that when you run the terminal the very first time, the startup script attempts to create the default virtual machine in which the docker containers will run. This step of the process fails if you have Hyper-V installed, even if it is disabled. In my case, I do have it installed but I have a boot option set up to disable it when I am not using it. This post describes how to change the Docker startup script to allow you to create the default virtual machine using the startup script and still keep Hyper-V installed.

Before you start with the installation of Docker, I would suggest disabling Hyper-V. If you don't know how to do this, follow these instructions. Once you have disabled Hyper-V, the first step is to install Docker using the installer for Windows. The installation should run without any issues before you proceed with the next steps.

Once you have installed Docker, we'll modify the startup file to allow it to create the default VM. The file we want to modify is located under C:\Program Files\Docker Toolbox and is called called start.sh. To modify the file you'll have to open the file in an editor running as Administrator. If you don't open an elevated editor, you won't be able to save your changes.

It's now time to edit the file, but before you do so, you may want to save a copy of the original file. Just in case. In your editor, locate the following code snippet:

STEP="Checking if machine $VM exists"
if [ $VMEXISTSCODE -eq 1 ]; then
  "${DOCKERMACHINE}" rm -f "${VM}" &> /dev/null || :
  rm -rf ~/.docker/machine/machines/"${VM}"
  #set proxy variables if they exists
  if [ -n ${HTTPPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPPROXY=$HTTPPROXY"
  fi
  if [ -n ${HTTPSPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPSPROXY=$HTTPSPROXY"
  fi
  if [ -n ${NOPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env NOPROXY=$NOPROXY"
  fi
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}" fi

"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"

You will need to modify that line and add the --virtualbox-no-vtx-check switch to. The end result is that the line will look like this:

"${DOCKERMACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"

Save your changes and now you should be able to run the quickstart terminal without any issues.

相關推薦

安裝Docker Toolbox出現的問題

Installing Docker on Windows is a fairly simple and straightforward process. It is very well documented here. However if you have Hyper-V installed as I

Linux使用curl 方式安裝docker-compose 執行docker-compose version 檢查安裝是否成功時出錯的解決辦法

hub 執行 cannot 1.0 使用 文件 curl url 驗證 0x0.緣起: 今天在一臺新的Fedora 25上按照官方文檔,使用curl方式安裝 docker-compose後,驗證是否安裝成功時出錯: 安裝時使用的命令為; curl -L https:/

Ubuntu18.04 安裝32bit庫出現問題

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. 參考https://github.com/lutris/

VS2008打上SP1的補丁安裝了silverlight出現未將物件引用設定到物件例項的解決辦法

新建silverlight專案失敗,提示 未將物件設定到例項 的解決辦法: 1.開啟 visual studio 命令提示 輸入一下命令:2.devenv /resetskippkgs ,這條命令會啟動visual stuio ;關閉visual studio,然後輸入下面的命令:3.devenv /set

centos7 安裝docker本地倉庫出現 http: server gave HTTP response to HTTPS client 錯誤解決方案

出現http: server gave HTTP response to HTTPS client錯誤或無法訪問/opt/registry/docker/registry/v2/repositories/: 沒有那個檔案或目錄 錯誤的按以下方式配置 1.開啟5000埠

解決 Ubuntu 1804 安裝 php7.2 出現未定義的 curl_init 錯誤

系統已安裝 php7.2 在執行程式是發現 curl_init 函式未定義, 原因是 php 的 curl 模組並未安裝。可按如下步驟解決: apt-cache search curl | grep php 查詢curl的php支援名字,我電腦上返回結果如下: php-c

安裝docker成功,啟動docker報錯,解決方法

[[email protected] ~]# systemctl restart docker Job for docker.service failed because the control process exited with error code. Se

sublime text 在已經安裝ConvertToUTF8外掛出現中文亂碼

問題: sublime text本身是不支援中文編碼的,所以需要通過安裝外掛來解決,ConvertToUTF8外掛可以實現。 但是在某次使用過程中,使用快捷鍵儲存文件時,儲存後中文突然變成了亂碼,並且

Ubuntu16.04 anaconda2下用pip 安裝完tensorflow出現no module問題解決

在Ubuntu16.04系統下安裝Tensorflow深度學習工具箱是遇到“安裝完成,但是importtansorflow"報錯的問題(找不到該模組)。仔細分析發現,系統自帶的python與Anaconda整合的python衝突造成的(一定要注意當前存在系統的python與a

在你的Mac上安裝Docker Toolbox

Mac使用者需要使用Docker 工具箱來安裝Docker,Docker工具箱包含以下docker工具: Docker CLI 客戶端以執行Docker引擎來建立映象和容器 Docker Machine來執行Mac終端中的Docker引擎命令列 Docker

node.js 專案 安裝依賴項出現 node-sass 報錯

報錯主要含以下資訊: This usually happens because your environment has changed since running `npm install`. Run `npm rebuild node-sass` to build th

windows下安裝docker toolbox,搭建spring boot專案

(3).下載安裝Docker Toolbox。(4).開啟安裝目錄,找到start.sh。編輯start.sh,找到下面的程式碼片段:STEP="Checking if machine $VM exists" if [ $VMEXISTSCODE -eq 1 ]; then "${DOCKERMACHIN

Ubuntu安裝sogou輸入法出現兩個圖示和輸入框

查詢程序fcitx-qimpanel 對應的pid,然後殺死 ps -ef | grep fcitx-qimpanel sudo kill -9 [對應的pid] 不過每次開機都要殺一次很麻煩,索性就讓它開機執行 sudo vim /etc/rc.

使用CocoaPods安裝GoogleMaps庫出現的問題及解決

一、如何使用CocoaPods 參見: http://www.cocoachina.com/ios/20140107/7663.html or http://blog.csdn.net/chen505358119/article/details/47778347 or ht

[完美解決]如何在windows安裝docker toolbox,使用tensorflow,Jupyter Notebook,各種問題的解決方案

上兩週心血來潮想在自己的Surface(Win10 Home系統)上用TensorFlow和Python,但是安裝實在是太麻煩了…就想到能不能在Windows上用docker直接執行linux環境的TensorFlow?網上一查還真有,然後很開心的下載安裝…誰知

電腦重灌win10系統安裝完Git出現開啟GitBash閃退的情況

使用ghost重灌了win10 專業版後。安裝git,嘗試重灌了n個版本的git,右鍵git bash here 直接閃退,直接進入安裝目錄開啟git-bash.exe依舊閃退,git右鍵點選Git Bash Here閃退並會在當前目錄下生成mintty.exe.stackdump檔案。右鍵GIT GUI h

安裝xcode6 beta 調試出現Unable to boot the iOS Simulator以及編譯蘋果官方Swift的demo報錯failed with exit code 1的解決的方法

imu fonts mat 詳細說明 watermark data- 重新啟動 技術分享 說明 蘋果昨天公布新語言Swift(雨燕),須要安裝xcode6 以及mac os 系統為10.9以上。 (xcode6 beta 可在官方下載。須要登錄開發人員賬號;mac os

yum 安裝docker 無法啟動

ica col supported 兩個 linux start tin contain over 一,yum安裝docker yum -y install docker 啟動docker service docker start 報錯: journalctl -xe E

centos7 安裝docker啟動報錯

禁用 blog either 啟動報錯 status docke sysconf RR https 啟動docker $ sudo systemctl start docker 報錯。 查看狀態: $ systemctl status docker.service -

win10家庭版安裝Docker (Docker Toolbox)

exe sta VM 開啟 uic ali win alt quick 開啟CPU的虛擬化功能(自行百度)之前安裝了VM所以這部跳過。具體查看可以打開任務管理器->性能->cpu 查看是否有 虛擬化:已啟用字樣 下載Docker Toolbox 下載地址 h