在配置文件Vagrantfile文件里配置如下:
Vagrant.configure("2") do |config|
config.vm.define "centos7_hadoop01" do |vb|
config.vm.provider "virtualbox" do |v|
config.disksize.size=‘80GB‘
v.memory = 2048
v.cpus = 1
end
vb.vm.host_name = "centos7_hadoop01"
vb.vm.network :public_network, ip: "192.168.56.6"
vb.vm.box = "centos7_hadoop"
end
config.vm.define "centos7_hadoop02" do |vb|
config.vm.provider "virtualbox" do |v|
config.disksize.size=‘80GB‘
v.memory = 2048
v.cpus = 1
end
vb.vm.host_name = "centos7_hadoop02"
vb.vm.network :public_network, ip: "192.168.56.7"
vb.vm.box = "centos7_hadoop"
end
config.vm.define "centos7_hadoop03" do |vb|
config.vm.provider "virtualbox" do |v|
config.disksize.size=‘80GB‘
v.memory = 2048
v.cpus = 1
end
vb.vm.host_name = "centos7_hadoop03"
vb.vm.network :public_network, ip: "192.168.56.8"
vb.vm.box = "centos7_hadoop"
end
end