Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant error: Failed to mount folders in Linux guest

I have a vagrant error. The log as follows:

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /Users/diguage/box/centos
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

I Google it. StackOverflow had the same question:

Vagrant error : Failed to mount folders in Linux guest

I did it as the top answer: here. The different is that I downloaded the VBoxGuestAdditions_4.3.18.iso. But it did not work.

I try the second answer: here. It also did not work.

So, I have to ask the question.

My environment is :

  • Mac OSX 10.10
  • vagrant 1.6.3
  • CentOS release 6.5 (Final)
  • Kernel 2.6.32-431.29.2.el6.x86_64
  • VirtualBox 4.3.18

PS:

I used the box chef / centos-6.5. I first start the box, it was OK. But I sudo yum update,then sudo yum clean, restart the box, export the error.

like image 587
diguage Avatar asked Mar 18 '23 03:03

diguage


1 Answers

Use Following is work fine for me.

vagrant plugin install vagrant-vbguest
like image 145
zhulinpinyu Avatar answered Apr 29 '23 04:04

zhulinpinyu