From a1c4058dade694bdbca946c884e98c308317f8e1 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Thu, 13 Aug 2015 08:40:33 +0200 Subject: [PATCH] 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 --- vagrant/Vagrantfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 9f7f0b7..d58ba74 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -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/"