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.
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.
Try giving gem install vagrant-vbguest and then do an up command to see if your problem goes away
@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 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.
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
Thanks @boekkooi - that helped.
Thanks @boekkooi - Now itยดs working
@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...
major feature not working ... awesome
Thanks @boekkooi - Now itยดs working
$ vagrant plugin install vagrant-vbguest
It is show a error.
$ vagrant up
$ vagrant ssh
In the guest (VM logged).
$ 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
What about 64 bit guests? For me, I needed:
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib64/VBoxGuestAdditions
@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.
@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 the key part is if you needed the "lib64" path or only the "lib" path. As the "lib" path was enough for me.
64 was needed for my existing vms
Thanks @boekkooi! Super helpful.
@dmourati @christofferholmstedt i did not need to use lib64 for my precise64 vm but I also don't X11
Thanks @boekkooi - the fix you posted worked for me as well
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.
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.
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.
Using Vagrant 1.3.5
I 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
@kman007us what is the box you are using?
Have you installed vagrant vbguest plugin?
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).
@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.
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 https://github.com/mitchellh/vagrant/issues/3341#issuecomment-39068048 does.
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 you may just want to try 4.3.8 - that seems to be working just fine!
Thanks for the fix, @boekkooi!
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.
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.
What is the link to download the 4.3.10 guest additions? I'm very confused about all of this
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
@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?
@gmacario Aha - I figured it must have needed some revision numbers after the 4.3.10. Thanks for the link!
@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.
_subscribing as I have the same problem with the vagrant-vbguest
plugin and guest additions_
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 https://github.com/prateepb/kali-mini/commit/77d056db47a8bea88f093156f1bf8ce5f863999b.
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: https://github.com/dotless-de/vagrant-vbguest/issues/117#issuecomment-41927201
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!
@protechig the ETA is blocked by VBox v4.3.11 ETA
@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 :)
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.
@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: https://github.com/mitchellh/vagrant/issues/3341#issuecomment-41927678
Virtualbox 4.3.12 just got released along with new guest additions.
Great! It was about time...
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
@spilth you're likely experiencing a different issue. Does that jenkins user exist out of the box? Or does it get created during provisioning?
@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!
@spilth Thanks for your comments, this was the same issue I had. Had to comment out owner and group and added the mount options.
I stumble upon this issue. Maybe using type: 'nfs'
in your synced_folder configuration can solve the issue.
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 ?
Thanks @boekkooi and @renanvaz - that helped me.
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 :+1:
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.
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
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?
@paomian
hi, I add config.vm.synced_folder ".", "/vagrant", disabled: true
on my Vagrantfile, it worked.
@cloverstd thanks,i will try it soon.
@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
@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.
@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....
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.
Hi I hit this too. There is a nasty bug in Virtual Box 4.3.10 w.r.t.
shared folders and guest extension.
However it is fixed in 4.3.12:
https://www.virtualbox.org/wiki/Changelog
4.3.12:
On Tue, Sep 2, 2014 at 4:44 PM, Darius Kriลกtapaviฤius <
[email protected]> wrote:
I have 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.โ
Reply to this email directly or view it on GitHub
https://github.com/mitchellh/vagrant/issues/3341#issuecomment-54118897.
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?
you can disable the shared folder .. and then re-enable it
or you want this on a permanent fix?
On Fri, Sep 5, 2014 at 11:16 AM, Simon Kaluza [email protected]
wrote:
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?โ
Reply to this email directly or view it on GitHub
https://github.com/mitchellh/vagrant/issues/3341#issuecomment-54558824.
@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?
@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!
Having same issue as everyone else is experiencing. Unfortunate.
Update: Resolved itself after updating to VirtualBox v4.3.16 from virtualbox.org.
Thanks spilth. That fixed the issue for me too.
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:
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.
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
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!
Unfortunately I still have this issue
Using:
Earlier I used VirtualBox 4.3.19 (available here https://github.com/mitchellh/vagrant/issues/4276#issuecomment-63730024). 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.
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
You are not adding vagrant user to admin group but setting his groups to
admin only. Use the flag -a to append:
sudo usermod -aG admin vagrant
Joel Wallis
joelwallis.com
Em 08/12/2014 08:19, "Alexander" [email protected] escreveu:
I had the same issue after installing vagrant-vbguest. Adding vagrant
user to admin group and restarting helped me:inside vagrant vm
sudo usermod -G admin vagrantexit
on host
vagrant reload
โ
Reply to this email directly or view it on GitHub
https://github.com/mitchellh/vagrant/issues/3341#issuecomment-66103225.
@joelwallis I updated the comment like 30 mins ago
@chekunkov, I'm sorry. I read and answered the comment from Gmail :\
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.
vagrant plugin install vagrant-vbguest
(on host) fixed the issue for me, thanks
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?
@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
@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?
@Hesesses Which version of Linux are you using?
@ChrisAntaki http://laravel.com/docs/4.2/homestead
@Hesesses Try replacing yum
with apt-get
(Laravel Homestead uses Ubuntu)
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
@Hesesses Those packages will have different names on Ubuntu's package manager. Wish I could help more.
@ChrisAntaki Thank you for your time! Do you think should I try to update VirtualBox to latest version? I have 4.3.10 now
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.
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
.
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.
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.
@renanvaz thanks!
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.
I have CentOS 6.2 as guest machine and OSX Yosemite as host machine, installing
vagrant plugin install vagrant-vbguest
solved my problem :)
vagrant plugin install vagrant-vbguest
works for me. Ubuntu 14.02 geust, OSX Yosemite host.
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 :-1:
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
~/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
:+1: vagrant plugin install vagrant-vbguest
OS X 10.10 Centos-6.5
:-1: and now it's broken again :disappointed:
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.
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'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.
I had fixed the problem.
for centos 7 guest os, step by step
for ubuntu 14.04 guest os, step by step
uname -r
@hjianhao :+1: your solution fixed the issue for centos 7. Thanks!
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
.
@hijarian it works. thanks
@hjianhao :+1: Thanks! worked great for us on centos 7 as well
@hijarian Your solution works! Many Thanks.
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
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
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
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
@hijarian @isaacperaza :+1:
I'm having issues with the last version of Virtualbox (5.0.8), even with the plugin in vagrant to update the VBoxGuestAdditions automatically.
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.
I have the same issue, i tried all the sugestions from this thread but still no luck.
@hjianhao :+1:
@slave2anubis ... i made solution in a blogpost here http://hackencode.blogspot.com/2015/11/solution-vagrant-cant-mount-shared.html
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.
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.
@budhrg :+1:
xo xo xo. Stop working and Happy New Year!
Hi,I run into this problem too.I use another box and solve it.So I recommend box from https://atlas.hashicorp.com
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...
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.
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
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 :point_up: 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.
In my case it was exactly the number of folders being synced. Thanks @unfulvio!
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
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.is
o
Still unsolved.
Somebody has solution, plz?
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
@Voltol +1
@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
`
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
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)
Thanks hjianhao . Your solution worked out for me
very good
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".
vagrant-vbguest did not work for me and neither the command
$ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
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.
Happened to me with version 5.1.20
. Here's how I fixed it on my Ubuntu VM: gist
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.
Had the same issue with VirtualBox 5.1.20. Now issue is fixed in VirtualBox 5.1.22 release.
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.
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
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.
Still happen on VirtualBox 6.0.8 on Linux Ubuntu 18.04. Downgrade the VBoxGuestAdditions to 5.2.18 in my Ubuntu 18.04 VM works against my VirtualBox 6.0.8 host. Followed this gist for downgrade https://gist.github.com/claudiobizzotto/67dfcf66ebffca58b1075123c2e898f8.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Fix Step by step:
If you not have vbguest plugin, install it:
Run Vagrant
It is show a error.
Login on VM
Fix!
In the guest (VM logged).
Back on the host, reload Vagrant