-
-
Save jbontech/4ca050ad1bd975bbbc5850dcda4432f4 to your computer and use it in GitHub Desktop.
vagrant chef configuration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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