Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# -*- 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
You can’t perform that action at this time.