0

I am running Virtualbox 5.1.34 - I have many VMs where mounting shared folder is not a problem. My host machine is a very-capable Dell workstation running Centos 7.

I created a VM from ubuntu-18.04.3-desktop-amd64.iso, the install went fine, I mounted the proper GuestAdditions ISO and installed it, it appeared to be successful.

I have created the shared folder in the Virtualbox control panel and corresponding mount point folder on the VM, both named "v-host" (I've done this many-many times) I shut down and restarted the VM.

I was running:

sudo mount -t vboxsf v-host ~/v-host/

and it returns:

/sbin/mount.vboxsf: mounting failed withe error: No such device or address

I have three Ubuntu 18.04-server VMs (no GUI) that do not have this problem - I installed GuestAdditions, rebooted them and mounting the shared folder works fine.

I also have an Ubuntu 16.04 desktop where shared folder mount works as well. But I can't get 18.04 to work.

Any clues?

1
  • I had a problem like this. I also have many VMs with host shares but with one machine it would not work. So I deleted the share through the management GUI and recreated it accepting all the VirtualBox defaults. (I like to use my own names and mount points but...) It then mounted okay under /media... Something to try? Dec 17, 2019 at 0:41

3 Answers 3

1

Virtualbox 5.1 is too old for modern Linux distributives. It has only support for kernel 4.17. Ubuntu 18.04.3 Desktop has 5.0 kernel.

https://www.virtualbox.org/wiki/Changelog-5.1

But you can install 4.15 kernel in any Ubuntu 18.04 from built in repositories. Or install Ubuntu 18.04.1 Desktop and update it (by default kernel did not upgrades for newer versions).

0

Ubuntu in a VirtualBox Guest VM
Installing guest additions

before installing the Guest Additions
dkms must be installed in the Ubuntu guest OS .

sudo apt-get update
sudo apt-get install dkms

# then install VirtualBox Guest Additions
1
  • I did ALL that. What I discovered at some point in the wee hours of the morning is that there was an error somewhere in the code that caused the Guest Additions build to fail (some VBox log file indicated that a function whose name I don't remember, maybe 'setup_ok()', was expecting 3 arguments but only got two), so that none of the stuff for the vboxfs ever got set up. For some reason that was a problem only with Ubuntu 18.04 desktop, and not a problem with (non GUI) Ubuntu 18.04 server. At that point I went back and set up my desktop VM using Ubuntu 16.04 desktop, and that worked fine.
    – user55836
    Dec 18, 2019 at 17:02
0

My suspicion is that linux distros with kernel version 5 do not play nice with Virtualbox version 5.1.34. Perhaps they do with Virtualbox 6 but I do not have authorization to upgrade Virtualbox on the system in question.

Ubuntu 16.04 desktop has kernel version 4.15 and has no problem installing guest additions. Ubuntu 18.04 and Mint 19.3, both with kernel version 5, report the same error in /var/log/vboxadd-install.log

It appears that the argument list for a macro has changed.

  • excerpts here:

gcc -Wp,-MD,/tmp/vbox.0/r0drv/linux/.memuserkernel-r0drv-linux.o.d . . . . . -c -o /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.o /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.c

/tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.c: In function ‘VBoxGuest_RTR0MemUserIsValidAddr’: /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.c:69:55: error: macro "access_ok" passed 3 arguments, but takes just 2 bool fRc = access_ok(VERIFY_READ, (void *)R3Ptr, 1); ^ /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.c:69:16: error: ‘access_ok’ undeclared (first use in this function) bool fRc = access_ok(VERIFY_READ, (void *)R3Ptr, 1); ^~~~~~~~~ /tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.c:69:16: note: each undeclared identifier is reported only once for each function it appears in scripts/Makefile.build:284: recipe for target '/tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.o' failed

make[2]: * [/tmp/vbox.0/r0drv/linux/memuserkernel-r0drv-linux.o] Error 1 Makefile:1614: recipe for target 'module/tmp/vbox.0' failed make[1]: * [module/tmp/vbox.0] Error 2 /tmp/vbox.0/Makefile.include.footer:85: recipe for target 'vboxguest' failed make: *** [vboxguest] Error 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.