无法启动Docker 1.9.1

时间:2016-01-07 04:51:13

标签: docker virtual-machine

我是码头工人的新手。 今天早上我刚下载并安装了docker 1.9.1到我的电脑(操作系统:windows)

安装后,我运行'Docker Quickstart Terminal'但它失败了 控制台保持打印如下:

Machine default already exists in VirtualBox.
Starting machine default...
(default) Starting VM...
Machine "default" was started.
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): Regeneratin
g TLS certificates
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...

我尝试删除虚拟机并再次创建它,但问题仍然存在

Creating Machine default...
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\mcthanh\.docker\machine\cache\boot2docker.iso to C:\U
sers\mcthanh\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: C:\Program Files\Docker Toolb
ox\docker-machine.exe env default
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...

你有关于此的任何exp吗? 非常感谢你的帮助!!!

2 个答案:

答案 0 :(得分:1)

在睡眠/唤醒周期后,Windows将“仅主机”网络检测为“重复”并更改其IP。之后,docker-machine(或Quickstart终端)不再工作。

这可能是由于这个VirtualBox bug(从5年前开始)引起的:所以VirtualBox似乎没有很快修复。它可能是一个Windows错误。

这应该是一个有效的解决方法:

  1. 打开VirtualBox
  2. 转到文件 - >偏好 - >网络 - >仅限主机的网络
  3. Docker Toolbox可能创建了第二个仅限主机的网络,可能名为“VirtualBox Host-Only Ethernet Adapter#2”,双击即可
  4. 将“IPv4地址”从192.168.99.1更改为192.168.99.2(您可能每次都必须增加/减少IP)。但知识产权的实际变化非常重要。
  5. 点击OK。如果IP已更改(应该已更改),系统将提示您“Windows管理员确定”(或者它已命名)。
  6. 之后,docker-machine和Quickstart Terminal应该可以正常工作。

答案 1 :(得分:0)

  

有时我们在系统中禁用虚拟化以确保这一点   虚拟化是否已启用?

按照给定的步骤检查是否启用了虚拟化

Open Task manager
Click on performance
Click on CPU
Check whether virtualization is enabled or not
  

如果已禁用,则转到BIOS设置并启用它。