Unable to vagrant up – how to set “providers”
Quick note – Vagrant 1.8.4 and Virtualbox 5.1.X aren’t compatible on MacOS 10.11 (can’t set a provider). Virtualbox 5.0.10 works just fine.
Quick note – Vagrant 1.8.4 and Virtualbox 5.1.X aren’t compatible on MacOS 10.11 (can’t set a provider). Virtualbox 5.0.10 works just fine.
Add vb.customize [“modifyvm”, :id, “–ioapic”, “on”] to the config.vm.provider block inside your Vagrantfile. Looking at the VirtualBox documentation it mentions: “Note Enabling the I/O APIC is required for 64-bit guest operating systems, especially Windows Vista; it is also required if you want to use more than one virtual CPU in a virtual machine.”
I found in another forum that the local Vagrant directory is mounted as “/vagrant” via rsync. This is set in the box itself, you can check by opening C:\Users\{your_username}\.vagrant.d\boxes\debian-VAGRANTSLASH-jessie64\8.2.2\virtualbox\Vagrantfile and see the setting config.vm.synced_folder \ “.”, “/vagrant”, type: “rsync” to get around this I added the following line in my local Vagrantfile config.vm.synced_folder “.”, “/vagrant”, … Read more
UPDATE Aug 31, 2018: See @Starx’s fix below for later versions of Vagrant (1.8 and above) Here is version based on Louis St. Amour’s solution together with Rob Kinyon’s comment about re-exec if a new plugin was installeed, I use it successfully in my own setup: required_plugins = %w(vagrant-share vagrant-vbguest…) plugins_to_install = required_plugins.select { |plugin| … Read more
Since Vagrant 1.8.0 you can forget the ugly hacks from the other answers here. Just use the env option for the shell provisioner (docs). Use it like this in your Vagrantfile: config.vm.provision “shell”, path: “provisionscript.sh”, env: {“MYVAR” => “value”} This will set the environment for the provisioning script only. If you need a persistent environment … Read more
To discard old boxes listed in vagrant global-status (eg. you deleted the folder containing the .vagrant dir from the filesystem) you just need to run: vagrant global-status –prune You might need to remove the Virtual Machine directly from your provider (VMWare, Virtualbox, ..) control interface.
By default Vagrant uses ~/.vagrant.d. Fortunately, vagrant provides an environment variable called VAGRANT_HOME by which you can set vagrant home. Just do the following to change the vagrant home (this only works in the current session) export VAGRANT_HOME=/path/to/vagrant To make it permanent, add this to your ~/.bash_profile (for login shell). Update: VAGRANT_HOME has been added … Read more
Vagrant imports the base box which is located at ~/.vagrant.d/boxes/, like you said. This is where the base boxes are kept. It uses it to start a VM from the clean state. When importing a VM, the responsibility of where to store data files and VM state is up to VirtualBox itself. This is a … Read more
Update Fixed in VirtualBox 5.1.22. (https://www.virtualbox.org/ticket/16670) Original answer In my case a symlink inside the VM was wrong. Log into the VM: $ vagrant ssh Then: $ ls -lh /sbin/mount.vboxsf lrwxrwxrwx 1 root root 49 Apr 19 14:05 /sbin/mount.vboxsf -> /opt/VBoxGuestAdditions-5.1.20/other/mount.vboxsf This link is broken. When you look inside /opt/VBoxGuestAdditions-5.1.20/ you see that the subfolder … Read more
You should use the following command to remove invalid entries from the global index: vagrant global-status –prune