1. 程式人生 > >解決yum update更新後Vagrant up遇到不能掛載共享目錄/vagrant

解決yum update更新後Vagrant up遇到不能掛載共享目錄/vagrant

故障

vagrant管理的centos虛擬機器在做過 yum -y update 後更新了系統以及核心

然後下一次vagrant up的時候共享目錄不能掛載到/vagrant目錄( /sbin/mount.vboxsf: mounting failed with the error: No such device)

詳細資訊

1234567891011Failed tomount folders inLinux guest.Thisisusually becausethe"vboxsf"filesystem isnotavailable.Please verify thatthe guest
additions are properly installed inthe guest andcan work properly.The commandattempted was:mount-tvboxsf-ouid=`id-uvagrant`,gid=`getent group vagrant|cut-d:-f3`vagrant/vagrantmount-tvboxsf-ouid=`id-uvagrant`,gid=`id-gvagrant`vagrant/vagrantThe error output from the last commandwas:/sbin/mount.vboxsf:mounting
failed with the error:No such device

搜尋資料知道原因是yum update更新了核心,但是沒有更新VirtualBox的連線的問題。

需要執行

1 sudo/etc/init.d/vboxadd setup

修復即可

資料