Skip to content

Instantly share code, notes, and snippets.

@adejoux adejoux/Vagrantfile
Last active Jun 11, 2018

Embed
What would you like to do?
vagrant chef configuration file
#use libvirt
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'libvirt'
VMCOUNT = (ENV['VMCOUNT'] || 1).to_i
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.5.0"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "virtualbox"
# Turn off shared folders
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
# Test vms
VMCOUNT.times do |number|
config.vm.define "vm#{number + 1}" do |config|
config.vm.hostname = "vm#{number + 1}"
# eth1
config.vm.network "private_network", ip: "10.0.0.#{10 + number }"
config.vm.provider "libvirt" do |libvirt|
#use the storage pool named external
libvirt.storage_pool_name = "external"
libvirt.driver = "kvm"
libvirt.memory = 1024
libvirt.cpus = 1
libvirt.nested = true
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.