If I deploy my opensuse container with virtualbox, it stopped with the following message.
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 uid=1000,gid=1000,_netdev vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
If I login to the running container and try to mount the folder manually with
sudo mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant
I get the error message
/sbin/mount.vboxsf: mounting failed with the error: No such device
now, I checked if the loaded kernel modules and I found out that the 'vboxsf' module was not loaded
If I run
sudo modprobe -a vboxsf
I got the following message
modprobe: ERROR: module 'vboxsf' is unsupported modprobe: ERROR: Use --allow-unsupported or set allow_unsupported_modules 1 in modprobe: ERROR: /etc/modprobe.d/10-unsupported-modules.conf modprobe: ERROR: could not insert 'vboxsf': Operation not permitted
If I run it like
sudo modprobe -a vboxsf --allow-unsupported
it works and I was able to mount the vagrant folder manually