我的vagrantfile
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
config.vm.define "linux" do |linux|
linux.vm.hostname = "selenium-hub"
linux.vm.box = "Ubuntu64"
linux.vm.box_url = "http://...../Ubuntu64.box"
linux.vm.network "private_network", ip: "192.168.0.2"
#linux.vm.network :forwarded_port, guest:4444, host:4444
linux.vm.provision "shell", path: "script.sh"
end
config.vm.define "windows" do |windows|
windows.vm.hostname = "win2008-node"
windows.vm.box = "ferventcoder/win2008r2-x64-nocm"
windows.vm.box_url = "ferventcoder/win2008r2-x64-nocm"
windows.vm.communicator = "winrm"
windows.vm.boot_timeout = 600
windows.vm.network "private_network", ip: "192.168.0.3"
windows.vm.provision "shell", path: "script.cmd"
end
end
在
vagrant up linux
linux quest已经分配了静态IP:192.168.0.2
后
vagrant up wndows
linux quest丢失了静态ip(eth1接口有一些默认的ipv6 ip),而windows quest有正确的ip:192.168.0.3
发生了什么事?你能帮忙吗?
答案 0 :(得分:0)
好的,我已经找到了为什么会这样。 Ubuntu有网络管理器,它覆盖设置,并启用DHCP,并覆盖静态IP