mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
The error output from the command was:
/sbin/mount.vboxsf: mounting failed with the error: No such device
To fix this problem, connect to the virtual machine. (Even though the mounting failed, you can still use ssh connection because vagrant up itself was succeeded. Only mounting failed.)
Then run these commands in the virtual machine with ssh connection:
$ sudo yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
$ sudo /etc/init.d/vboxadd setup
$ sudo yum -y update kernel
If you are using CentOS 7, you don't need to run the second one "$ sudo /etc/init.d/vboxadd setup".
Then reload vagrant:
vagrant reload