Running pre-create checks...
Creating machine...
(default) Copying /Users/kaihuan/.docker/machine/cache/boot2docker.iso to /Users/kaihuan/.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...
**Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: host-only cidr conflicts with the network address of a host interface**
machine VM unreachable if the virtualbox host-only network conflicts with one of the machine host's network interfaces 这个issue里面提到了原因:因为docker想使用的IP段跟你的主机所使用的IP段重复了,解决方法就是删除docker镜像,创建的时候使用另一个IP段。
docker-machine rm default
docker-machine create --driver --virtualbox-hostonly-cidr "10.10.10.1/24" virtualbox default
--virtualbox-hostonly-cidr : 文档中并没有将这个选项解释的很清楚,但基本上1是起始地址和24是检查是否可用范围内的地址数(24 is the number of addresses in the range to check if available),