1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "centos/7"
config.vm.provider "vmware_fusion" do |v| v.vmx["memsize"] = "254" v.vmx["numvcpus"] = "1" end
config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--memory", "254"] v.customize ["modifyvm", :id, "--cpus", "1"] end
#ip需要跟虚拟机里默认分配的IP段,需要到虚拟机里查看 #config.vm.network :private_network, ip: "10.0.2.18" #桥接网络,可以跟本地wifi通网段 #config.vm.network "public_network", :bridge => "en0: Wi-Fi (Airport)", :ip => "192.168.31.21" config.vm.network "public_network", :bridge => "en0: Wi-Fi (Airport)", :ip => "192.168.180.21"
#按照docker容器的预处理命令 config.vm.provision "shell", privileged: true, path: "./setup.sh" end
|