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

Closed
wsouto opened this Issue Mar 27, 2014 · 151 comments

Comments

Projects
None yet
@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

This comment has been minimized.

Show comment
Hide comment
@jbernard

jbernard Mar 27, 2014

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.

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

This comment has been minimized.

Show comment
Hide comment
@babumuralidharan

babumuralidharan Mar 28, 2014

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

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

@pcfens

This comment has been minimized.

Show comment
Hide comment
@pcfens

pcfens 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.

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

This comment has been minimized.

Show comment
Hide comment
@babumuralidharan

babumuralidharan Mar 28, 2014

@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.

@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

This comment has been minimized.

Show comment
Hide comment
@boekkooi

boekkooi Mar 28, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@analytik

analytik Mar 28, 2014

Thanks @boekkooi - that helped.

Thanks @boekkooi - that helped.

@japiber

This comment has been minimized.

Show comment
Hide comment
@japiber

japiber Mar 28, 2014

Thanks @boekkooi - Now it´s working

japiber commented Mar 28, 2014

Thanks @boekkooi - Now it´s working

@wsouto

This comment has been minimized.

Show comment
Hide comment
@wsouto

wsouto 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 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

This comment has been minimized.

Show comment
Hide comment
@Neo23x0

Neo23x0 Mar 28, 2014

major feature not working ... awesome

Neo23x0 commented Mar 28, 2014

major feature not working ... awesome

@leopoiroux

This comment has been minimized.

Show comment
Hide comment
@leopoiroux

leopoiroux Mar 29, 2014

Thanks @boekkooi - Now it´s working

Thanks @boekkooi - Now it´s working

@renanvaz

This comment has been minimized.

Show comment
Hide comment
@renanvaz

renanvaz Mar 30, 2014

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

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

@felixrabe felixrabe referenced this issue in dotless-de/vagrant-vbguest Mar 30, 2014

Open

Failed to mount folders in Linux guest. #117

@paparomeo

This comment has been minimized.

Show comment
Hide comment
@paparomeo

paparomeo Mar 31, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@dmourati

dmourati 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

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

This comment has been minimized.

Show comment
Hide comment
@christofferholmstedt

christofferholmstedt Apr 1, 2014

@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 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

This comment has been minimized.

Show comment
Hide comment
@dmourati

dmourati 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.

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

This comment has been minimized.

Show comment
Hide comment
@christofferholmstedt

christofferholmstedt Apr 1, 2014

@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 the key part is if you needed the "lib64" path or only the "lib" path. As the "lib" path was enough for me.

@dmourati

This comment has been minimized.

Show comment
Hide comment
@dmourati

dmourati Apr 1, 2014

64 was needed for my existing vms

dmourati commented Apr 1, 2014

64 was needed for my existing vms

@jmacd3

This comment has been minimized.

Show comment
Hide comment
@jmacd3

jmacd3 Apr 1, 2014

Thanks @boekkooi! Super helpful.

jmacd3 commented Apr 1, 2014

Thanks @boekkooi! Super helpful.

@hkim823

This comment has been minimized.

Show comment
Hide comment
@hkim823

hkim823 Apr 1, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@skratchdot

skratchdot Apr 2, 2014

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

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

@yveshwang

This comment has been minimized.

Show comment
Hide comment
@yveshwang

yveshwang Apr 4, 2014

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.

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

This comment has been minimized.

Show comment
Hide comment
@wsouto

wsouto 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.

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

This comment has been minimized.

Show comment
Hide comment
@darrenmonahan

darrenmonahan Apr 7, 2014

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.

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.

@pezholio pezholio referenced this issue in openaustralia/morph Apr 16, 2014

Closed

Running on Mac issues #311

@kevinmeredith

This comment has been minimized.

Show comment
Hide comment
@kevinmeredith

kevinmeredith Apr 16, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@renanvaz

renanvaz Apr 16, 2014

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

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

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

Merged

Packer provisioning for warden compatible boxes #7

gmacario added a commit to gmacario/vagrant-ubuntu1404 that referenced this issue Apr 20, 2014

Add workaround for mount folders in Linux guest
See hashicorp/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

@gmacario gmacario referenced this issue in gmacario/vagrant-ubuntu1404 Apr 20, 2014

Merged

Add workaround for mount folders in Linux guest #1

@niftylettuce

This comment has been minimized.

Show comment
Hide comment
@niftylettuce

niftylettuce Apr 22, 2014

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).

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

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Apr 22, 2014

Member

@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.

Member

mitchellh commented Apr 22, 2014

@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 comment has been minimized.

Show comment
Hide comment
@hijarian

hijarian Apr 22, 2014

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 mitchellh#3341 (comment) does.

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 mitchellh#3341 (comment) does.

@kowal

This comment has been minimized.

Show comment
Hide comment
@kowal

kowal 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.

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

This comment has been minimized.

Show comment
Hide comment
@drpebcak

drpebcak Apr 23, 2014

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

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

@ltutar

This comment has been minimized.

Show comment
Hide comment
@ltutar

ltutar 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.

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.

@slave2anubis

This comment has been minimized.

Show comment
Hide comment
@slave2anubis

slave2anubis Oct 29, 2015

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

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

@skorp

This comment has been minimized.

Show comment
Hide comment

skorp commented Nov 6, 2015

@hjianhao 👍

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

Merged

Add Vagrant for Development #23

@an0nh4x0r

This comment has been minimized.

Show comment
Hide comment
@msandim

This comment has been minimized.

Show comment
Hide comment
@msandim

msandim 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.

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

This comment has been minimized.

Show comment
Hide comment
@alexch

alexch 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.

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

@DanielAron

This comment has been minimized.

Show comment
Hide comment
@the-teacher

This comment has been minimized.

Show comment
Hide comment
@the-teacher

the-teacher Dec 31, 2015

xo xo xo. Stop working and Happy New Year!

xo xo xo. Stop working and Happy New Year!

@adolphlwq

This comment has been minimized.

Show comment
Hide comment
@adolphlwq

adolphlwq Feb 7, 2016

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

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

@unfulvio

This comment has been minimized.

Show comment
Hide comment
@unfulvio

unfulvio 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...

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

This comment has been minimized.

Show comment
Hide comment
@TheMetalCode

TheMetalCode Mar 4, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@unfulvio

unfulvio 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

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

This comment has been minimized.

Show comment
Hide comment
@towens

towens 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.

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

This comment has been minimized.

Show comment
Hide comment
@TheMetalCode

TheMetalCode Mar 4, 2016

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

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

@creamdog

This comment has been minimized.

Show comment
Hide comment
@creamdog

creamdog 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

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

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost 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?

ghost 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

This comment has been minimized.

Show comment
Hide comment
@gkollengode

gkollengode Mar 10, 2016

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

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

@abgaryanharutyun

This comment has been minimized.

Show comment
Hide comment

@Voltol +1

@gordienkotolik

This comment has been minimized.

Show comment
Hide comment
@gordienkotolik

gordienkotolik Apr 26, 2016

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

gordienkotolik commented Apr 26, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@czerasz

czerasz 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

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

@bickerstoff

This comment has been minimized.

Show comment
Hide comment
@bickerstoff

bickerstoff Jun 6, 2016

My setup is roughly LAMP stack with centos 6.4 from puphpet.com; I can give more details if it is desired. My error was similar to the initial post @wsouto made although it revolved around the user not existing.

Here is my error message:

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 www-data`,gid=`getent group www-data | cut -d: -f3`,dmode=775,fmode=774 vflsf_092515h4p5zx /var/www/html
mount -t vboxsf -o uid=`id -u www-data`,gid=`id -g www-data`,dmode=775,fmode=774 vflsf_092515h4p5zx /var/www/html

The error output from the last command was:

id: www-data: No such user
id: www-data: No such user
uid= requires an argument (i.e. uid==<arg>)

I changed the user to vagrant and the group to vagrant as I knew those would exist and was able to pass this issue. (Under synced_folder in config.yaml if you are using puphpet.com's setup)

bickerstoff commented Jun 6, 2016

My setup is roughly LAMP stack with centos 6.4 from puphpet.com; I can give more details if it is desired. My error was similar to the initial post @wsouto made although it revolved around the user not existing.

Here is my error message:

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 www-data`,gid=`getent group www-data | cut -d: -f3`,dmode=775,fmode=774 vflsf_092515h4p5zx /var/www/html
mount -t vboxsf -o uid=`id -u www-data`,gid=`id -g www-data`,dmode=775,fmode=774 vflsf_092515h4p5zx /var/www/html

The error output from the last command was:

id: www-data: No such user
id: www-data: No such user
uid= requires an argument (i.e. uid==<arg>)

I changed the user to vagrant and the group to vagrant as I knew those would exist and was able to pass this issue. (Under synced_folder in config.yaml if you are using puphpet.com's setup)

@exrajeev

This comment has been minimized.

Show comment
Hide comment
@exrajeev

exrajeev Jul 25, 2016

Thanks hjianhao . Your solution worked out for me

Thanks hjianhao . Your solution worked out for me

@hao203

This comment has been minimized.

Show comment
Hide comment
@hao203

hao203 Oct 4, 2016

very good

hao203 commented Oct 4, 2016

very good

@christianbueno1

This comment has been minimized.

Show comment
Hide comment
@christianbueno1

christianbueno1 Mar 17, 2017

I had the same problem in VirtualBox 5.1.16
My Os: Windows 10
vagrant version: 1.9.2
box: ubuntu/trusty32
I am working with a vagrant file provide by Udacity , in the course "Intro to Relational Databases".
I fixed that problem, uninstalling VirtualBox 5.1.16 and then install VirtualBox 5.1.14

vagrant-vbguest did not work for me and neither the command
$ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

I had the same problem in VirtualBox 5.1.16
My Os: Windows 10
vagrant version: 1.9.2
box: ubuntu/trusty32
I am working with a vagrant file provide by Udacity , in the course "Intro to Relational Databases".
I fixed that problem, uninstalling VirtualBox 5.1.16 and then install VirtualBox 5.1.14

vagrant-vbguest did not work for me and neither the command
$ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

@szeitlin

This comment has been minimized.

Show comment
Hide comment
@szeitlin

szeitlin Mar 28, 2017

Same problem on VirtualBox 5.1.10
Vagrant 1.9.1
box: Ubuntu 14.04.5 (trusty)
OS: Mac 10.12.3 (Sierra)

Interestingly, I have a pre-existing Vagrant in another folder, for which symlinking seems to work just fine. The only difference I can easily see is that the box is different.

In my case, changing a configuration file or two (unrelated to any of this) and re-linking seems to have fixed it.

szeitlin commented Mar 28, 2017

Same problem on VirtualBox 5.1.10
Vagrant 1.9.1
box: Ubuntu 14.04.5 (trusty)
OS: Mac 10.12.3 (Sierra)

Interestingly, I have a pre-existing Vagrant in another folder, for which symlinking seems to work just fine. The only difference I can easily see is that the box is different.

In my case, changing a configuration file or two (unrelated to any of this) and re-linking seems to have fixed it.

@claudiobizzotto

This comment has been minimized.

Show comment
Hide comment
@claudiobizzotto

claudiobizzotto Apr 25, 2017

Happened to me with version 5.1.20. Here's how I fixed it on my Ubuntu VM: gist

claudiobizzotto commented Apr 25, 2017

Happened to me with version 5.1.20. Here's how I fixed it on my Ubuntu VM: gist

@Jalle19

This comment has been minimized.

Show comment
Hide comment
@Jalle19

Jalle19 Apr 28, 2017

The Linux guest additions in VirtualBox 5.1.20 are indeed broken, see https://www.virtualbox.org/ticket/16670. I reverted to 5.1.18 to get work done.

Jalle19 commented Apr 28, 2017

The Linux guest additions in VirtualBox 5.1.20 are indeed broken, see https://www.virtualbox.org/ticket/16670. I reverted to 5.1.18 to get work done.

@lokeoke

This comment has been minimized.

Show comment
Hide comment
@lokeoke

lokeoke May 2, 2017

Had the same issue with VirtualBox 5.1.20. Now issue is fixed in VirtualBox 5.1.22 release.

lokeoke commented May 2, 2017

Had the same issue with VirtualBox 5.1.20. Now issue is fixed in VirtualBox 5.1.22 release.

@osmanddas

This comment has been minimized.

Show comment
Hide comment
@osmanddas

osmanddas Dec 19, 2017

As mentioned above, I got the issue resolved by installing vagrant-vbguest ($ vagrant plugin install vagrant-vbguest). Thanks a lot for sharing the solution.

FYI - I didn't face this issue until I had to use multiple vagrant boxes with a shared directory. Never faced it till I was using one virtual box at a time.

As mentioned above, I got the issue resolved by installing vagrant-vbguest ($ vagrant plugin install vagrant-vbguest). Thanks a lot for sharing the solution.

FYI - I didn't face this issue until I had to use multiple vagrant boxes with a shared directory. Never faced it till I was using one virtual box at a time.

@Alexandre1202

This comment has been minimized.

Show comment
Hide comment
@Alexandre1202

Alexandre1202 Jan 26, 2018

The uninstall of vagrant does not delete %HOME_DIR%.vagrant.d but before install other version it is important you do it manually.
I also remove unused directories inside of %HOME_DIR%\VirtualBox VMs and %HOME_DIR%.VirtualBox

The uninstall of vagrant does not delete %HOME_DIR%.vagrant.d but before install other version it is important you do it manually.
I also remove unused directories inside of %HOME_DIR%\VirtualBox VMs and %HOME_DIR%.VirtualBox

@j4c013

This comment has been minimized.

Show comment
Hide comment
@j4c013

j4c013 Feb 5, 2018

Me on Windows running VirtualBox 5.2.6 and Vagrant 2.0.1

When trying to sync a folder, got the vboxsf error message. After performing "vagrant plugin install vagrant-vbguest" on the host the "vagrant up" command caused the VMs to boot nicely. They seem to be able to use the guest additions, building a VirtualBox Guest Additions kernel module.

j4c013 commented Feb 5, 2018

Me on Windows running VirtualBox 5.2.6 and Vagrant 2.0.1

When trying to sync a folder, got the vboxsf error message. After performing "vagrant plugin install vagrant-vbguest" on the host the "vagrant up" command caused the VMs to boot nicely. They seem to be able to use the guest additions, building a VirtualBox Guest Additions kernel module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment