Vagrant can't install guest additions

593 views
Skip to first unread message

Javier gómez

unread,
Feb 4, 2016, 4:16:48 AM2/4/16
to Joomlatools Developers

Hi, not sure if is an error of the Vagrant Box.

  • I have a host machine Mac OSX El Capitan 10.11.3
  • Latest Vagrant 1.8.1
  • VirtualBox 5.0.14

When executing vagrant up I have this error:

screen shot 2016-02-03 at 10 52 42

That ends in:

screen shot 2016-02-03 at 11 03 52

Checking the log file in the guest machine: vagrant ssh and cat /var/log/vboxadd-install.log I see:

Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/5.0.14/source ->
                 /usr/src/vboxguest-5.0.14

DKMS: add completed.
Error! Your kernel headers for kernel 3.19.0-25-generic cannot be found.
Please install the linux-headers-3.19.0-25-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Failed to install using DKMS, attempting to install without
/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.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.


I have already tried Vagrant Destroy and Vagrant up without success.

Have you faced similar situation?

The machine works anyway, is just to know if anyone is facing it.



Yves Dangel

unread,
Feb 16, 2016, 9:03:47 AM2/16/16
to Joomlatools Developers
Hi Javier,

I had something proach due to the fact nfs-kernel-server was not installed on my host.

Maybe the same ...




Steven Rombauts

unread,
Feb 17, 2016, 8:03:09 AM2/17/16
to Joomlatools Developers
Hi Javier,

It looks like you have the vagrant-vbguest plugin to automatically update Guest Additions installed. I just tried it locally and upgrading the Guest Additions to 5.0.14 worked flawlessly. 

Your Guest Additions fail to build because the log states it can't find the linux-headers-3.19.0-25-generic package. On my box however, only linux-headers-3.13.0-53-generic are installed and 5.0.14 did manage to build. You could try to install the missing headers using sudo apt-get install linux-headers-3.19.0-25-generic and see if that helps. Otherwise, I would suggest disabling this plugin and see if things are back to normal if you re-install the box. 

Hope that helps.

Cheers,
Steven

Javier gómez

unread,
Feb 24, 2016, 6:01:35 AM2/24/16
to Joomlatools Developers
Thanks Steven,

I tried:

JAVI:joomlatools-vagrant-basic javiergomez$ vagrant vbguest


No installation found.


stdin: is not a tty


Reading package lists...


Building dependency tree...


Reading state information...


dkms is already the newest version.


linux-headers-3.19.0-25-generic is already the newest version.


0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.


Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso


stdin: is not a tty


mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only


Installing Virtualbox Guest Additions 5.0.14 - guest version is unknown


stdin: is not a tty


Verifying archive integrity... All good.


Uncompressing VirtualBox 5.0.14 Guest Additions for Linux............


VirtualBox Guest Additions installer


Removing installed version 5.0.14 of VirtualBox Guest Additions...


Stopping VirtualBox Additions ...done.


Removing existing VirtualBox DKMS kernel modules ...done.


Removing existing VirtualBox non-DKMS kernel modules ...done.


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


The headers for the current running kernel were not found. If the following


module compilation fails then this could be the reason.




Building the main Guest Additions module ...fail!


(Look at /var/log/vboxadd-install.log to find out what went wrong)


Doing non-kernel setup of the 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 5.0.14. Some functionality may not work as intended.


In most cases it is OK that the "Window System drivers" installation failed.


stdin: is not a tty


Completion was not registered for box:


The 'bash-completion' package is required but doesn't appear to be installed.


Checking the .log file with the error I got:

[11:55 AM]-[vagrant@joomlatools]-[/var/www]


$ cat /var/log/vboxadd-install.log


Uninstalling modules from DKMS


Attempting to install using DKMS




Creating symlink /var/lib/dkms/vboxguest/5.0.14/source ->


                 /usr/src/vboxguest-5.0.14




DKMS: add completed.


Error! Your kernel headers for kernel 3.19.0-25-generic cannot be found.


Please install the linux-headers-3.19.0-25-generic package,


or use the --kernelsourcedir option to tell DKMS where it's located


Failed to install using DKMS, attempting to install without


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


Creating user for the Guest Additions.


Creating udev rule for the Guest Additions kernel module.




Therefore I understand that I need as you said the linux headers. I tried:

[11:55 AM]-[vagrant@joomlatools]-[/var/www]


$ sudo apt-get install linux-headers-3.19.0-25-generic


Reading package lists... Done


Building dependency tree      


Reading state information... Done


linux-headers-3.19.0-25-generic is already the newest version.


0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.


But as you see, seems that they were already installed.

Also I tried installing the bash-completion:

[11:53 AM]-[vagrant@joomlatools]-[/var/www]


$ sudo apt-get install bash-completion


Reading package lists... Done


Building dependency tree      


Reading state information... Done


bash-completion is already the newest version.


0 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.


But seems the same situation. It was already installed.

Do you see anything that I can be missing?

Mike Nelson

unread,
Nov 6, 2017, 10:51:37 AM11/6/17
to Joomlatools Developers
Hi Steven,
It appears that Javier never got a solution to this.
I now have something similar

using MacOS 10.12.4 host. VBox and GuestAdditions 5.1.30. Vagrant 2.0.0. Joomla-tools box

Failed to set up service vboxadd, looked in instal log

more /var/log/vboxadd-install.log

/tmp/vbox.0/Makefile.include.header:112: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

I have tried apt-get update && apt-get upgrade

apt-get install build-essential module-assistant .

That resulted in ' already newest'  /usr/src contains no linux-headers or kernel

Mike Nelson

unread,
Nov 7, 2017, 8:31:53 AM11/7/17
to Joomlatools Developers

Steve Voorhees

unread,
Nov 13, 2017, 4:28:25 PM11/13/17
to Joomlatools Developers
I, too, have been receiving the following:

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 rw,tcp,nolock,noacl,async,uid=1000,gid=1000 var_www /var/www

The error output from the command was:

fmask = umask of regular files


My setup:
Host: Windows 10
VirtualBox version: 5.1.30
Vagrant Version: 2.0.1
joomlatools-box version: 1.5

The box works perfectly with joomlatools-box 1.4.4, but after destroying the box, upgrading joomlatools-box, then attempt a vagrant up, the load starts then the error. It looks like the box is running, just no shared folders.

Steven Rombauts

unread,
Nov 14, 2017, 5:02:02 PM11/14/17
to Joomlatools Developers
Hi Steve,

Sorry to hear you're having issues. Since none of us use Windows machines it is not straightforward for us to properly debug this issue. However, I suspect the mount options we added to the box might be invalid for use on a Windows machine. You could try the following:

1. Halt the box, make sure it's no longer running.
2. Go to the directory where Vagrant stores the box: C:/Users/USERNAME/.vagrant.d/boxes/
3. In that directory, edit the Vagrantfile with Notepad or any other text editor
4. Look for a line that starts with this: config.vm.synced_folder source, target, :nfs => CONF['nfs'],  (somewhere between line #48 and #58 normally)
5. In that line, remove this string: mount_options: ["rw", "tcp", "nolock", "noacl", "async"], - don't forget the comma :)
6. Start the box again with vagrant up command.

This should reset the mount options to default (same as v1.4.4). Please let us know if that works for you.

Cheers,
Steven






--

---
You received this message because you are subscribed to the Google Groups "Joomlatools Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomlatools-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Nelson

unread,
Nov 15, 2017, 4:46:47 AM11/15/17
to Joomlatools Developers
Hi Steven,
The problem that Steve was agreeing with was my post about was mine on a Mac host.
In my case, it looks as if guest additions are not installed correctly.


Failed to set up service vboxadd, looked in instal log

more /var/log/vboxadd-install.log

/tmp/vbox.0/Makefile.include.header:112: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

I tried setting up GuestAdditions manually, still same error

In the joomlatools-box at /usr/src/ there is indeed no kernel source, no kernel headers.

/lib/modules/4.2.0-27-generic/ contains

lrwxrwxrwx 1 root root  39 Jan 22  2016 build -> /usr/src/linux-headers-4.2.0-27-generic

drwxr-xr-x  2 root root    4096 Jan 22  2016 initrd/

drwxr-xr-x 12 root root    4096 Apr  8  2016 kernel/

-rw-r--r--  1 root root 1019813 Nov 10 11:08 modules.alias  . . .

the symlink is wrong

/usr/src now contains  (as well as  joomla stuff) 

lrwxrwxrwx 1 root root 51 Nov 9 17:11 vboxguest-5.1.30 -> /opt/VBoxGuestAdditions-5.1.30/src/vboxguest-5.1.30/

drwxr-xr-x 12 root root     4096 Nov  9 17:44 virtualbox-4.3.36/ 

there are linux headers here:

/usr/share/doc/linux-headers-4.2.0-27  . . .

drwxr-xr-x   2 root root  4096 Apr  8  2016 linux-generic-lts-wily/

 linux-headers-4.2.0-27/ linux-headers-4.2.0-27-generic/

 linux-headers-generic-lts-wily/ linux-image-4.2.0-27-generic/

 linux-image-extra-4.2.0-27-generic/ linux-image-generic-lts-wily/ linux-libc-dev/

When I look in other linux installations, including Scotch-Box, /usr/src is where the headers are

Any advice please.

Mike Nelson

To unsubscribe from this group and stop receiving emails from it, send an email to joomlatools-d...@googlegroups.com.

Steven Rombauts

unread,
Nov 19, 2017, 4:20:10 PM11/19/17
to Joomlatools Developers
Hi Mike,

Yes, you are right, those header files are missing. We remove them when packaging the box to save disk space. However, we also install the Guest Additions before provisioning the box, so these should definitely be present. 

Reinstalling them will fail because of the missing /usr/src files. You can reinstall the files properly using sudo apt-get install --reinstall linux-headers-`uname -r` - that should put everything back in place and have the Guest Additions build again.

To get back to your original error, however, it does sound more like your environment can't work with the new mount options. If you get a chance to test the steps I posted earlier, that could help us rule this out or not.

Cheers,
Steven

Mike Nelson

unread,
Nov 19, 2017, 4:23:07 PM11/19/17
to joomlat...@googlegroups.com
Hi Steven,
thanks for this advice
It will be a couple of days before i can do anything on this
Best wishes
Mike Nelson

--

---
You received this message because you are subscribed to a topic in the Google Groups "Joomlatools Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/joomlatools-dev/H70XolJqMB0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to joomlatools-d...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages