Vagrant VirtualBox synced folder mounting fails with multiple VM's

159 views Asked by At

We have been experimenting with Vagrant and VirtualBox for a while now. Simulating the whole deployment pipeline provisioning on VM's locally before doing it on production environments.

We have a GIT repo with a vagrant file and Ansible playbooks/roles. In the Vagrant file we define multiple VM's. Altough we globally define the shared folder. Mapping the current project root to /vagrant. If i boot 3 vm's with the command vagrant up vm1 vm2 vm3 this all works fine.

Altough doing a vagrant reload vm1 vm2 vm3 --provision will give me mount errors.

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

We are using the bento/centos-7.3 base box for all of the VM's. I have no problems with reloading when running only a single VM.

I am running Fedora 24. I have the vagrant vbguest plugin installed (0.13.0).

How to poinpoint the problem and is there any way to fix this? Its annoying having to destroy all the VM's and doing a vagrant up each time. As it will have to provision the whole machine again and not only the changed ansible tasks.

0

There are 0 answers