Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Use the kvm paravirt provider if Virtualbox >= 5.0.0 #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Before launching your Dashbrew environment, you must install VirtualBox and Vagr

* [Vagrant >= 1.6.5](http://www.vagrantup.com/)
* [VirtualBox 4.3.x](https://www.virtualbox.org/)
* Note that installing Virtualbox 5.x is *strongly* recommended for better performance.
* [Vagrant Hosts Provisioner plugin](https://github.com/mdkholy/vagrant-hosts-provisioner) for managing the /etc/hosts file of both the host and guest machines.
* ``$ vagrant plugin install vagrant-hosts-provisioner``

Expand Down
9 changes: 9 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ Vagrant.configure(2) do |config|
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]

# If Virtualbox is version 5.0.0 or higher, enable the kvm paravirtualization
# provider for better performance.
begin
if VagrantPlugins::ProviderVirtualBox::Driver::Meta.new.version >= "5.0.0"
vb.customize ['modifyvm', :id, '--paravirtprovider', 'kvm']
end
rescue Vagrant::Errors::VirtualBoxNotDetected
end
end

# Synced Folders
Expand Down