I am trying to create a virtual machine using chef/centos-6.5 base image. I am getting the following error:
Vagrant::Errors::LinuxMountFailed: 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 /v
agrant
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
My version of virtualbox is 4.3.26 and the guest additions on my machine are 4.3.26. The guest additions on the centos-6.5 base image are 4.3.8.
This fails during vagrant up and vagrant reload.
I have tried the solution at http://stackoverflow.com/questions/22717428/vagrant-error-failed-to-mount-folders-in-linux-guest but it simply does not work.
I was having similar problems with a chef/centos-7.0 box when calling vagrant reload. I was able to fix it by installing the vagrant-vbguest plugin: vagrant plugin install vagrant-vbguest. Also, manually updating your guest additions on the centos image to 4.3.26 might fix it as well
@ntfc installing the vagrant-vbguest plugin has not been successful. By the nature of my work, I need to create these machines without any manual interaction. I was able to get my machines working by downgrading my VirtualBox software to version 4.3.8 but I do not think that this was a good solution. It still won't work for vagrant reload that way.
I get the same error and nothing that I have found so far seems to help. I have a Windows 8 system and running Vbox 4.3.26 for Centos 6.5
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 /sbin/mount.vboxsf -o uid=`id -u vagrant`,gid=`getent group wnbdev | cut -d: -f3`,d mode=775,fmode=664 vagrant-root /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g wnbdev`,dmode=775,fmode=664 va
I have tried every suggestion that I have found. Can anyone help?
@jeannekeassa I unfortunately had to downgrade the version of virtualbox that I am using and download a Centos box that had the same guest additions. Not a good solution in anyway but I have also just about tried everything to actually fix this.
Thanks. I will try downgrading, but am not sure what version would work.
Try downgrading to a version of VirtualBox that matches the guest additions of your Centos.
Thanks. I haven’t had a chance to get back to it. I hadn’t used vagrant for a while, so what I did was to upgrade my VBox first. Then I started running into the guest addition problem, so I made the guest additions match the Vbox. However, I may actually be using the wrong Centos for my project as well. In the meanwhile we just updated our live server, so I may need to redo everything on my PC anyway.
@jeannekeassa try doing:
config.vbguest.auto_update = false
Let me know if this works for you!
Thanks. Unfortunately our servers and version of Centos was just updated, so I need to redo my vagrant stuff yet again.
I will try this and let you know.
(Closing since the circumstances changed, let us know if you have more details)
Ok. Thanks
I solved this problem after tried several ways by upgrading VBoxGuestAdditions. The one with this problem is 4.3.10, I upgraded it to 5.0.2 (virtualbox as well).
I upgraded everything, virtualbox on 5.0.2, but I get the error...
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
I had the same problem and this stack overflow solution worked for me: http://stackoverflow.com/a/27992355
Essentially, run "sudo /etc/init.d/vboxadd setup" in the guest.
Thanks @caboteria , I tried that but got failed. I had to downgrade my Virtual box from version 5.0.2 to 4.3.20 (even 4.3.30 didn't work)
this error is still occurring with Vagrant 1.8 and Virtualbox 5.0.14, option for me was to downgrade or move to VMWare
@caboteria your suggestion of running sudo /etc/init.d/vboxadd setup worked perfectly for me with a CentOS 6.7 guest.
I'm running Virtualbox 5.0.14
hey guys,
found out that for me the issue was mounting too many shared folders -- this was not easy to understand from the error that Vagrant gave
I had a VM/Vagrant Box/Vagrantfile where I'd mount over 70 folders. If I reduced their amount vagrant up did just fine. I switched to NFS instead of vboxf and the problem disappeared. It will work with either Virtualbox 4.3 or 5.0.x
I'm seeing the same problem with a fedora 23 box. Here's the deal in my case.
tail /var/log/vboxadd-install.log
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
$uname -r
4.4.6-301.fc23.x86_64
$dnf list _kernel_
Last metadata expiration check: 0:37:09 ago on Wed Apr 13 16:35:52 2016.
Installed Packages
kernel.x86_64 4.2.3-300.fc23 @anaconda
kernel.x86_64 4.4.6-301.fc23 @updates
kernel-core.x86_64 4.2.3-300.fc23 @anaconda
kernel-core.x86_64 4.4.6-301.fc23 @updates
kernel-headers.x86_64 4.4.6-301.fc23 @updates
kernel-modules.x86_64 4.2.3-300.fc23 @anaconda
kernel-modules.x86_64 4.4.6-301.fc23 @updates
....
So it looks like a newer kernel was installed at some point. So I removed the old kernel:
sudo dnf remove kernel-4.2.3-300.fc23.x86_64 kernel-core-4.2.3-300.fc23.x86_64
I also noticed that the kernel-devel wasn't installed for the 4.4.6 kernel because it's not in /usr/src/kernels
sudo dnf install kernel-devel
Then i tried start guest additions:
sudo ./vboxadd start
Starting the VirtualBox Guest Additions FAILED
sudo modprobe vboxguest
modprobe: FATAL: Module vboxguest not found in directory /lib/modules/4.4.6-301.fc23.x86_64
If you look in /lib/modules for the current kernel, the vboxguest module isn't installed.
cd /usr/src/vboxguest-5.0.12
sudo make install
vagrant reload
That did it.
So it looks like the vbox additions were installed into the older kernel but when the kernel
was updated vagrant got confused because the module wasn't installed into the newer kernel. So it
basically barfs when you have to actually USE the guest additions (mounting folders).
In my case I'm not sure if this was cause by a 'dnf update *' to get the box current. So I'm not
sure if this was the .box file creator or me.
_EDIT_
So I have in fact verified that for my case It was because I ran a 'dnf update *' and got a new kernel during provisioning. This allows the box to be brought up the first time, but subsequent 'reload' get the exact error as above regarding mounting the shared folders.
@ bikbajwa your solution worked for me.
Vagrant 1.8.2
VirtualBox 5.1.16
VirtualBox Additions 5.0.32 (already installed in the ubuntu VM I am trying to use)
Kept getting:
GuestAdditions versions on your host (5.1.16) and guest (5.0.32) do not match.
Causing the issue of not being able to use share folders...
Downgraded VirtualBox to match Expected Additions from the VM I use (5.0.32) and everything worked!
Make sure disable or allow your firewall and antivirus software to allow network transaction I spent many hours to get this :)
Make sure disable or allow your firewall and antivirus software to allow network transaction I spent many hours to get this :)
Can you please share the step please. I feel I am facing the same issue.
Make sure disable or allow your firewall and antivirus software to allow network transaction I spent many hours to get this :)
Can you please share the step please. I feel I am facing the same issue.
I'm using Eset antivirus. it's firewall block the file mounting. try disable all virus guards and firewalls.
what is your virus guard please share the screenshot if u can
Make sure disable or allow your firewall and antivirus software to allow network transaction I spent many hours to get this :)
Can you please share the step please. I feel I am facing the same issue.
I'm using Eset antivirus. it's firewall block the file mounting. try disable all virus guards and firewalls.
what is your virus guard please share the screenshot if u can
Thanks..it worked after i disabled my firewall settings for HyperV :-)
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
I was having similar problems with a chef/centos-7.0 box when calling
vagrant reload. I was able to fix it by installing the vagrant-vbguest plugin:vagrant plugin install vagrant-vbguest. Also, manually updating your guest additions on the centos image to 4.3.26 might fix it as well