Add libvirt provider for Vagrant

This change provides possibility to use vagrant-libvirt
plugin, whichby default uses KVM hypervisor. NFS is used
here for syncing /vagrant directory.

To run Vagrant with libvirt provider:

vagrant up --provider=libvirt

Change-Id: I90383717de1f04a90bdaa18d6eb1561fb77cc061
This commit is contained in:
Michal Rostecki 2015-08-13 08:40:33 +02:00
parent aad885ba88
commit a1c4058dad
1 changed files with 8 additions and 0 deletions

8
vagrant/Vagrantfile vendored
View File

@ -61,6 +61,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--ioapic", "on", "--memory", "1024"]
end
# Example for libvirt:
#
config.vm.provider :libvirt do |libvirt, override|
override.vm.box = "baremettle/ubuntu-14.04"
override.vm.box_url = "https://atlas.hashicorp.com/baremettle/boxes/ubuntu-14.04"
override.vm.synced_folder './', '/vagrant', nfs: true, mount_options: ['rw', 'vers=3', 'tcp']
libvirt.memory = 1024
end
## For masterless, mount your salt file root
config.vm.synced_folder "pillar/", "/srv/pillar/"