我在VirtualBox 5上运行了多个Vagrant 1.7.4盒子,但我相信我遇到了与网络设置的冲突。我总是可以" vagrant ssh"当它上线时到一个盒子,但如果我可以访问网络服务器它会被击中或错过。重新启动我的机器或以不同的顺序启动这些框可以解决问题。我正在运行OSX El Capitan。以下是相关设置:
计算机1(无法从OSX访问网络服务器):
config.vm.network "private_network", ip: "10.10.10.10"
eth0 Link encap:Ethernet HWaddr 08:00:27:6B:1C:DD
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6b:1cdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:775 errors:0 dropped:0 overruns:0 frame:0
TX packets:572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80340 (78.4 KiB) TX bytes:70508 (68.8 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:3E:44:A3
inet addr:10.10.10.10 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe3e:44a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:1128 (1.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
机器2(正常工作):
config.vm.network "private_network", ip: "10.11.11.11"
eth0 Link encap:Ethernet HWaddr 08:00:27:6B:1C:DD
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6b:1cdd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10773 errors:0 dropped:0 overruns:0 frame:0
TX packets:6361 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7430638 (7.0 MiB) TX bytes:482303 (470.9 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:73:39:23
inet addr:10.11.11.11 Bcast:10.11.11.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe73:3923/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5646 errors:0 dropped:0 overruns:0 frame:0
TX packets:6693 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:625645 (610.9 KiB) TX bytes:6934485 (6.6 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1270 errors:0 dropped:0 overruns:0 frame:0
TX packets:1270 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1144652 (1.0 MiB) TX bytes:1144652 (1.0 MiB)