Category: DevOps

How to Fix the Vagrant Error: Failed to mount folders in Linux guest.

How to Fix: Failed to mount folders in Linux guest


Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

The cause

The cause could be if you upgraded your box.

Solution

vagrant plugin install vagrant-vbguest

How to Fix the Vagrant Error: The guest machine entered an invalid state while waiting for it to boot.

The Vagrant Error

The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again. If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve. For example, if you're using VirtualBox, run `vagrant up` while the VirtualBox GUI is open. The primary issue for this error is that the provider you're using is not properly configured. This is very rarely a Vagrant issue.

The Cause

This is usually an error after running:


vagrant up

It indicates a problem with virtual box itself, you can open virrtualbox and try to run the VM but it will not work.
This is usually the case with a 64-bit pc.

The Solution

Firstly, reboot, enter BIOS and change the virtualization setting (vt) to enabled.

Secondly, go into the virtualbox settings for the (64 bit) vm and update the version of linux it is using.

That is:


right click -> settings -> general -> version -> Choose Linux 2.6 / 3.x / 4.x (64-bit)

That should have sorted the issue.

vagrant-virtualbox-ubuntu-post-title