Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vagrant.configure("2") do |config|
- # config.ssh.password is needed for the first time only.
- # config.ssh.* could be commented out after vagrant has replaced insecure key-pair with generated key-pair.
- config.ssh.username = "vagrant"
- config.ssh.password = "vagrant"
- config.vm.box = "debian93docker"
- ######
- # You need to prepare some VirtualBox's network configuration as follows, or manually.
- # (I prefer manually.)
- #
- #config.vm.provider "virtualbox" do |vbox|
- # vbox.customize ["natnetwork", "add", "--netname", "incubator", "--network", "192.168.77.0/24"]
- #end
- multiple_vm(config, "node01")
- multiple_vm(config, "node02")
- end
- def multiple_vm(cfg, vmname)
- cfg.vm.define vmname do |node|
- node.vm.provider "virtualbox" do |vbox|
- vbox.name = vmname
- vbox.customize ["modifyvm", vmname, "--nic2", "natnetwork", "--nat-network2", "incubator"]
- end
- node.vm.hostname = vmname
- end
- cfg.vm.provision "shell", path: "activate-nic2-with-debian93minimal.sh"
- end
Add Comment
Please, Sign In to add comment