我在192.168.56上有5个虚拟机。*:
这是我的Vagrantfile:
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
# config.vm.box = "base"
(1..4).each do |x|
ip = 20
config.vm.define "solr#{x}" do |solr|
solr.vm.box = 'ubuntu/wily64'
solr.vm.network "private_network", ip: "192.168.56.#{ip}", bridge: "Intel(R) Centrino(R) Advanced-N 6205"
ip = ip + 1
solr.vm.provider "virtualbox" do |v|
v.memory = 2048
#v.cpus = 1
end
end
end
end
我在端口80上有Apache HTTP,在端口8983上有Solr。我可以从ZooKeeper VM做wget 192.168.56.20:8983
并下载主页面。当我尝试从主机操作系统命中192.168.56.20:8983时,它只是挂起。防火墙规则已经到位,可以打开这些端口,所以不知道为什么.19可以访问Solr,但主机不能。
有什么想法吗?