Vagrant 未知的文件系统类型';vboxsf';漂泊之后

Vagrant 未知的文件系统类型';vboxsf';漂泊之后,vagrant,virtual-machine,virtualbox,vagrantfile,Vagrant,Virtual Machine,Virtualbox,Vagrantfile,我想使用vagrant设置环境,但在vagrant启动后显示错误。这是我的说明书 即时通讯使用: -OS X优胜美地版本10.10.5 -VirtualBox vesion 5.2.6 -流浪汉2.0.1 这是我的流浪档案 Vagrant.configure("2") do |config| config.vm.box = "centos/7" config.vm.network "private_network", ip: "192.168.33.99" config.vm.sy

我想使用vagrant设置环境,但在vagrant启动后显示错误。这是我的说明书

即时通讯使用: -OS X优胜美地版本10.10.5 -VirtualBox vesion 5.2.6 -流浪汉2.0.1

这是我的流浪档案

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.network "private_network", ip: "192.168.33.99" 
  config.vm.synced_folder "./", "/vagrant", type:"virtualbox", :owner => 'apache', :group => 'apache', mount_option: ['dmode=777', 'fmode=755']
end
但是我运行“流浪者”它显示错误如下

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

The error output from the command was:

mount: unknown filesystem type 'vboxsf'
我确实运行了这个代码

vagrant plugin install vagrant-vbguest
vagrant vbguest
vagrant plugin install vagrant-winnfsd
显示错误消息

The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-862.14.4.el7.x86_64
An error occurred during installation of VirtualBox Guest Additions 5.2.6. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Redirecting to /bin/systemctl start vboxadd.service
Job for vboxadd.service failed because the control process exited with error code. See "systemctl status vboxadd.service" and "journalctl -xe" for details.
Unmounting Virtualbox Guest Additions ISO from: /mnt
这个密码呢

vagrant plugin install vagrant-vbguest
vagrant vbguest
vagrant plugin install vagrant-winnfsd
但还是不起作用。有人能帮我吗

即使我能和流浪汉一起度过难关。我无法更新vagrant文件夹中的任何文件和文件夹


我应该怎么做

我相信这是一个符号链接问题,可以通过运行
ln-sf/opt/vboxguestaditions-5.1.20/lib/vboxguestaditions/mount.vboxsf/sbin/mount.vboxsf
来解决。这里还有一张关于这个问题的票,似乎已经解决了。

默认情况下,Vagrant将共享您的项目目录(目录 使用“流浪者”文件)到/vagrant

只需删除此行:

config.vm.synced_folder "./", "/vagrant", type:"virtualbox", :owner => 'apache', :group => 'apache', mount_option: ['dmode=777', 'fmode=755']

我也遇到过同样的问题,但是删除一行类似的代码非常有效。

如果仍然需要使用config.vm.box=“centos/7”,请执行以下操作:

  • 运行命令
    vagrant插件卸载vagrant vbguest
  • 运行命令
    vagrant plugin安装vagrant vbguest——插件版本0.21
  • 替代解决方案:

  • 您只需将config.vm.box=“centos/7”更改为
    config.vm.box=“generic/centos7”
  • 使用此命令卸载插件
    vagrant plugin卸载vagrant vbguest
    (如果已下载)
  • 然后运行命令
    vagrant up
  • 如果不想检查是否正确,请将“自动更新”设置为false 启动此计算机时添加的版本

    config.vbguest.auto_update = false