我正在使用 vagrant 来管理多台虚拟机,之前一直正常运行,但现在突然无法正常工作。
以下是我 Vagrantfile 中定义网络的部分:
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
时,它显示错误:
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
如何解决这个问题?