Docker机器没有显示在Virtual Box上?

时间:2017-10-13 20:48:50

标签: docker docker-machine

我已经安装了docker机器,当我使用docker-machine ls命令检查时,它显示出运行状态。但它最终不会在我的虚拟盒上创建默认VM。

生成的日志如下:

Running pre-create checks...
Creating machine...
(default) Copying /root/.docker/machine/cache/boot2docker.iso to /root/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
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...

This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
root@varun:~# docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
default   -        virtualbox   Running   tcp://192.168.99.100:2376           v17.09.0-ce   

我应该做些什么更改才能将docker机器创建为Virtual Box上的VM?

1 个答案:

答案 0 :(得分:0)

尝试创建Hyper-V虚拟交换机并引用它

docker-machine create -d hyperv --hyperv-virtual-switch&#34; NameOfVirtualSwitch&#34; nameOfNode

请参阅文件。 &LT; https://docs.docker.com/machine/drivers/hyper-v/#4-create-the-nodes-with-docker-machine-and-the-microsoft-hyper-v-driver&GT;