search by tags

for the user

adventures into the land of the command line

vagrant vboxguestadditions prob-lame-os

Have you seen this before?

$ vagrant up
.
.
[bambam] GuestAdditions versions on your host (4.3.28) and guest (4.3.30) do not match.
.
.
No package kernel-devel-2.6.32-573.7.1.el6.x86_64 available.
.
.
Building the main Guest Additions module                   [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
.
.
.
==> bambam: Mounting shared folders...
    bambam: /vagrant => /Users/bambam/Vagrant/bambam/
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=500,gid=500 vagrant /vagrant

The error output from the command was:


…so lame…

Well once I tried this and it worked.

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

Not this time, so I had to log into the box and check the guest additions symlink was in the right place.

$ vagrant ssh
[[email protected] ~]$ sudo ln -s /opt/VBoxGuestAdditions-4.3.28/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
[[email protected] ~]# ls -l /usr/lib/VBoxGuestAdditions
lrwxrwxrwx 1 root root 53 Apr  9 17:09 /usr/lib/VBoxGuestAdditions -> /opt/VBoxGuestAdditions-4.3.28/lib/VBoxGuestAdditions

Worked once before, but unfortunately not this time :(
Some guy on stack overflow recommended turning off the auto update by adding this to the Vagrantfile:

config.vbguest.auto_update = false

…Didn’t work. I went over the original output about the failure,,,

No package kernel-devel-2.6.32-573.7.1.el6.x86_64 available.

I check the kernel

[[email protected] ~]$ uname -r
2.6.32-642.6.1.el6.x86_64
[[email protected] ~]$ ls -l /usr/src/kernels/
total 4
drwxr-xr-x. 22 root root 4096 Oct 23 08:24 2.6.32-642.6.1.el6.x86_64

Hmmm…

[[email protected] ~]$ sudo yum list available | grep kernel-devel
kernel-devel.x86_64                            2.6.32-696.el6               base

Hmmmmmmmmm………

[[email protected] ~]$ curl 'ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.7/x86_64/updates/fastbugs/kernel-devel-2.6.32-573.7.1.el6.x86_64.rpm' -o kernel-devel-2.6.32-573.7.1.el6.x86_64.rpm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9.9M  100  9.9M    0     0  2844k      0  0:00:03  0:00:03 --:--:-- 4032k
[[email protected] ~]$ sudo yum install kernel-devel-2.6.32-573.7.1.el6.x86_64.rpm
[[email protected] ~]$ sudo echo $KERN_DIR
/usr/src/kernels/2.6.32-696.el6.x86_64
[[email protected] ~]$ uname -r
2.6.32-573.7.1.el6.x86_64
[[email protected] ~]$ ls -l /usr/src/kernels/
total 12
drwxr-xr-x  22 root root 4096 Apr  9 18:04 2.6.32-573.7.1.el6.x86_64
drwxr-xr-x. 22 root root 4096 Oct 23 08:24 2.6.32-642.6.1.el6.x86_64
[[email protected] ~]$ echo export KERN_DIR=/usr/src/kernels/2.6.32-573.7.1.el6.x86_64 >> ~/.bashrc
[[email protected] ~]$ source ~/.bashrc
[[email protected] ~]$ sudo echo $KERN_DIR
/usr/src/kernels/2.6.32-573.7.1.el6.x86_64

Hhhhhmmmmmmmmmmmmmmmmmm……….

$ vagrant reload
.
.
[bambam] GuestAdditions 4.3.28 running --- OK.
==> bambam: Mounting shared folders...
    bambam: /vagrant => /Users/bambam/Vagrant/bambam
    bambam: /var/www/bambam => /Users/bambam/Vagrant/bambam

HHHHMMMMMMMMMMM!!!!!

On ubuntu/trusty64 shit box

$ vagrant plugin install vagrant-vbguest
$ vagrant ssh
$ sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
$ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
$ sudo apt-get autoremove
$ vagrant reload

==> pewpew: Machine booted and ready!
[pewpew] GuestAdditions versions on your host (5.1.6) and guest (4.3.36) do not match.
virtualbox-guest-utils: unrecognized service
rmmod: ERROR: Module vboxsf is not currently loaded
rmmod: ERROR: Module vboxguest is not currently loaded
Reading package lists...
Building dependency tree...
Reading state information...
Package 'virtualbox-guest-dkms' is not installed, so not removed
Package 'virtualbox-guest-utils' is not installed, so not removed
Package 'virtualbox-guest-x11' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
dkms set to manually installed.
linux-headers-3.13.0-98-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only
Installing Virtualbox Guest Additions 5.1.6 - guest version is 4.3.36
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.6 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.

Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   4.3.36
VBoxService inside the vm claims: 5.1.6
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   4.3.36
VBoxService inside the vm claims: 5.1.6
Going on, assuming VBoxService is correct...
==> pewpew: Setting hostname...