View Issue Details

IDProjectCategoryView StatusLast Update
0000090ContainersGeneralpublic2022-05-06 17:15
ReporterTrevor Cooper Assigned To 
Status newResolutionopen 
Summary0000090: No guest additions in vagrant box for virtualbox provider
DescriptionThe latest RESF Official Vagrant box for Rocky Linux 8.5 virtualbox provider (box version 5.0.0) does not provide working VirtualBox Guest Additions preventing the use of advanced features of VirtualBox such as shared folders.
Steps To Reproduce1. Download Official Rocky Linux Vagrant box for VirtualBox provider
    - `vagrant box add --provider virtualbox --box-version 5.0.0 rockylinux/8`
2. Create default Vagrantfile for the box
    - `vagrant init --box-version 5.0.0 rockylinux/8`
3. Provision a VM in VirtualBox using the downloaded box and generated Vagrantfile
    - `vagrant up`
4. When provisioned vagrant attempts to mount `$PWD` at `/vagrant` inside the VM but fails...
==> default: Mounting shared folders...
    default: /vagrant => /Users/tcooper/boxes/official/rocky8u5
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:

mount: /vagrant: unknown filesystem type 'vboxsf'.
Additional InformationLikely cause...

The kickstart file used to provision the Vagrant box for VirtualBox provider attempts to install VirtualBox guest additions for *running kernel* (and fails) but needs to install guest additions for the kernel installed as a result of network install (which will change as the repo is updated).

Examples from inside VM...

➜ rocky8u5 vagrant ssh
Last login: Fri May 6 16:58:49 2022 from

[vagrant@localhost ~]$ sudo grep -Ei "vbox additions" /root/anaconda-ks.cfg -B1 -A10

# Lets just make sure we have vbox additions installed
sudo dnf -y install kernel-devel gcc make perl elfutils-libelf-devel
wget -O /tmp/vboxadditions.iso
sudo mkdir /media/VBoxGuestAdditions
sudo mount -o loop,ro /tmp/vboxadditions.iso /media/VBoxGuestAdditions
sudo sh /media/VBoxGuestAdditions/
rm /tmp/vboxadditions.iso
sudo umount /media/VBoxGuestAdditions
sudo rmdir /media/VBoxGuestAdditions
sudo dnf -y remove kernel-devel gcc make perl elfutils-libelf-devel

[vagrant@localhost ~]$ find /lib/modules -name "vboxsf*"
[vagrant@localhost ~]$

I have a working box with VirtualBox Guest Additions installed in/via kickstart...

1. Init box
    - `vagrant init tcooper/rockylinux`
2. Provision VM
    - `vagrant up`
3. Verify Guest Additions
➜ rocky8u5 vagrant ssh
[vagrant@localhost ~]$ modinfo -F filename vboxsf

[vagrant@localhost ~]$ mount -t vboxsf
vagrant on /vagrant type vboxsf (rw,nodev,relatime,iocharset=utf8,uid=1000,gid=1000,_netdev)

Please provide repository for PR of the kickstart used to build the working vagrant box for virtualbox provider show above or add/use provided kickstart in this report.
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-05-06 17:15 Trevor Cooper New Issue