本文介绍了Vagrant::Errors::NetworkCollision: 指定的主机网络与非主机网络发生冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在多台机器上使用 vagrant,它曾经正常工作,但后来又不能工作了.
I'm using vagrant with multiple machine, it's ever worked normally, but then it just doesn't work again.
我在 Vagrantfile 中定义网络的部分:
My part of Vagrantfile that defining the network:
config.vm.define "app" do |layer|
layer.vm.provision "chef_solo", id:"chef" do |chef|
.....
end
# Forward port 80 so we can see our work
layer.vm.network "forwarded_port", guest: 80, host: 9999
layer.vm.network "private_network", ip: "10.10.10.10"
end
这是一个标准配置,我只有那个虚拟机.但是当我尝试 vagrant up
时,它显示错误:
It's a standar configuration and I only have that vm. But when I tried to vagrant up
, it shows error:
Vagrant::Errors::NetworkCollision: The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network
如何解决?
推荐答案
显然我的办公室刚刚更改了网络配置.通过更改 10.10.10.10.对于其他块(例如 10.0.0.100),它再次起作用.对不起.
Apparently my office just changed the network configuration. By changing 10.10.10.10. to other blok (e.g 10.0.0.100), it workedagain. Sorry.
这篇关于Vagrant::Errors::NetworkCollision: 指定的主机网络与非主机网络发生冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!