Vagrantがmounting failed with the errorで立ち上がらない

エラー内容

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=500,gid=500 vagrant /vagrant

The error output from the command was:

/sbin/mount.vboxsf: mounting failed with the error: No such device

調べてみると、VirtualBox Guest Additionsでエラーが出ているみたいです。

行ったこと

ネットで調べてみると、依存するパッケージをインストールしないといけないみたいです。

# yum -y update kernel
# yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

vagrantを再起動します

vagrant reload

これで無事動きました。