Open mlabour opened 9 years ago
ran into a similar issue myself.
If you haven't already, you may need to rebuild the VirtualBox guest additions:
sudo /etc/init.d/vboxadd setup
Found the above solution here: https://github.com/mitchellh/vagrant/issues/1657
cd /opt/VBoxGuestAdditions-*/init
sudo ./vboxadd setup
This works
Works first time, but fails afterwards. Specially if you need this to work before shell script.
Went for a plugin:
vagrant vbguest plugin
a plugin: vbguest
This may be related to the missing kernel sources in your VM.
See:
So try to install Guest Additions and check the log file for details, e.g. follow these steps and it VBoxLinuxAdditions fails, then check the /var/log/vboxadd-install.log
for more details.
Like @esteban-xrow said, just install Vagrant plugin: vagrant-vbguest, which can keep your VirtualBox Guest Additions up to date.
vagrant plugin install vagrant-vbguest
@kiwenlau YES thank you that worked! vagrant plugin install vagrant-vbguest
thx
I was able to resolve this on bento/centos-7.2 by performing the following:
yum update
yum install kernel-headers kernel-devel
Then reboot the vagrant, and run the following
sudo /opt/VBoxGuestAdditions-*/init/vboxadd setup
So I was fighting with this same issue for quite a while. rcvboxadd
was complaining that I did not have kernel-headers
installed. I am on CentOS 7 with kernel 3.10.0-957.21.2.el7.x86_64
and with just doing a yum install kernel-headers
it was installing the latest of 3.10.0-957.21.3.el7.x86_64
which is a little newer and not matching my current kernel. So I erased the headers with yum and explicitly installed the version that matched my kernel. I also had to reinstall gcc. I then installed my specific kernel version of kernel-devel
. With these now matching my kernel version, I then ran /usr/sbin/rcvboxadd setup
and it finally built everything correctly and started the service up. After that I mounted my HOST folder to my Linux GUEST with: sudo mount -t vboxsf -o rw,uid=1000,gid=1000 REPOS ~/REPOWIN
REPO is the name of the share in the properties of my VM in the Shared Folders section.
I hope this helps someone else out - I could've probably just updated my kernel to the already installed version of kernel-headers
and kernel-devel
- but either way, this small victory is a great way to finish off a Friday.
Hi Getting the following error. Please would you recommend a path to resolution? Thank you
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 /vagrantThe error output from the last command was:
stdin: is not a tty /sbin/mount.vboxsf: mounting failed with the error: No such device