VirtualBox Ubuntu Guest Additions not installing : modprobe vboxsf failed

33

16

I just installed this software off virtual box, i downloaded the ISO off the official ubuntu website, was the lastest LTS.

I attempted to install Guest Additions using the 'Insert Guest Additions CD Image". Result:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.0 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions 
kernel modules.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find 
out what went wrong
VirtualBox Guest Additions: Running kernel modules will not be replaced 
until the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: modprobe vboxsf failed
Press Return to close this window...

Inside the /var/log/vboxadd-setup.log:

ERROR:

Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

Full version of log file can be found here [?]

Apthos

Posted 2017-11-15T21:28:16.533

Reputation: 331

I'm having the same problems for Ubuntu 17.10 . It's strange, because the logfile has errors, saying that certain files exist, but those files actually do exist – Justin – 2017-11-20T07:26:46.303

1

This answer on askubuntu may have the solution: https://askubuntu.com/a/846142

– Justin – 2017-11-20T07:34:22.600

Note that the modprobe vboxsf failed line is actually a red herring according to this ticket: The message "modprobe vboxsf failed" is just cosmetic, not a real problem, but I agree that it is confusing and should be fixed.

– Rusty Shackleford – 2018-02-06T19:04:01.597

Answers

29

Ok, so this is a known problem. Instead of using the image provided by virtualbox you should just download it trough aptitute sudo apt-get install virtualbox-guest-dkms and if you need the headers download this sudo apt-get install linux-headers-virtual instead of the classic sudo apt-get install linux-headers-$(uname -r).

Cheers

Edit: Changed the {} for () as pointed by @Abdelouahab.

dmb

Posted 2017-11-15T21:28:16.533

Reputation: 1 166

Where did you find this solution? I did try installing virtualbox-guest-dkms. That gave me a shared clipboard, but no ability to share folders. – Justin – 2017-12-05T18:43:18.250

@Justin This did it for me on Lubuntu 14.04, a couple of months ago. – dmb – 2017-12-05T18:49:44.287

there is a tiny error, use $(VAR) instead of $(VAR) when you want to excecute a code as a variable – Abdelouahab – 2018-01-23T14:10:54.123

3So what do you mean by "known problem"? What is the problem? Is somebody working on it? Do you have a link to an issue somewhere? Or did you just mean that you happened to find other questions about the same thing? – thoni56 – 2018-02-01T08:31:08.260

@thoni56 the ticket is https://www.virtualbox.org/ticket/17189 which says it is fixed altho I got this today...

– Ben Creasy – 2018-02-08T02:41:46.643

@thoni56 It's indeed a known problem, with a lot of possible solutions yet they only seem to work on certian conditions. If you follow trought both error logs, when installing guest additions from the iso it will tell you, you lack software, or dependencies. Once your sort that out it will come with other error and so on. Easiest way to solve this is trought Aptitude. – dmb – 2018-02-08T14:29:57.933

I would not recommend installing virtualbox-guest-dkms - that version may not be compatible with your Virtualbox version. You can get the proper VBoxGuestAdditions.iso file at https://download.virtualbox.org/virtualbox/5.2.6/. Also I would not recommend linux-headers-virtual unless you are running linux-image-virtual - see https://askubuntu.com/questions/175495/what-are-the-differences-between-linux-generic-linux-server-and-linux-virtual-k Hopefully this bug will be resolved; related difficulties reported at https://forums.virtualbox.org/viewtopic.php?f=3&t=85186

– Ben Creasy – 2018-02-11T00:28:59.883

Following the above steps and then increasing the video memory in the settings worked for me. – optimus0127 – 2019-03-29T01:34:51.290

10

open the terminal and run sudo reboot.

then try to install again via devices -> Insert Guest Additions CD Image.

worked for me.

Simon

Posted 2017-11-15T21:28:16.533

Reputation: 233

2

I rebooted and tried again - still failed (got an error Unable to insert the virtual optical disk... VBoxGuestAdditions.iso into the machine...) This blog post seems to help

– Atlas7 – 2018-01-15T23:09:18.260

4

in Ubuntu 16.04 I had to reboot the O.S. before installing virtualbox-guest-additions in order to load the correct kernel

Josexato

Posted 2017-11-15T21:28:16.533

Reputation: 41

Yea, got the error, but the latest 6.0.0 directory was under opt, and upon reboot lsmod / modinfo showed that correct version too. – Pysis – 2019-01-02T02:02:04.587

2

A similar problem can occur with VirtualBox 5.2.18 and Linux guests, including Fedora 28, that are running kernel 4.18: Building the Guest Additions will fail with the same error message, "modprobe vboxsf failed", and no vboxsf module output to the /lib/modules folder.

The solution (for now) is to download and install the latest development snapshot of the Guest Additions, version 5.2.97, as explained in a ticket on the VirtualBox site.

The symptom is messages like these appearing in one of the log files written to /var/log by the build process:

/tmp/vbox.0/utils.c: In function ‘sf_init_inode’:
/tmp/vbox.0/utils.c:165:28: error: passing argument 1 of ‘sf_ftime_from_timespec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     sf_ftime_from_timespec(&inode->i_atime, &info->AccessTime);
                            ^~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:53:53: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)

Note the build process can output multiple log files, which means looking at only the latest one (as the message it outputs suggests) is not a reliable way of diagnosing problems. In my case, trying to install the Guest Additions on a headless Fedora server failed with /var/log/vboxadd-setup.log containing only the line

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

The key was to examine the file /var/log/vboxadd-setup.log.1, generated at the same time, which contained the actual error messages from the build, shown above.

user369080

Posted 2017-11-15T21:28:16.533

Reputation:

Very helpful comments. In my case, I ran into an incompatibility of the 4.20 kernel with virtualbox 4.2.22. It should get fixed in the next release: https://www.virtualbox.org/ticket/18183?cversion=0&cnum_hist=2

– Arnout – 2018-12-31T13:14:05.417

0

Ubuntu 16.04.

In the comments to the question there are a bit confusing but useful links.

Same exact problem solved by purging 5.2.8 and installing 5.1.34_Ubuntu r121010 from repo:

$ grep virtualbox /etc/apt/sources.list
deb https://download.virtualbox.org/virtualbox/debian xenial contrib

Installation of guest additions completed without "VirtualBox Guest Additions: modprobe vboxsf failed" error.

sudo purge virtualbox*
sudo apt-add-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox

Thanks to Justin for the link https://askubuntu.com/a/846142 but had to use

sudo apt-get install VirtualBox

rather than

sudo apt-get install VirtualBox-*  

cause the last one gave me a whole mess of tricky unmet dependencies.

someguy123

Posted 2017-11-15T21:28:16.533

Reputation: 11

0

I just downloaded today the Ubuntu 16.04 ISO file and installed it. I also have the latest VirtualBox version.

Trying to install the Guest Additions, I faced the error mentioned originally.

I just did what others said before... with the guest additions ISO still inserted on the VM, I ran:

sudo reboot

After logging in again, I went to the ISO folder:

/media/<ubuntu_username>/VBox_GAs_5.2.8

Then I executed:

sudo ./autorun.sh

The installation finalized without issues.

Gerardo Palazuelos Guerrero

Posted 2017-11-15T21:28:16.533

Reputation: 1

0

I ran into this problem both on Ubuntu & Windows host (Lubuntu Guest), and in both cases, this is what I did.

  1. Unmount the guest additions CD
  2. Shut down virtual machine.
  3. Download the appropriate guest additions CD from Virtualbox website. In my case, it was 5.2 Link:https://download.virtualbox.org/virtualbox/
  4. Go to settings>Storage, and under "controller: ID" option, add an optical drive with the guest additions CD
  5. Reboot your virtual machine.
  6. Once the machine is booted, click Devices>Insert Guest Additions CD image
  7. Cd to the optical drive /media/username/VBox_GAs_5.2
  8. Run sudo sh ./VBoxLinuxAdditions.run

deepak

Posted 2017-11-15T21:28:16.533

Reputation: 1