Bug 1576832 - virtualbox-guest-additions does not mount shared folder
Summary: virtualbox-guest-additions does not mount shared folder
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virtualbox-guest-additions
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1576585 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-10 13:41 UTC by Cezary Zemis
Modified: 2019-09-09 18:04 UTC (History)
8 users (show)

Fixed In Version: virtualbox-guest-additions-5.2.12-1.fc28
Clone Of:
Environment:
Last Closed: 2018-05-21 14:03:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
system logs from booting time (177.17 KB, text/plain)
2018-05-10 14:48 UTC, Cezary Zemis
no flags Details

Description Cezary Zemis 2018-05-10 13:41:19 UTC
Description of problem:
VirtualBox Guest Addition does not mount a permanent shared folder exported by the host

Version-Release number of selected component (if applicable):
virtualbox-guest-additions-5.2.10-1.fc28.x86_64
the host runs Fedora 27 and VirtualBox-5.2-5.2.10_122088_fedora26-1.x86_64 

How reproducible:
always

Steps to Reproduce:
1. on a host configure a permanent shared folder to a Fedora 28 guest
2. start or reboot the guest
3.

Actual results:
The shared folder is not mounted. In guest system log there is the following error message:
May 10 15:10:15 localhost.localdomain VBoxService[718]: 00:00:00.525649 automount Error: vbsvcAutoMountWorker: Could not mount shared folder 'pasiasty' to '/media/sf_pasiasty': No such device (19)

On host, in the VM's log there is the following line:
00:00:02.814077 SharedFolders host service: Adding host mapping
00:00:02.814097     Host path '/mnt/SSD02e/home/pasiasty', map name 'pasiasty', writable, automount=true, create_symlinks=false, missing=false

Expected results:
The shared folder should be mounted to /media/<userid>/sf_<foldername> if a logged in user belongs to vboxsf group

Additional info:

Comment 1 Hans de Goede 2018-05-10 13:45:55 UTC
The problem is that the Fedora 28 kernel includes the vboxvideo and vboxguest drivers as those are part of the mainline kernel now. But the vboxsf driver has not been merged into the mainline kernel yet (this is being worked on).

A version of vboxsf compatible with the mainline kernel version of vboxguest is available in rpmfusion, follow the instructions for enabling rpmfusion-free here:
https://rpmfusion.org/Configuration

And then do:

dnf install akmod-VirtualBox

And reboot, after that things should work.

Comment 2 Cezary Zemis 2018-05-10 14:47:03 UTC
Unfortunately, still does not work, however with different error message:

May 10 16:16:20 localhost.localdomain kernel: 00:00:00.123637 automount vbsvcAutoMountWorker: Shared folder 'pasiasty' already is mounted!
May 10 16:16:20 localhost.localdomain VBoxService[714]: 00:00:00.123637 automount vbsvcAutoMountWorker: Shared folder 'pasiasty' already is mounted!

This is a bit misleading, because the shared volume is not mounted anywhere.

Comment 3 Cezary Zemis 2018-05-10 14:48:17 UTC
Created attachment 1434420 [details]
system logs from booting time

Comment 4 Sergio Basto 2018-05-12 02:41:57 UTC
*** Bug 1576585 has been marked as a duplicate of this bug. ***

Comment 5 Sergio Basto 2018-05-12 02:53:26 UTC
(In reply to Evangelos Foutras from comment #76)
> @Hans Do you know if the upstream fix for VBoxServiceAutoMount and
> vboxsf.mount will support both pre-4.16 and current kernels? (Or if it's
> going to support mainline vboxsf only.)
> 
> Supporting both in VBoxServiceAutoMount seems somewhat straightforward
> (current Arch Linux workaround at [1]), but mount.vboxsf is more tricky. In
> my hacky patch linked below, I just print a message to use `mount -cit`
> instead. A problem with this approach, however, is that there's no way (that
> I can see) to disable the helper from within fstab entries.
> 
> If the upstream solution is going to be in line with Fedora's (only
> supporting option strings for mounting), then we might as well roll with
> that in Arch Linux. Seems like it was an easy decision for Fedora 28 since
> only Linux 4.16 has to be supported, but we also ship the latest LTS kernel
> (and Manjaro even ships almost all kernels found on kernel.org :O).
> 
> [1]
https://git.archlinux.org/svntogit/community.git/tree/trunk/010-linux-4.16-mount-fixes.patch?h=packages/virtualbox

@Evangelos moving your question to here, I built new vbox release (5.2.12) on RPMFUsion and I added some fixes to akmods (to not build old vboxguest) . 

Now I'm going build new release on Fedora and I will check if we should include 010-linux-4.16-mount-fixes.patch. 

Thanks for the reports .

Comment 6 Evangelos Foutras 2018-05-12 05:02:40 UTC
I'm not terribly happy with 010-linux-4.16-mount-fixes.patch; mainly because it doesn't work with /etc/fstab entries. In Arch, we could remove the mount.vboxsf helper (like Fedora does) but then we'd lose support for pre-4.16 kernels.

Ideally the vboxsf module shipped with VirtualBox Guest Additions would start accepting an options string like mainline vboxsf does. After that, VBoxServiceAutoMount and mount.vboxsf (if it still exists) would transparently work with either bundled or mainline vboxsf. :\

Comment 7 Sergio Basto 2018-05-12 05:43:56 UTC
(In reply to Evangelos Foutras from comment #6)
> I'm not terribly happy with 010-linux-4.16-mount-fixes.patch; mainly because
> it doesn't work with /etc/fstab entries. In Arch, we could remove the
> mount.vboxsf helper (like Fedora does) but then we'd lose support for
> pre-4.16 kernels.
> 
> Ideally the vboxsf module shipped with VirtualBox Guest Additions would
> start accepting an options string like mainline vboxsf does. After that,
> VBoxServiceAutoMount and mount.vboxsf (if it still exists) would
> transparently work with either bundled or mainline vboxsf. :\

Are you aware of "our" patch ? [1]

[1] 
https://src.fedoraproject.org/rpms/virtualbox-guest-additions/blob/master/f/0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch

Comment 8 Evangelos Foutras 2018-05-12 07:09:41 UTC
(In reply to Sergio Monteiro Basto from comment #7)
> Are you aware of "our" patch ? [1]
> 
> [1] 
> https://src.fedoraproject.org/rpms/virtualbox-guest-additions/blob/master/f/
> 0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch

I would switch to that if Arch was to support only Linux 4.16 (and later) + mainline vboxsf in guest VMs. Otherwise, it can't be used for older kernels with the vboxsf module from VirtualBox Guest Additions. Same issue as with removing mount.vboxsf basically.

Comment 9 Sergio Basto 2018-05-12 19:29:23 UTC
(In reply to Evangelos Foutras from comment #8)
> (In reply to Sergio Monteiro Basto from comment #7)
> > Are you aware of "our" patch ? [1]
> > 
> > [1] 
> > https://src.fedoraproject.org/rpms/virtualbox-guest-additions/blob/master/f/
> > 0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch
> 
> I would switch to that if Arch was to support only Linux 4.16 (and later) +
> mainline vboxsf in guest VMs. Otherwise, it can't be used for older kernels
> with the vboxsf module from VirtualBox Guest Additions. Same issue as with
> removing mount.vboxsf basically.

I triple check and 0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch works on Centos 7 vm ( kernel 3.10 )

Comment 10 Fedora Update System 2018-05-13 01:01:16 UTC
virtualbox-guest-additions-5.2.12-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-df01c86e0a

Comment 11 Fedora Update System 2018-05-13 22:22:32 UTC
virtualbox-guest-additions-5.2.12-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-df01c86e0a

Comment 12 Fedora Update System 2018-05-21 14:03:39 UTC
virtualbox-guest-additions-5.2.12-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Luiz Kill 2018-07-10 16:40:06 UTC
It still doesn't work for me, even after installing virtualbox-guest-additions-5.2.12-1.fc28. What am I missing here?

Comment 14 Sergio Basto 2018-07-10 22:55:55 UTC
(In reply to Luiz Kill from comment #13)
> It still doesn't work for me, even after installing
> virtualbox-guest-additions-5.2.12-1.fc28. What am I missing here?

yes, please read https://bugzilla.redhat.com/show_bug.cgi?id=1576585#c1

Comment 15 Sergio Basto 2018-07-11 00:13:40 UTC
(In reply to Sergio Monteiro Basto from comment #14)
> (In reply to Luiz Kill from comment #13)
> > It still doesn't work for me, even after installing
> > virtualbox-guest-additions-5.2.12-1.fc28. What am I missing here?

(*) you are missing this link [1] , please read the way that you have to build vboxsf.ko

[1]
https://bugzilla.redhat.com/show_bug.cgi?id=1576585#c1

Comment 16 Gerhart Steiner 2018-10-02 11:39:47 UTC
(In reply to Hans de Goede from comment #1)
> The problem is that the Fedora 28 kernel includes the vboxvideo and
> vboxguest drivers as those are part of the mainline kernel now. But the
> vboxsf driver has not been merged into the mainline kernel yet (this is
> being worked on).
> 
> A version of vboxsf compatible with the mainline kernel version of vboxguest
> is available in rpmfusion, follow the instructions for enabling
> rpmfusion-free here:
> https://rpmfusion.org/Configuration
> 
> And then do:
> 
> dnf install akmod-VirtualBox
> 
> And reboot, after that things should work.

Thank you very much - installing akmod-VirtualBox works perfect for me :-D

Comment 17 Juan Simón 2019-09-09 13:00:44 UTC
Following this guide: https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/ works installing the "official" virtual-guest-additions.

Comment 18 Sergio Basto 2019-09-09 16:44:25 UTC
(In reply to j1simon from comment #17)
> Following this guide:
> https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-
> additions-on-fedora-centos-red-hat-rhel/ works installing the "official"
> virtual-guest-additions.

if-not-true-then-false doesn't even know that we already have a package in Fedora called virtualbox-guest-additions , so if you follow it , I can't help you .

if you want use virtualbox-guest-additions package provide by Fedora you shouldn't download iso and run vboxconfig , all should work out of the box 

for example: https://bugzilla.redhat.com/show_bug.cgi?id=1695377#c7

Comment 19 Juan Simón 2019-09-09 17:19:19 UTC
(In reply to Sergio Monteiro Basto from comment #18)
> (In reply to j1simon from comment #17)
> > Following this guide:
> > https://www.if-not-true-then-false.com/2010/install-virtualbox-guest-
> > additions-on-fedora-centos-red-hat-rhel/ works installing the "official"
> > virtual-guest-additions.
> 
> if-not-true-then-false doesn't even know that we already have a package in
> Fedora called virtualbox-guest-additions , so if you follow it , I can't
> help you .

In my case, the version in Fedora repositories of virtual-guest-additions is 6.0.10 and it isn't the same that the VirtualBox installed in my host system: 6.0.12

By other side, I've followed the steps in https://bugzilla.redhat.com/show_bug.cgi?id=1695377#c7 and it doesn't work for me: 
Command 'modprobe vboxsf' says that there is 'vboxsf' module but it isn't loaded upon boot. So the automount doesn't work.

> if you want use virtualbox-guest-additions package provide by Fedora you
> shouldn't download iso and run vboxconfig , all should work out of the box 

I don't download any iso, the guest-additions is installed in host by default.

Comment 20 Sergio Basto 2019-09-09 18:04:13 UTC
the packages still in testing repos [1]  And reboot, after that things should work. 


dnf install akmod-VirtualBox virtualbox-guest-additions --enablerepo=updates-testing  --enablerepo=rpmfusion-free-updates-testing


Note You need to log in before you can comment on or make changes to this bug.