Skip to content

Instantly share code, notes, and snippets.

@farwydi
Created October 24, 2020 19:24
Show Gist options
  • Save farwydi/ca5bb1e0373179d2cb02fec13a6a7a95 to your computer and use it in GitHub Desktop.
Save farwydi/ca5bb1e0373179d2cb02fec13a6a7a95 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = $box
(1..$num_instances).each do |i|
config.vm.define vm_name = "%s-%01d" % [$instance_name_prefix, i] do |node|
node.vm.hostname = vm_name
node.vm.provider :virtualbox do |vb|
vb.memory = $vm_memory
vb.cpus = $vm_cpus
vb.gui = $vm_gui
vb.linked_clone = true
vb.customize ["modifyvm", :id, "--vram", "8"]
end
ip = "#{$subnet}.#{i+100}"
node.vm.network :private_network, ip: ip
node.vm.provision "shell", inline: "swapoff -a"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment