Skip to content

Vagrant can't mount shared folder in VirtualBox 4.3.10 #3341

Closed
wsouto opened this Issue Mar 27, 2014 · 141 comments
@wsouto
wsouto commented Mar 27, 2014

I got VirtualBox updated to 4.3.10 via ppa last night (which I'll downgrade to 4.3.8 and disable this PPA so I can manually control upgrades) and Vagrant is failing to mount shared folder with this new version. The guest additions was upgraded too in an already working VM, I also tried to install it in a new VM with no previous guest additions installed but no success...

$ 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: 80 => 8080 (adapter 1)
    default: 3000 => 3000 (adapter 1)
    default: 5432 => 5432 (adapter 1)
    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: Error: Connection timeout. Retrying...
==> default: Machine booted and ready!
GuestAdditions 4.3.10 running --- OK.
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /home/wsouto/Projetos/printo
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
$ lsmod
Module                  Size  Used by
vboxsf                 42558  0 
vesafb                 13500  1 
nfsd                  247847  2 
auth_rpcgss            48552  1 nfsd
nfs_acl                12733  1 nfsd
nfs                   156370  0 
microcode              18894  0 
lockd                  78549  2 nfs,nfsd
sunrpc                230213  6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
fscache                55868  1 nfs
vboxguest             219348  2 vboxsf
ahci                   25579  2 
libahci                26619  1 ahci

It is a problem with VB 4.3.10 for sure, but I'm reporting here to others can know about this issue.

@jbernard

Some additional info: In dmesg you'll see a lot of sf_read_super_aux = -71. This error is generated from the vboxsf kernel module on the guest. It breaks on a Debian 7.4 guest with a 3.2.0 kernel, but not on a Fedora 20 guest with a 3.13 kernel. I suspect there's a bug in the guest modules code but I don't have time to look any further at the moment.

I don't see any mention of this on Virtualbox's Trac, that might be a good place to start.

@babumuralidharan

Try giving gem install vagrant-vbguest and then do an up command to see if your problem goes away

@pcfens
pcfens commented Mar 28, 2014

@babumuralidharan I tried installing that just to be sure, and it didn't make a difference. As @jbernard mentioned, it seems like it's a bug in VirtualBox rather than in Vagrant.

I created vagrant boxes with Ubuntu 12.04, 13.10, and 14.04 and all of them worked fine when v4.3.8 of guest additions were installed, and all failed when v4.3.10 of guest additions were installed. All were running under VirtualBox 4.3.10 on a Linux host.

I submitted a bug report to VirtualBox's trac since there wasn't already one there.

@babumuralidharan

@pcfens guess you did vagrant destroy and then installed this gem and did vagrant up right? it's an issue with virtual box as it needed some guest additions.

@boekkooi

Quick fix is to do the following in the guest:

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

This solution was provided in https://www.virtualbox.org/ticket/12879 so it's not a vagrant bug

@analytik

Thanks @boekkooi - that helped.

@japiber
japiber commented Mar 28, 2014

Thanks @boekkooi - Now it´s working

@wsouto
wsouto commented Mar 28, 2014

@babumuralidharan what do you mean with gem install vagrant-vbguest? vagrant-vbguest is a plugin and it's installed. The output of vagrant up reported above shows it saying that the guest additions is running...

Thanks @boekkooi for found this fix in the VB issues and report it here.

I'm closing this issue since it's a problem with VB. I'm glad that this has led to a solution anyway.
I hope VB fixes that so we don't need to mind with this symbolic link anymore, it's not a big deal tho...

@wsouto wsouto closed this Mar 28, 2014
@Neo23x0
Neo23x0 commented Mar 28, 2014

major feature not working ... awesome

@leopoiroux

Thanks @boekkooi - Now it´s working

@renanvaz

Fix Step by step:

If you not have vbguest plugin, install it:

$ vagrant plugin install vagrant-vbguest

Run Vagrant

It is show a error.

$ vagrant up

Login on VM

$ vagrant ssh

Fix!

In the guest (VM logged).

$ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

Back on the host, reload Vagrant

$ vagrant reload
@paparomeo

For commodity all in a single command line:

vagrant up; vagrant ssh -c 'sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions'; vagrant reload
@dmourati
dmourati commented Apr 1, 2014

What about 64 bit guests? For me, I needed:

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib64/VBoxGuestAdditions

@christofferholmstedt

@dmourati are you sure that you needed that one? ...I have a precise 64 guest and I didn't need the lib64 path. Also note that the bug report for virtualbox at https://www.virtualbox.org/ticket/12879 is about a saucy 64 guest system with a non-lib64 path in the workaround.

For me @renanvaz step-by-step workaround worked like a charm.

@dmourati
dmourati commented Apr 1, 2014

@christofferholmstedt, yes. VirtualBox 4.3.10 broke all my existing Ubuntu 12.04 64 bit VMs. I was already running the vagrant-vbguest. Destroy'ing the vms seems to put the guest additions in the right place.

Also seeing this error:

Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.10. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.

@christofferholmstedt

@dmourati the key part is if you needed the "lib64" path or only the "lib" path. As the "lib" path was enough for me.

@dmourati
dmourati commented Apr 1, 2014

64 was needed for my existing vms

@jmacd3
jmacd3 commented Apr 1, 2014

Thanks @boekkooi! Super helpful.

@hkim823
hkim823 commented Apr 1, 2014

@dmourati @christofferholmstedt i did not need to use lib64 for my precise64 vm but I also don't X11

@skratchdot

Thanks @boekkooi - the fix you posted worked for me as well

@yveshwang

Here's an alternative approach to the one liner symlink fix. This is based on the fixed VBoxGuestAdditions ISO as outlined in https://www.virtualbox.org/ticket/12879

Essentially boils down to copying the fixed ISO to the VirtualBox folder and letting vbguest plugin do its usual magic.

wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso
sudo cp VBoxGuestAdditions_4.3.11-93070.iso /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso

voila. works for all ubuntu vms.

@wsouto
wsouto commented Apr 4, 2014

vbguest plugin here are not happy with version mistmatch between host (4.3.10) and guest additions (4.3.11) and by doing like so, I mean, copying the new guest additions over the old one, everytime you vagrant up the vbguest plugin will recompile the modules.

Maybe, for now, or until a new version of VirtualBox comes out, the best and simple way to handle this is symlinking the directory.

@darrenmonahan

If you continue to get this message on Windows after fixing up your guest additions, it may be related to missing NFS support. Using vagrant-winnfsd currently doesn't work (at least for me) with Vagrant 1.5.1, but may with Vagrant 1.4.3.

@kevinmeredith

Using Vagrant 1.3.5I tried @renanvaz's fix with both
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

and

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib64/VBoxGuestAdditions

on separate runs, but I'm still getting the following when running vagrant reload running either of those commands:

[default] -- /vagrant
Failed to mount folders in Linux guest. This is usually beacuse
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
@renanvaz

@kman007us what is the box you are using?
Have you installed vagrant vbguest plugin?

@sykesm sykesm referenced this issue in cloudfoundry/warden-test-infrastructure Apr 18, 2014
Merged

Packer provisioning for warden compatible boxes #7

@gmacario gmacario added a commit to gmacario/vagrant-ubuntu1404 that referenced this issue Apr 20, 2014
@gmacario gmacario Add workaround for mount folders in Linux guest
See mitchellh/vagrant#3341

This should fix a known issue of VirtualBox 4.3.10

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
2d9be8d
@gmacario gmacario referenced this issue in gmacario/vagrant-ubuntu1404 Apr 20, 2014
Merged

Add workaround for mount folders in Linux guest #1

@niftylettuce

This is still a pretty severe bug, from Ubuntu 13.10 PPA's you can't get vagrant and virtualbox working out of the box with a simple Vagrant setup using Ubuntu 12.04 LTS 64-bit without it crashing with this error (version mismatch etc).

@mitchellh
Owner

@niftylettuce Is this a bug with Vagrant? What could Vagrant do differently? Sorry if I haven't kept up-to-date but the past few comments have made it seem like this is entirely an environmental issue.

@hijarian

This is entirely an environmental issue. Stop talking about the vagrant-vbguest plugin, as all it does is just install the version of Virtualbox Guest Additions equal to the version on the host system. Problem is in Guest Additions version 4.3.10, as with they Vagrant cannot mount shared folders anymore.

Destroying and reloading the box does not help at all. Fix from @pmcnr #3341 (comment) does.

@kowal
kowal commented Apr 23, 2014

I've encountered same issue with VirtualBox 4.3.10 and Vagrant 1.5.4. Workaround for me was to downgrade VB to 4.2.2. I wasn't able to apply fix from @pmcnr because I couldn't ssh into VM.

@drpebcak

@kowal you may just want to try 4.3.8 - that seems to be working just fine!

@Scotchester

Thanks for the fix, @boekkooi!

@gmacario gmacario added a commit to gmacario/vagrant-atlassian that referenced this issue Apr 26, 2014
@gmacario gmacario Add workaround for mount folders in Linux guest
See mitchellh/vagrant#3341

This should fix a known issue of VirtualBox 4.3.10

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

Signed-off-by: Gianpaolo Macario <gmacario@gmail.com>
3524fbe
@Jaace
Jaace commented Apr 26, 2014

I tried to downgrade to 4.3.8 r92456 and I still get the error. Guess I'll just go back to 4.3.10 and try dmourati's fix. The normal one did not work for me:
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
so I'll try
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib64/VBoxGuestAdditions
and the link: wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso is 404-ing.

This is getting tiresome.

@jeremyajohnson

My team also reported the 404 on 4.3.11 Guest Additions. We ended up reverting to 4.3.10 and things are working again...for now.

@Jaace
Jaace commented Apr 26, 2014

What is the link to download the 4.3.10 guest additions? I'm very confused about all of this

@jeremyajohnson

The link in the previous comment. I had this in my Vagrantfile and was working April 17:
https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso

@Jaace
Jaace commented Apr 26, 2014

@jeremyajohnson That's the link for the 4.3.11 guest additions that doesn't work. You mentioned 4.3.10 guest additions. Is there a link for that to download in .iso?

@Jaace
Jaace commented Apr 26, 2014

@gmacario Aha - I figured it must have needed some revision numbers after the 4.3.10. Thanks for the link!

@jeremyajohnson

@Jaace No, I just let the vagrant-vbguest plugin pick that up for me. I used 4.3.11 to workaround a bug (don't remember what, exactly). We also switched to NFS, so maybe it was a bug with the default sync method that isn't an issue with 4.3.10.

@franz-josef-kaiser

subscribing as I have the same problem with the vagrant-vbguest plugin and guest additions

@insprintorob

It also affects Ubuntu 12.04 LTS, the workaround however fixed it. Although technically this is a problem with the vm, I think it would be wise to include a workaround in vagrant, like this one prateepb/kali-mini@77d056d.

@gmacario gmacario added a commit to gmacario/franca_install_automation that referenced this issue Apr 30, 2014
@gmacario gmacario Quick fix to enable vbguest on VirtualBox 4.3.10
See mitchellh/vagrant#3341

Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>
fb4f534
@xiaods xiaods referenced this issue in gocd/go-development-environment-setup Apr 30, 2014
Closed

Came across build errors by setup.sh in mac, we need fix it asap. #9

@xiaods xiaods added a commit to xiaods/go-development-environment-setup that referenced this issue Apr 30, 2014
@xiaods xiaods Quick fix to enable vbguest on VirtualBox 4.3.10 a4d48b3
@xiaods xiaods referenced this issue in gocd/go-development-environment-setup Apr 30, 2014
Closed

Quick fix to enable vbguest on VirtualBox 4.3.10 #10

@gmacario gmacario added a commit to gmacario/franca_install_automation that referenced this issue Apr 30, 2014
@gmacario gmacario Quick fix to enable vbguest on VirtualBox 4.3.10
See mitchellh/vagrant#3341

Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>
836a2c7
@gmacario gmacario added a commit to gmacario/franca_install_automation that referenced this issue May 1, 2014
@gmacario gmacario Quick fix to enable vbguest on VirtualBox 4.3.10
See mitchellh/vagrant#3341

Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>
f6d6f50
@gmacario gmacario added a commit to gmacario/franca_install_automation that referenced this issue May 1, 2014
@gmacario gmacario Quick fix to enable vbguest on VirtualBox 4.3.10
See mitchellh/vagrant#3341

Signed-off-by: Gianpaolo Macario <gianpaolo_macario@mentor.com>
b8f73e3
@t3hpr1m3
t3hpr1m3 commented May 1, 2014

If you're using vagrant-vbguest, I just posted a little snippet I'm using to get around this that doesn't involve any manual intervention during launching/provisioning: dotless-de/vagrant-vbguest#117 (comment)

@protechig

Thanks for everyone's help here, this issue is so frustrating. I understand that this is a Virtual Box issue, but does anyone have an ETA on a fix or even a working hotfix for this?

Thanks!

@xiaods
xiaods commented May 8, 2014

@protechig the ETA is blocked by VBox v4.3.11 ETA

@protechig

@xiaods that's what I figured, it seems that the patch has already been applied, but the vBox team hasn't released anything and have been silent for weeks. Frustrating :)

@CheRuisiBesares

Hey Idk if you guys are still having issues with this but this workaround help me get back to being fully automated after installing the vagrant-vbguest plugin.

So do this locally

 vagrant plugin install vagrant-vbguest

Then setup your Vagrantfile like this

class MyInstaller < VagrantVbguest::Installers::Linux

  def install(opts=nil, &block)
    # this next like is not needed but it doesn't hurt to have all the updates
    communicate.sudo('apt-get update', opts, &block)
    # make sure you don't have the old packages installed
    communicate.sudo('apt-get purge -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11', opts, &block)
    # do normal installation
    super
   # link the files if its version 4.3.10
    communicate.sudo('( [ -d /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions ] && sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions ) || true', )
  end
end

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vbguest.installer = MyInstaller
  # your other stuff here
end

Anyway hope this helps while the Vbox team is waiting to push this change.

@t3hpr1m3

@cruisibesarescondev This is exactly what I posted 2 weeks ago, except you're updating the guest additions, which is a bit redundant, because that's vbguest's sole purpose: #3341 (comment)

@ionutzp ionutzp referenced this issue in ChrisWiegman/Primary-Vagrant May 14, 2014
Closed

Provisioning fails #3

@scalp42
scalp42 commented May 16, 2014

Virtualbox 4.3.12 just got released along with new guest additions.

@gmacario

Great! It was about time...

@spilth
spilth commented May 16, 2014

We just upgraded to VirtualBox 4.3.12 and Vagrant 1.6.2 but still can't seem to mount shared folders.

The guest addition fails to install completely (it's a headless Ubuntu server base box, no X) but says it shouldn't be an issue. Is it possible the Guest Additions install vboxsf 'after' the Window System drivers and when that fails it never gets to install them?

$ vagrant destroy
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'puppet' provisioner...

$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.10.0)'!

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'fadenb/ubnt-quantal-puppet3'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'fadenb/ubnt-quantal-puppet3' is up to date...
==> default: Setting the name of the VM: ubuntu-ci_default_1400262643845_35809
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2202 (adapter 1)
    default: 8080 => 8081 (adapter 1)
    default: 15672 => 15673 (adapter 1)
    default: 9200 => 9201 (adapter 1)
    default: 1521 => 1524 (adapter 1)
    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: Machine booted and ready!
GuestAdditions versions on your host (4.3.12) and guest (4.1.18) do not match.
 * Stopping VirtualBox Additions
   ...done.
ERROR: Module vboxsf does not exist in /proc/modules
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  dkms libdrm-nouveau2 libfontenc1 libgl1-mesa-dri libglapi-mesa libllvm3.1
  libxcomposite1 libxdamage1 libxfixes3 libxfont1 libxkbfile1 libxrandr2
  x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
  xserver-xorg-core
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  virtualbox-guest-dkms* virtualbox-guest-utils* virtualbox-guest-x11*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 10.4 MB disk space will be freed.
(Reading database ... 64264 files and directories currently installed.)
Removing virtualbox-guest-dkms ...

-------- Uninstall Beginning --------
Module:  virtualbox-guest
Version: 4.1.18
Kernel:  3.5.0-41-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxguest.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-41-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxsf.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-41-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxvideo.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0-41-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 4.1.18
completely from the DKMS tree.
------------------------------
Done.
Removing virtualbox-guest-x11 ...
Purging configuration files for virtualbox-guest-x11 ...
Removing virtualbox-guest-utils ...
Purging configuration files for virtualbox-guest-utils ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
dkms set to manually installed.
linux-headers-3.5.0-41-generic is already the newest version.
linux-headers-3.5.0-41-generic set to manually installed.
The following packages were automatically installed and are no longer required:
  libdrm-nouveau2 libfontenc1 libgl1-mesa-dri libglapi-mesa libllvm3.1
  libxcomposite1 libxdamage1 libxfixes3 libxfont1 libxkbfile1 libxrandr2
  x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
  xserver-xorg-core
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 4.3.12 - guest version is 4.1.18
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
An error occurred during installation of VirtualBox Guest Additions 4.3.12. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Mounting shared folders...
    default: /vagrant => /Users/brian/workspace/ubuntu-ci
    default: /var/lib/jenkins => /Users/brian/workspace/ubuntu-ci/jenkins
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 jenkins`,gid=`getent group jenkins | cut -d: -f3` var_lib_jenkins /var/lib/jenkins
mount -t vboxsf -o uid=`id -u jenkins`,gid=`id -g jenkins` var_lib_jenkins /var/lib/jenkins
@drpebcak

@spilth you're likely experiencing a different issue. Does that jenkins user exist out of the box? Or does it get created during provisioning?

@spilth
spilth commented May 16, 2014

@drpebcak Ah, excellent point. You are correct. The jenkins user is created during Puppet provisioning, so it doesn't exist yet. Guess I missed the "usually" in the error message.

We ended up changing this:

config.vm.synced_folder "jenkins/", "/var/lib/jenkins",
    owner: "jenkins", group: "jenkins"

To this:

config.vm.synced_folder "jenkins/", "/var/lib/jenkins",
    {:mount_options => ['dmode=777','fmode=777']}

And now it boots without a problem.

Sorry to interrupt this thread!

@aphofstede

@spilth Thanks for your comments, this was the same issue I had. Had to comment out owner and group and added the mount options.

@joelwallis

I stumble upon this issue. Maybe using type: 'nfs' in your synced_folder configuration can solve the issue.

@marius-c

I've having the same issue no matter if I use centos image or ubuntu. You can see the "ubuntu output" here: http://pastebin.com/KTp9UXrR

Any clue what I might do wrong ?

@grahamrhay grahamrhay referenced this issue in jedi4ever/veewee Jul 1, 2014
Merged

Added symlink to vbox guest additions #961

@mustafatoker

Thanks @boekkooi and @renanvaz - that helped me.

@emag emag referenced this issue in emag/morecat-staging Aug 12, 2014
Closed

Enable the share dir(/vagrant) after reboot #11

@dmaure
dmaure commented Aug 13, 2014

Sorry for my english:
if you see the message:

GuestAdditions Seems to be installed (4.3.12) correctly, but not running.

They can try to run it with

vagrant vbguest --do rebuild

if still does not work you can see the logs in /var/log/vboxadd-install.log
For example to me says:

/ bin / sh: gcc: command not found

so will install the gcc library I run again

vagrant vbguest --do rebuild

and works perfectly 👍

@ollin ollin added a commit to ollin/cd-ws-p that referenced this issue Aug 17, 2014
@ollin ollin dokumentiere ssh server
 - fuer vagrant
 - mit fix fuer mitchellh/vagrant#3341
77f04cd
@cloverstd

I have the save problem. and get the same output.
I try ssh to virtualbox and run

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

I get response

sbin/mount.vboxsf: mounting failed with the error: Protocol error

And I try

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

It worked.

@bradleySuira

Hi, on my mac every work ok, but on windows i has :mount_options => ['nolock,vers=3,udp,noatime'] when i deleted this parameters everything work again

@paomian
paomian commented Sep 2, 2014

on my mac, I get the same problem,the version of vbox is 4.3.14 whit vagrant 1.6.3,should i fix this problem with the same step witch is above?

@cloverstd

@paomian
hi, I add config.vm.synced_folder ".", "/vagrant", disabled: true on my Vagrantfile, it worked.

@paomian
paomian commented Sep 2, 2014

@cloverstd thanks,i will try it soon.

@paomian
paomian commented Sep 2, 2014

@cloverstd it does'n load the share folder?I want to get the folder,and I try to fix it with above you say,but I get the

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

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

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

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

@paomian Do you have installed guest additions?
You can install vagrant-vbguest, and try again.
You can see this article http://hui.lu/vagrant-synced-folders-failed/ , it maybe help you.

@paomian
paomian commented Sep 2, 2014

@cloverstd oh,haha,sorry,I thank it can fix it without install vbguest,thank you,it works!
ps:it spend my so many time to install the nokogiri which is depend of vagrant-vbguest....

@dariuszz123

I had same issue with synced folders. Try add "config.vbguest.auto_update = true" to Vagrantfile. It will install/update vbguest plugin and should solve the issue.

@client9
@SimonKaluza

I've tried installing the vbguest plugin and adding config.vbguest.auto_update = true, but I can't apply it because vagrant up; vagrant ssh -c 'sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions'; vagrant reload won't work as the server crashes on the Vagrant::Errors::SharedFolderCreateFailed. Because this permission error gets thrown during the actual vagrant up step it prevents me from running vagrant ssh since the instance isn't yet running. Quite the chicken/egg problem. Does anyone else have a way to workaround the crash at the initial command?

@kikitux
Collaborator
@SimonKaluza

@kikitux That might be a good workaround for now -- but I am trying to provision the VM with Chef and the provision cannot continue until that folder is mounted so I'll need an automated way/workaround to perform that re-enabling.

How does one re-enable a disabled synced folder after startup? Is there a shell command you can run?

@SimonKaluza

@kikitux I was able to fix the issue by adding an extra config.vm.provision "shell", inline: "chmod 777 #{my_directory}" -- thanks for the help!

@PHLAK
PHLAK commented Sep 10, 2014

Having same issue as everyone else is experiencing. Unfortunate.

Update: Resolved itself after updating to VirtualBox v4.3.16 from virtualbox.org.

@aressler38

Thanks spilth. That fixed the issue for me too.

@cablegunmaster

The issues has to do with the box NSF system not being detected on windows machines. the issue can be resolved with multiple OS setup vagrant file search for the line: 'Setup the synced folder'
replace the lines with:

Setup the synced folder

if Vagrant::Util::Platform.windows?
config.vm.synced_folder ".", "/vagrant",
id: "core",
:nfs => true,
:mount_options => ["dmode=777","fmode=777"]
else
# Use NFS for the shared folder
config.vm.synced_folder ".", "/vagrant",
id: "core",
:nfs => true,
:mount_options => ['actimeo=2']
:mount_options => ['nolock,vers=3,udp,noatime']
end

After this run a vagrant reload and everything works as nomally.

@mcloide
mcloide commented Nov 17, 2014

I had the same issue with VirtualBox 4.3.18 and it happened out of the blue. To fix the only thing I needed to run was:

$ vagrant plugin install vagrant-vbguest

if you have issues with symbolic links after this make sure that these lines are on your VagrantFile:

  config.vm.provider "virtualbox" do |v|
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
  end
@phillpafford

had the same issue with VB 4.3.20, fixed using

$ vagrant plugin install vagrant-vbguest

it installed

GuestAdditions 4.3.20

there was a warning after the installation, i used vagrant halt and then vagrant up, all works!

@gitowiec

Unfortunately I still have this issue
Using:

  • Windows 7 Ultimate 64 bit EN.
  • VirtualBox 4.3.20 (r.96997)
  • Vagrant 1.6.5

Earlier I used VirtualBox 4.3.19 (available here #4276 (comment)). Today I switched to 4.3.20, I did $ vagrant plugin install vagrant-vbguest and also sudo ln -s /opt/VBoxGuestAdditions-4.3.20/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions. That plugin re-installed VBox Addons on guest Ubuntu (Trusty 64bit). But the /sbin/mount.vboxsf: mounting failed with the error: Protocol error issue continues to annoy.

@chekunkov

I had the same issue, nothing changed after installing vagrant-vbguest plugin. Adding vagrant user to admin group and restarting helped me:

# inside vagrant vm
sudo usermod -a -G admin vagrant
exit

# on host
vagrant reload
@joelwallis
@chekunkov

@joelwallis I updated the comment like 30 mins ago

@joelwallis

@chekunkov, I'm sorry. I read and answered the comment from Gmail :\

@dmuth
dmuth commented Jan 3, 2015

Still seeing this happen with Virtualbox 4.3.20 and 4.3.20 of the extension packs with Ubuntu Trusty (14.04) downloaded from https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box.

Well, I have a root cause for why I saw the issue, but it's really mind blowing and maybe I should file a separate bug on it.

As a convenience, I created a symlink to /vagrant/ in my home directory. So my shell script that I used as my provisioner did this:
ln -sf /vagrant .

Seems harmless, but... it was causing my problems. This is strange as the technique worked just fine before.

@ChrisAntaki

vagrant plugin install vagrant-vbguest (on host) fixed the issue for me, thanks

@Hesesses
vagrant plugin install vagrant-vbguest

Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing nokogiri (1.6.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.5'` succeeds before bundling.

Any ideas?

@ChrisAntaki

@Hesesses Installing nokogiri is actually unrelated to this issue. That said - try this.

# Install Nokogiri
sudo yum install gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel -y
# On AWS you may need to use '$ gem install nokogiri -- --use-system-libraries'
gem install nokogiri --use-system-libraries
@Hesesses

@ChrisAntaki
'yum: command not found'

I had everything working, then reloaded the vagrant and getting the 'Failed to mount folders in Linux guest.'

Any other ideas?

@ChrisAntaki

@Hesesses Which version of Linux are you using?

@ChrisAntaki

@Hesesses Try replacing yum with apt-get (Laravel Homestead uses Ubuntu)

@Hesesses
vagrant@homestead:~$ sudo apt-get install gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby-devel
E: Unable to locate package libxml2-devel
E: Unable to locate package libxslt
E: Unable to locate package libxslt-devel
@ChrisAntaki

@Hesesses Those packages will have different names on Ubuntu's package manager. Wish I could help more.

@Hesesses

@ChrisAntaki Thank you for your time! Do you think should I try to update VirtualBox to latest version? I have 4.3.10 now

@stephen-mw

The newest version of vagrant-vbguest (0.10.0) will automatically upload and compile a proper version of guest additions if your host was built without it or improperly.

I personally had to change my packer configuration to create the necessary symlink to prevent this from being recompiled.

@tonkonogov

I have faced with the same trouble. I'm trying to configure a shared folder by smb with win8 as host and ubuntu 14.10 as a guest system.
As it proposed above, I have installed vagrant-vbguest (0.10.0), but have no luck with it, still got that error. But I have found one more workaround: when vagrant up script showed me up a error log, I just removed from that lines a sec=ntlm part and run it again with sudo in ssh.
For example, vagrant give me:

mount -t cifs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,sec=ntlm,username=USER,pass=PASS //172.16.1.142/my_hash /my_mount_point

I remove sec=ntlm in the line and add sudo in order to run it in command line:

sudo mount -t cifs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,username=USER,pass=PASS //172.16.1.142/my_hash /my_mount_point

And it was enough for me, now it works as supposed.

The only question for me - what does exactly the ntlm security option do there? Is it strongly required or may be omitted?
My version of VB and guest additions is 4.3.20.

@dmuth
dmuth commented Jan 27, 2015

Just an update for everyone, I had this start happening out of the blue on my Macbook Pro with CoreOS, using these VagrantFile directives:

config.vm.synced_folder ".", "/home/core/vagrant",
id: "core", :nfs => true, :mount_options => ['nolock,vers=3,udp']

I eventually rebooted my machine, and now it works with no issues.

This suggests that there is an issue in OS/X with regards to how state is kept, which clears out on reboot.

No, we shouldn't have to reboot our machines just to run a VM properly, but it may provide a clue as to the underlying cause.

@mlt
mlt commented Jan 27, 2015

This issue comes up while searching for Invalid argument error from mount.vboxsf. For the sake of completeness another reason that results in failed mount with Windows host might be junction points in NTFS. Start VM only from original folder and not a linked one.

@bakercp bakercp referenced this issue in twobitcircus/rpi-build-and-boot Jan 30, 2015
Closed

/vagrant not mounting (sometimes) #6

@gregsandell

I am on Mac OSX and have found a completely different solution to this problem. I run into it every time I run vagrant halt followed by vagrant up again.

Even though your vagrant up ended in failure, vagrant is running. Go into the ssh with the vagrant ssh command. Then go to all the places where mount points had been previously installed. Those will of course all be empty. Delete all of those directories and run vagrant up again.

@montogeek

I have CentOS 6.2 as guest machine and OSX Yosemite as host machine, installing
vagrant plugin install vagrant-vbguest solved my problem :)

@mikulely

vagrant plugin install vagrant-vbguest works for me. Ubuntu 14.02 geust, OSX Yosemite host.

@Neetuj
Neetuj commented Apr 7, 2015

tried vagrant plugin install vagrant-vbguest, tried $ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

and i am still running into 👎

Failed to mount folders in Linux guest. This is usually beacuse
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
~/office/bm-ansible > vagrant plugin install vagrant-vbguest

@Neetuj
Neetuj commented Apr 7, 2015

~/office/bm-ansible > vagrant --version
Vagrant 1.4.3
~/office/bm-ansible > lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS

geust i am trying to sping is CentOS7.0 x86_64 minimal

@clayreimann

👍 vagrant plugin install vagrant-vbguest OS X 10.10 Centos-6.5

@clayreimann

👎 and now it's broken again 😞

@guillaume-brossard-adsk

This is a nightmare. Every now and then this issue come back, when a new version is released. This is really frustrating.
OSX 10.10.3
Virtual Box 4.3.26
Vagrant 1.7.2

Installing Virtualbox Guest Additions 4.3.26 - guest version is 4.3.20
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.26 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.26 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)

In the log, I can see 2 errors:

grep: /lib/modules/3.10.0-123.el7.x86_64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-123.el7.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/tmp/vbox.0/Makefile.include.header:115: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL=<directory> and run Make again.  Stop.
@rkJun
rkJun commented May 14, 2015

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 have Ubuntu 14.04 (64bit) as guest machine and Windows 7 (64bit) as host machine,
solved my ploblem; by installing vagrant plugin install vagrant-vbguest.

  • I'm using VirtualBox 4.3.26 / vagrant 1.7.2
@richardasaurus

My fix for this was to relocate a folder sync i had configured to sync to /opt/ on the VM, which then wouldn't allow guest additions to live there.

@josephbhunt

I've tried the fixes mentioned above an none of them work. The error message when running vagrant up said to "(Look at /var/log/vboxadd-install.log to find out what went wrong)". Here's what it said.

Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

I'm not sure what to do from here. I'll try upgrading vagrant.

@er-net
er-net commented Jun 2, 2015

I'm trying to create a 'chef/centos-7.0' machine using the "vagrant-vbguest" plugin, and I get an error telling me to look at

/var/log/vboxadd-install.log

and there I see this error:

/tmp/vbox.0/Makefile.include.header:115: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL=<directory> and run Make again.  Stop.

Im running:
Windows 7
Virtual Box 4.3.28
Vagrant 1.7.2

@hjianhao

I had fixed the problem.
for centos 7 guest os, step by step
1. sudo yum update
2. sudo yum install gcc
3. sudo yum install kernel-devel
4. reboot guest os
5. sudo /etc/init.d/vboxadd setup
6. exit guest os and vagrant reload

for ubuntu 14.04 guest os, step by step
1. install kernel headers : sudo apt-get install linux-headers-uname -r
2. download VBoxGuestAdditions_.iso from http://dlc.sun.com.edgesuite.net/virtualbox/, then transfer to you guest os.
3. login to the guest os, mount the ISO : sudo mount VBoxGuestAdditions_.iso /mnt
4. enter the /mnt, and run : sudo ./VBoxLinuxAdditions.run to intall the addtions.
5. exit guest os and vagrant reload

@pruthvis

@hjianhao 👍 your solution fixed the issue for centos 7. Thanks!

@budhrg
budhrg commented Jul 10, 2015

I my case my GuestAddition version in my guest was 4.3.10 but I was using VirtualBox version 4.3.26.
I have Ubuntu 14.04 (64bit) as both host and guest machine.
I solved my ploblem by installing

vagrant plugin install vagrant-vbguest

My vagrant version is vagrant 1.7.2.

@umumpaul
umumpaul commented Aug 4, 2015

@hijarian it works. thanks

@towens
towens commented Aug 6, 2015

@hjianhao 👍 Thanks! worked great for us on centos 7 as well

@xinyuliu-glu

@hijarian Your solution works! Many Thanks.

@WangWenchao

when i migrate virtualbox host from 4.6* to 5.0 met the problem , then on guest ,

/etc/init.d/vboxadd setup

fix the problem

@ltutar
ltutar commented Sep 15, 2015

I have CentOS 6.7 as guest machine and OSX Yosemite as host machine, installing
vagrant plugin install vagrant-vbguest solved my problem
The plug-in took care of the following:
GuestAdditions versions on your host (5.0.4) and guest (4.3.20) do not match.
Installing Virtualbox Guest Additions 5.0.4 - guest version is 4.3.20

@the-teacher

This recipe helped me with Vagrant and Debian 8.1

vagrant ssh
cd /tmp/
wget http://download.virtualbox.org/virtualbox/5.0.4/VBoxGuestAdditions_5.0.4.iso
sudo mount -o loop VBoxGuestAdditions_5.0.4.iso /mnt
sudo /mnt/VBoxLinuxAdditions.run 
exit
vagrant reload
@isaacperaza

Simple and Quick Solution for Failed to mount folders in Linux guest issue.

Add the following line to your Homestead/Vagrantfile:

config.vbguest.auto_update = false

Your Homestead/Vagrantfile should looks like this:

/...

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

   # To avoid install and uninstall VBoxGuessAdditions during vagrant provisioning.
    config.vbguest.auto_update = false

.../

Save it and execute

$ vagrant destroy --force
$ vagrant up
@grndlvl grndlvl referenced this issue in GollyGood/dstack Oct 10, 2015
Closed

Get DHCP Working again #47

@msandim
msandim commented Oct 25, 2015

I'm having issues with the last version of Virtualbox (5.0.8), even with the plugin in vagrant to update the VBoxGuestAdditions automatically.

@ltutar
ltutar commented Oct 26, 2015

with the early version installing the vagrant-vbguest solved my problem. see above. with newer versions I had to uninstall the plugin to get it working again.

@adambarthelson adambarthelson referenced this issue in hashicorp/otto Oct 27, 2015
Closed

otto dev fails on osx #274

@slave2anubis

I have the same issue, i tried all the sugestions from this thread but still no luck.

@skorp
skorp commented Nov 6, 2015

@hjianhao 👍

@ezmiller ezmiller referenced this issue in beavyHQ/beavy Nov 15, 2015
Merged

Add Vagrant for Development #23

@msandim
msandim commented Nov 25, 2015

I solved by problem: the problem was having a folder in a path with special characters (e.g. "º"). After I moved the folder where I was going 'vagrant up', everything worked right.

@alexch
alexch commented Dec 14, 2015

FWIW, this just happened to me using these versions:

Vagrant 1.7.4
VirtualBox 5.0.10
Guest Additions 5.0.10
ubuntu/trusty64 v20151208.1.0

It happened after I ran vagrant box update (which might be a red herring) but after trying all sorts of fixes (like adding vboxsf to /etc/modules, rebuilding the additions manually instead of relying on the vbguest plugin, relinking /usr/lib/VBoxGuestAdditions, etc.), what worked for me was vagrant destroy; vagrant init. Which meant I had to rebuild my guest system, but at least mounting the host dir works again.

@stephenreay stephenreay referenced this issue in dotless-de/vagrant-vbguest Dec 16, 2015
Closed

Installation doesn't satisfy it's own dependencies #184

@the-teacher

xo xo xo. Stop working and Happy New Year!

@adolphlwq

Hi,I run into this problem too.I use another box and solve it.So I recommend box from https://atlas.hashicorp.com

@unfulvio
unfulvio commented Mar 1, 2016

this issue is still occurring with Vagrant 1.8 and Virtualbox 5.0.14 - tried the symlink suggestion mentioned several times in this thread as well as using vbguest plugin, to no avail...

@TheMetalCode

I'm experiencing this today with Vagrant 1.8.1 and Virtualbox 5.0.14, right out of the blue. No solution listed here has helped so far.

@unfulvio
unfulvio commented Mar 4, 2016

hey found out that the issue for me was the number of shared folders

I was working at a setup with over 70 mounted folders - this will trigger that error with VirtualBox 4 or 5 if you use vboxsf - I switched to NFS and the problem solved

it was hard to pin down since the error wasn't pointing in this direction

@towens
towens commented Mar 4, 2016

The important lines that consistently work for us...

In the Vagrantfile

config.vm.provision "shell", path: "cloud_init.sh"
config.vbguest.auto_update = false

In the shell provisioning script

yum update -y
yum install -y kernel-devel.x86_64

Back to the Vagrantfile
config.vbguest.auto_update = true then vagrant reload
Which should get the guest additions on track. Then, one more time
config.vbguest.auto_update = false then vagrant reload

As mentioned ☝️ having the kernel development headers installed before anything else is the trick. Installing the guest additions and syncing folders after has been working on CentOS 6.6 - 7.1.

@TheMetalCode

In my case it was exactly the number of folders being synced. Thanks @unfulvio!

@creamdog
creamdog commented Mar 7, 2016

Encountered this problem with Windows 7, Vagrant 1.8.1 and Virtualbox 5.0.14 and launching Ubuntu/Trusty64

Fixed when updating to Virtualbox 5.0.16

@Voltol
Voltol commented Mar 8, 2016

I'm getting this, tried so many solutions.

Ubuntu 15.10 / Vagrant 1.8.1 / Virtualbox 5.0.16
ubuntu/wily64

mesg: ttyname failed: Inappropriate ioctl for device


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 www-data | cut -d: -f3`,dmode=775, fmode=664 vagrant-B05032-Magento-Box /vagrant-B05032-Magento-Box
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g www-data`,dmode=775, fmode=664 vagrant-B05032-Magento-Box /vagrant-B05032-Magento-Box

vagrant vbguest --status

GuestAdditions 5.0.16 running --- OK.

In vagrant ssh I did

sudo ln -s /opt/VBoxGuestAdditions-5.0.16/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

I replaced VBoxGuestAdditions.iso in tmp

Copy iso fileC:\Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso

Still unsolved.
Somebody has solution, plz?

@gkollengode

Tried all the fixes and none of them worked. This is what has worked for me finally

CentOS release 6.7 box

vagrant ssh
wget  ftp://ftp.pbone.net/mirror/dl.central.org/dl/linuxdev/centos6/x86_64/kernel-devel-2.6.32-431.3.1.el6.x86_64.rpm
sudo yum install kernel-devel-2.6.32-431.3.1.el6.x86_64.rpm -y
wget http://download.virtualbox.org/virtualbox/5.0.4/VBoxGuestAdditions_5.0.4.iso
sudo mount -o loop VBoxGuestAdditions_5.0.4.iso /mnt
sudo /mnt/VBoxLinuxAdditions.run

logout and
vagrant reload

Hope this helps

@gordienkotolik
gordienkotolik commented Apr 26, 2016 edited

@Voltol same on VirtualBox-5.0.18 and vagrant_1.8.1,

`
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:

PASSWORDHIDDENmPASSWORDHIDDENoPASSWORDHIDDENuPASSWORDHIDDENnPASSWORDHIDDENtPASSWORDHIDDEN PASSWORDHIDDEN-PASSWORDHIDDENtPASSWORDHIDDEN PASSWORDHIDDENcPASSWORDH.........

The error output from the last command was:

stdin: is not a tty
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

vagrant vbguest --status
GuestAdditions 5.0.18 running --- OK.

on guest VM:
ls -la /usr/lib/ | grep VBoxGuestAdditions
VBoxGuestAdditions -> /opt/VBoxGuestAdditions-5.0.18/lib/VBoxGuestAdditions
`

@czerasz
czerasz commented May 25, 2016

I had issues mounting the /vagrant directory while using the vagrant-cachier plugin.
See more details here.

Host system: Ubuntu 16.04
Guest system: Ubuntu 14.04.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.