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