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 vagrant /vagrant The error output from the command was: mount: unknown filesystem type 'vboxsf'
可能你们在使用vagrant的时候常常遇到以上提示,这个时候只是共享目录没法使用,虚拟机已经在运行了ubuntu
vagrant ssh # 进入虚拟机
下面是我处理的方法,贴出来与你们分享;centos
如下的方案都须要进入虚拟机里面执行ssh
sudo apt-get update sudo apt-get install virtualbox-guest-utils
以上两条代码,ubuntu系统我就处理好了。ui
sudo yum update sudo yum install gcc sudo yum install kernel-devel exit #退出虚拟机 vagrant halt # 关闭虚拟机
sudo find / -name VBoxGuestAdditions.iso
mount /dev/cdrom /cdrom #(该cdrom是我在/目录下建立的文件夹)
cd /cdrom; sh ./VBoxLinuxAdditions.run
vagrant up
这个时候再次启动,应该就不会再报这个错误了、、、spa