Multi-machine setting to start multiple units at the same time with Vagrant It is used when conducting multiple server operation experiments on your own PC.
Vagranfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "server111" do |server|
server.vm.box = "bento/centos-8"
server.vm.hostname = "server111"
server.vm.network "private_network", ip: "192.168.56.111"
server.vm.synced_folder ".", "/vagrant", disabled: true
server.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "512"
end
end
config.vm.define "server112" do |server|
server.vm.box = "bento/centos-8"
server.vm.hostname = "server112"
server.vm.network "private_network", ip: "192.168.56.112"
server.vm.synced_folder ".", "/vagrant", disabled: true
server.vm.provider "virtualbox" do |vb|
vb.gui = false
vb.memory = "512"
end
end
end
Recommended Posts