Bug 1695377 - Shared folders no longer mount when booting Fedora 29 Virtual Machine under Mac OS 64-bit.
Summary: Shared folders no longer mount when booting Fedora 29 Virtual Machine under M...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: virtualbox-guest-additions
Version: 29
Hardware: x86_64
OS: Mac OS
unspecified
high
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-03 00:37 UTC by E. Lewis
Modified: 2019-05-03 19:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-04 17:12:15 UTC


Attachments (Terms of Use)

Description E. Lewis 2019-04-03 00:37:08 UTC
Description of problem:
Shared folders do not mount when booting Fedora 29 virtual machine with 5-series kernels: 5.0.3, 5.0.4, 5.0.5. Shared folders mount automatically when booting with kernel 4.20.16.

Version-Release number of selected component (if applicable):
Virtual Box Guest Additions 6.0.4.

How reproducible:
Always.

Steps to Reproduce:
1. Upgrade Fedora 29 from a version that uses default kernel 4.20.16 to any of the 5-series kernels.
2. Restart the upgraded virtual machine.
3. Attempt to access shared folders.

Actual results:
Folders are not being shared, they are inaccessible. It is also (newly under new kernel) necessary to manually resize the display to fill the entire window. This resizing used to be automatic.

Expected results:
Shared folders are accessible.

Additional info:
I originally thought this was a VirtualBox problem; I filed a bug under their site. It was not as I removed the upgraded Fedora 29 vdi, and replaced it with a backed up version of Fedora.vdi which had the 4.20.16 kernel.
This relates to previously reported and closed Tickets 1576585 and 1576832 which have been closed.
Manually installing the Guest Additions , e.g. navigate to the Guest Additions mount and then run ./VBoxLinuxAdditions.run does not work, failing with a message; modprobe vboxsf failed. I also tried recommendations of installing akmod-VirtualBox which did nothing. I insured that the kernel-headers were up to date and matching the kernel series numbers. I also tried manually mounting the shared folders, e.g. sudo munt -t vboxsf <shared folder> <folder for mounting> which was unsuccessful, resulting in an error: /sbin/mount.vboxsf: mounting failed with the error: Invalid Argument. Note that a file /sbin/mount.vboxsf indeed exists on my virtual machine.

Comment 1 Sergio Monteiro Basto 2019-04-03 01:02:35 UTC
Now it more easy you just need install akmod-VirtualBox from RPMFusion [1] after run akmods-shutdown (to compile all kmods ) 

mount -t vboxsf automountname directory should work , you don't need /sbin/mount.vboxsf 


[1]
dnf install kernel-devel-$(uname -r) akmod-VirtualBox

Comment 2 Michael Thayer 2019-04-03 06:39:04 UTC
VirtualBox developer here.  The "modprobe vboxsf failed" message is usually a false positive.  Please try with the version of the Guest Additions which comes with VirtualBox to see if this is a Fedora or a VirtualBox issue.  What was the number of your VirtualBox ticket?

Comment 3 E. Lewis 2019-04-03 19:51:48 UTC
Ticket 18533 on VirtualBox.
As far as I can tell, this is a Fedora issue. I am able to access shared folders and everything else when running Fedora, Kernel 4.10.16. I also can access shared folders without issue when using unrelated operating systems (Microsoft Windows XP, Microsoft Windows 7). It is when using Fedora, Kernel 5.0.3 and up that I cannot access.
None of the recommendations made by the VirtualBox folks worked for me when trying to resolve.
I am using the Guest Additions made available through the VirtualBox installation.
Thanks for your help.

Comment 4 Sergio Monteiro Basto 2019-04-03 22:50:58 UTC
(In reply to E. Lewis from comment #3)
> Ticket 18533 on VirtualBox.
> As far as I can tell, this is a Fedora issue. I am able to access shared
> folders and everything else when running Fedora, Kernel 4.10.16. I also can
> access shared folders without issue when using unrelated operating systems
> (Microsoft Windows XP, Microsoft Windows 7). It is when using Fedora, Kernel
> 5.0.3 and up that I cannot access.

what is your Virtualbox server version ? 

> None of the recommendations made by the VirtualBox folks worked for me when
> trying to resolve.
> I am using the Guest Additions made available through the VirtualBox
> installation.

So is not here, instead use "Guest Additions made available through the VirtualBox installation." Fedora provide a package (virtualbox-guest-additions) that you can install instead. but still not provide vboxsf kernel modules ( for share folder ) that is why you need complete the installation with akmod-VirtualBox from RPMFusion

> Thanks for your help.

With kernel 5.0.x we need a very updated VirtualBox (6.0.x) to build kernel modules on server side and on vm guest side. 

Fedora kernel brings with vboxvideo.ko [2] and vboxguest.ko [1] .
vboxsf.ko depends on vboxguest.ko, so you may delete in-kernel vboxguest.ko [1] build vboxguest.ko and vboxguest.ko from VirtualBox scripts, remove loaded modules and run depmod -a [4], and should work .

Keep in mind that we have two sources for vboxsf.ko and two sources for vboxguest.ko (in-kernel and Virtualbox)
the vboxsf.ko have Virtualbox code and jwrdegoede (or RPMFusion) [3] that works with in-kernel vboxguest.ko 

Hope help you , if something that I not explain well tell me please

[1] /lib/modules/5.0.5-100.fc28.x86_64/kernel/drivers/virt/vboxguest/vboxguest.ko.xz

[2]  
/lib/modules/5.0.5-100.fc28.x86_64/kernel/drivers/staging/vboxvideo/vboxvideo.ko.xz 

[3]
https://github.com/jwrdegoede/vboxsf

[4]
https://rpmfusion.org/Howto/VirtualBox#Upgrade_VirtualBox_version_without_reboot

Comment 5 E. Lewis 2019-04-04 01:45:12 UTC
What is your Virtualbox server version? 6.0.4 r128413 (Qt5.6.3)

Use "Guest Additions made available through the VirtualBox installation." That is what I have tried. I navigate to /run/media/<my user name>/VBox_GAs_6.0.4 and then run ./VBoxLinuxAdditions.run I have done this several times while troubleshooting.

Fedora provide a package (virtualbox-guest-additions) that you can install instead. I ran 'sudo def install VirtualBox-guest-additions' System proclaimed the the package is installed and is of the latest version.

That is why you need complete the installation with akmod-VirtualBox from RPMFusion. I have run 'akmods-shutdown' successfully. System proclaims that mods exist for 5.0.5-200.fc29.x86_64.

The next instructions are getting a little beyond me. I can easily remove /lib/modules/5.0.5-200.fc29.x86_64/kernel/drivers/staging/vboxvideo/vboxvideo.ko.xz but I am uncertain how to build vboxguest.ko and vboxguest.ko from VirtualBox scripts and then remove the loaded modules.

Thanks for your continued patience and help. I am aware that the end of the day, Fedora 29, Kernel 4.20.16 worked perfectly under Virtualbox 6.0.4 and I have been unable to get any of the 5-series kernels to work. I hope this is helpful to the development community.

Comment 6 Sergio Monteiro Basto 2019-04-04 02:16:43 UTC
(In reply to E. Lewis from comment #5)
> What is your Virtualbox server version? 6.0.4 r128413 (Qt5.6.3)
> 
> Use "Guest Additions made available through the VirtualBox installation."
> That is what I have tried. I navigate to /run/media/<my user
> name>/VBox_GAs_6.0.4 and then run ./VBoxLinuxAdditions.run I have done this
> several times while troubleshooting.

try uninstall it , you don't need it , you are mixing up two installations . 


> Fedora provide a package (virtualbox-guest-additions) that you can install
> instead. I ran 'sudo def install VirtualBox-guest-additions' System
> proclaimed the the package is installed and is of the latest version.
> 
> That is why you need complete the installation with akmod-VirtualBox from
> RPMFusion. I have run 'akmods-shutdown' successfully. System proclaims that
> mods exist for 5.0.5-200.fc29.x86_64.
> 
> The next instructions are getting a little beyond me. I can easily remove
> /lib/modules/5.0.5-200.fc29.x86_64/kernel/drivers/staging/vboxvideo/
> vboxvideo.ko.xz but I am uncertain how to build vboxguest.ko and
> vboxguest.ko from VirtualBox scripts and then remove the loaded modules.

Forget , just uninstall ./VBoxLinuxAdditions.run and you don't need remove vboxvideo.ko.xz .

you are installing LinuxAdditions two times, after uninstall ./VBoxLinuxAdditions.run , please verify if virtualBox-guest-additions and aren't affected , it hard to tell what you may do , maybe uninstall all and just reinstall virtualBox-guest-additions + akmod-VirtualBox , you need to ckeck what vbox kmod are loading in kernel since you should have the two versions installed . 





> Thanks for your continued patience and help. I am aware that the end of the
> day, Fedora 29, Kernel 4.20.16 worked perfectly under Virtualbox 6.0.4 and I
> have been unable to get any of the 5-series kernels to work. I hope this is
> helpful to the development community.

Comment 7 E. Lewis 2019-04-04 11:32:35 UTC
Excellent. You got it working! Here is what I did.
navigate to /run/media/<my user name>/VBoxGAs_6.0.4
issue command './VBoxLinuxAdditions.run uninstall'
issue command 'sudo dnf remove virtualbox-linux-additions akmod-VirtualBox'
issue command 'sudo dnf install VirtualBox-linux-additions akmod-VirtualBox'
issue command 'sudo akmods-shutdown'
This command built kmods for 5.0.3, 5.0.4, 5.0.5, taking a couple of minutes.
shut down the Fedora 29 Virtual Machine. (Use GUI or issue command 'sudo shutdown -h now') (I could use the -r flag, but I generally prefer when shutting down to have the machine completely shut down for 15-30 seconds before restarting.)
start the Fedora 29 Virtual Machine.
At this point, the shared folders were visible!
Thanks so much for your help!

Comment 8 Sergio Monteiro Basto 2019-04-04 17:12:15 UTC
I may add this latest instructions to faq wiki page ;) , Thanks for the reporting 

closing as fixed

Comment 9 Mirek Svoboda 2019-05-03 19:42:56 UTC
I am not sure whether this is a right place, but seems very closely related.
The issue is that virtualbox-guest-additions for VirtualBox 6.0 installed from Fedora repository does not fully work out of the box, while for VirtualBox 5.x it worked. What does not work is Virtual Box Shared Folders functionality.
The situation seems as a regression to me. I have been able to make Shared Folders working using a slightly modified commands, already mentioned above. This is much more complicated compared e.g. Ubuntu or Windows 10. What works for me on guest OS Fedora 30 is below.

Situation:
Command 'modprobe vboxsf' says that there is no vboxsf module. Command 'lsmod' shows no vboxsf module.
Attempt to mount shared folder from guest OS fails with message:
"sbin/mount.vboxsf: mounting failed with the error: No such device"

Solution:
RPM Fusion repository must be enabled.
Download ISO from https://download.virtualbox.org/virtualbox/6.0.6/VBoxGuestAdditions_6.0.6.iso, as autodownload from Vbox Manager fails. Mount the ISO and navigate to the mount point.
Run commands:
sudo ./VBoxLinuxAdditions.run uninstall
sudo dnf remove virtualbox-guest-additions
sudo dnf install virtualbox-guest-additions akmod-VirtualBox
sudo akmods-shutdown
After reboot, kernel module vboxsf is now loaded upon boot, listed by lsmod.
And mounting works:
sudo mount -t vboxsf -o rw,uid=1000,gid=1000 share /mnt


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