Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Created May 9, 2016 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-minguez/335256b0026cd87142a65b603de799e1 to your computer and use it in GitHub Desktop.
Save e-minguez/335256b0026cd87142a65b603de799e1 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Number of virtualized CPUs
VM_CPU = ENV['VM_CPU'] || 2
# Amount of available RAM
VM_MEMORY = ENV['VM_MEMORY'] || 6144
# Validate required plugins
Vagrant.configure(2) do |config|
config.vm.box = "rhel-7.2"
config.ssh.insert_key = false
config.vm.define "vm" do |rhel|
rhel.vm.hostname = "myhostname"
rhel.vm.box = "rhel-7.2"
rhel.vm.provision :shell, :path => "prepare_rhel.sh"
rhel.vm.provider "virtualbox" do |v, override|
v.memory = VM_MEMORY
v.cpus = VM_CPU
v.customize ["modifyvm", :id, "--ioapic", "on"]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
rhel.vm.provider "libvirt" do |v, override|
v.memory = VM_MEMORY
v.cpus = VM_CPU
v.driver = "kvm"
#v.machine_virtual_size = 60
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment