"vagrant up" fails on "Checking for guest additions in VM..."

Vagrant fails to install Virtual Box additions after new vagrant box CentOS releases are published

When CentOS publishes a new release support for the previous release is removed from the mirror servers so attempting to build virtualbox guest additions can fail as the correct kernel headers are not available for the running kernel. You can get around this problem by telling Vagrant to not update the OS by adding these lines to your Vagrantfile.

 

# Stop updates to avoid centos base issue
config.vbguest.auto_update = false

 

This also has the added bonus of speeding up vagrant provisioning.

 

Reviewed by DJV - 03-26-2021