Installing Docker Toolbox on Windows with Hyper-V Installed

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 ${HTTP
PROXY+x} ]; then
PROXYENV="$PROXYENV --engine-env HTTPPROXY=$HTTPPROXY"
fi
if [ -n ${HTTPSPROXY+x} ]; then
PROXY
ENV="$PROXYENV --engine-env HTTPSPROXY=$HTTPSPROXY"
fi
if [ -n ${NO
PROXY+x} ]; then
PROXYENV="$PROXYENV --engine-env NOPROXY=$NOPROXY"
fi
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"
fi

The second to last line is where the vm is created:

"${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后出现的问题的更多相关文章

  1. WIN7安装Docker Toolbox、制作镜像并发到阿里云

    一.安装Docker Toolbox,并配置国内源加速 WIndows7不支持Hyper-v,所以只能采用Docker Toolbox的方式使用Docker.传送门:http://mirrors.al ...

  2. win7下安装docker toolbox

    我的笔记本是win10系统,上面安装docker非常简单.只要在官网下载然后一路next就可以了.然而办公室的电脑装的是win7,我也懒得给它换win10.没想到,win7下安装docker这么费劲. ...

  3. Window 7 安装Docker toolbox , 启动terminal时遇到的小问题

    参考:http://blog.csdn.net/tina_ttl/article/details/51372604 参考前面网页成功安装后打开terminal,出现下面问题: Looks like s ...

  4. Windows10下的docker安装与入门 (一)使用docker toolbox安装docker

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...

  5. Windows10 使用docker toolbox安装docker

    一.介绍 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间 ...

  6. (转)Windows10下的docker安装与入门 (一)使用docker toolbox安装docker

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...

  7. docker toolbox在win7下的安装

    1.下载安装docker toolbox docker toolbox的下载地址: http://mirrors.aliyun.com/docker-toolbox/windows/docker-to ...

  8. Docker Toolbox安装

    公司最近搭建docker环境,其中会遇到一些问题,在这里记录一下. 先来了解一下docker 一.基本概念 1.Docker中基本概念镜像(Image) 提到镜像,有对操作系统有一定认知的都知道,镜像 ...

  9. 【学习】在Windows10平台使用Docker ToolBox安装docker(一)

    前言:今天距离元旦还有44天,时间点是18:11:45,想了想一路学习的过程和其中遇到的困难,其中有克服的,有放弃的,这有可能是我自己意志不坚定吧,学习docker也是我当下的一个目标,不知道会是成功 ...

随机推荐

  1. OC中的特有语法

    一. 分类-Category 1. 基本用途 如何在不改变原来类模型的前提下,给类扩充一些方法?有2种方式 l 继承 l 分类(Category) 2. 格式 分类的声明 @interface 类名  ...

  2. 不同servlet版本的web.xml的头部信息

    servlet2.5 <?xml version="1.0" encoding="UTF-8"?> <web-app version=&quo ...

  3. (转) 一步一步学习ASP.NET 5 (三)- 认识新的Web结构

    转发:微软MVP 卢建晖 的文章,希望对大家有帮助.原文:http://blog.csdn.net/kinfey/article/details/44421979 编者语 : 今天微软的两大盛事,早上 ...

  4. 简单看看这两个类 String和StringBuilder

    我记得以前在园子里面讨论这两个类的文章有很多很多,并且还拿出了很多的测试报告,在什么情况下,谁比谁快,在什么情况下,该用谁 不该用谁等等这些,我这里就不比较了,我就简单看看他们里面的内部实现,那就先看 ...

  5. JVM知识点

    先发个链接到两位大牛的主页 http://rednaxelafx.iteye.com/               http://icyfenix.iteye.com/ 目录 1)概述 2)编译 3) ...

  6. SQL Server锁定【2015.12.17】

    锁定的体系分类   1.表级锁 保证数据在逻辑上的一致性. 包含:行级锁.分页锁.表.数据分页.LOB分页以及索引叶子级锁. 2.闩 保证数据在物理上的一致性,系统采用,比锁少耗资源,对用户不可见. ...

  7. hive中的一种假NULL现象

    使用hive时,我们偶尔会遇到这样的问题,当你将结果输出到屏幕时,查出的数据往往显示为null,但是当你将结果输出到文本时,却显示为空(即未填充),这是为什么呢? 在hive中有一种假NULL,它看起 ...

  8. 一:Go编程语言规范--块、声明、作用域

    1.块 块为一对大括号括住的声明和语句.块 = "{" { 语句 ";" } "}" . 除显式源码块外,还有隐式块: 全域块 包含所有的G ...

  9. 有时候就是看不进论文-jQuery动画特效篇&MySQL

    hi 早上知道新的乱斗模式后,没忍住开了几把,然后就无心论文了...用这个来破吧 1.jQuery -----动画特效----- ----调用show()和hide()方法显示和隐藏元素 show() ...

  10. 用PS设计等高线效果的背景图片

    有些简单的单网页,如果利用等高线效果的背景图片,再配合合适的背景色,能达到绚丽的效果.如下图所示: 本文就介绍该等高线效果的背景图片是如何制作的.Follow Me!!!! 1.新建文档,尺寸:100 ...