vagrant fails to mount shared folder after attempted vbguest update [solution]

After hours of StackOverflow dumpster diving, I thought I'd put this solution here in case someone needs it. If you're getting this message from the vagrant-vbguest plugin on startup, where it looks like it detects different guest addition versions twice:

Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.8
VBoxService inside the vm claims: 6.1.32
Going on, assuming VBoxService is correct...
[default] GuestAdditions 6.1.32 running --- OK.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims: 5.2.8
VBoxService inside the vm claims: 6.1.32
Going on, assuming VBoxService is correct...

Followed by:

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.

It may be the guest OS not having the correct headers to build the guest addition. (The plugin won't tell you what the problem is.)

[Solution:](https://stackoverflow.com/a/69185055/784954)

vagrant ssh
-->
sudo apt-get install linux-headers-$(uname -r)
<-- vagrant reload

1 thought on “vagrant fails to mount shared folder after attempted vbguest update [solution]”

Leave a Comment