Windows – Vagrant错误:无法挂载VirtualBox共享文件夹(客户添加,vboxsf)

前端之家收集整理的这篇文章主要介绍了Windows – Vagrant错误:无法挂载VirtualBox共享文件夹(客户添加,vboxsf)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
问题

我在Windows 10上安装了vagrant,所以我可以在虚拟机中创建个人本地开发环境。我已经阅读过关于Vagrant的一切,我甚至可以启动多个系统,并测试它们之间的通信与NAT端口转发。但是首先,我只想在开发过程中创建一个开发环境的虚拟机。

我安装了VirutalBox,Vagrant,PuTTy和PuTTYGen,每个SitePoint教程:https://www.sitepoint.com/getting-started-vagrant-windows/.接下来我在C:驱动器上创建了一个vagrant项目文件夹,没有vagrant init,删除了Vagrantfile,最后是vagrant init ubuntu / trusty64。然后我做了流氓,但是进程失败了,错误

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:

: No such file or directory

以下是Windows命令行的屏幕截图:

这是一个文本版本:

C:\vagrant\sitepoint-test-2017-02-05>vagrant up
Bringing machine 'default' up with 'virtualBox' provider...
==> default: Importing base Box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if Box 'ubuntu/trusty64' is up to date...
==> default: A newer version of the Box 'ubuntu/trusty64' is available! You currently
==> default: have version '20160602.0.0'. The latest is version '20170202.0.0'. Run
==> default: `vagrant Box update` to update.
==> default: Setting the name of the VM: sitepoint-test-2017-02-05_default_1486399403587_55255
==> default: Clearing any prevIoUsly set forwarded ports...
==> default: Clearing any prevIoUsly set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => C:/vagrant/sitepoint-test-2017-02-05
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:

: No such file or directory

我的设置

OS: Microsoft Windows [Version 10.0.14393]
VirtualBox Version: 4.3.10 r93012
GuestAdditions Version: ???
Vagrant Version: 1.9.1 (Latest)
PuTTy Version: 0.67
PuTTYGen Version: 0.67

插件&已安装扩展

Vagrant:
- vagrant-share (1.1.6,system)
- vagrant-vbguest (0.13.0)

查询了什么

这个SO帖子在我的研究中似乎是最有希望的:
Vagrant error : Failed to mount folders in Linux guest

不幸的是,没有提供任何解决方案,也没有提供任何解决方案的问题。我已经尝试了一大堆东西,但我不是系统管理员(我猜这是你需要解决这个问题的技巧)。特别令人担忧的是,2013-04年度的许多“解决方案”最近被表示不再工作了。这些解决方案谈论与符号链接不起作用的事情,安装诸如vagrant-vbguest之类的插件,以及关于不匹配的vBox addtions的内容。我真的不明白这一切,但我尽了最大的努力。这是我已经尝试的还没有解决的问题:

vagrant插件安装vagrant-vbguest。 Vagrant将插件显示为已安装,但是我在vagrant上收到相同的错误
>链接列表我在研究这个问题中提供了没有提供工作的解决方案。

> Vagrant unable to mount in Linux guest with VirtualBox Guest Additions on Windows 7
> Vagrant – How can I mount the virtualbox shared folder? (“vboxsf” not available)
> https://github.com/mitchellh/vagrant/issues/3341#issuecomment-144271026
> https://www.virtualbox.org/ticket/12879(这个VirtualBox票是在其他列出的一些链接中的海报引用的,不幸的是,这张票不能解决问题,它不是固定的,还是坏了…或者也许这张票是相关的,但是与我和其他人仍在经历的问题略有不同)。
> https://gist.github.com/fernandoaleman/5083680
> VAGRANT SHARED FOLDERS DO NOT MOUNT – Windows 7 – Vagrant 1.7.4 – Ubuntu 12.04 precise64 – VirtualBox 5.0.10 with Guest Additions

我的问题

我怀疑问题是与VirtualBox,而不是Vagrant。这是真的?
>我如何解决这个问题,以便我可以继续教程?
>自2014年以来,Stack Overflow的Vagrant问题似乎大幅下降。这是什么原因? Vagrant / VirtualBox不再被认为是“最佳实践”吗?有没有更好的解决方案,所以用户忽略了Vagrant的问题?

再次,我不是系统管理员,但是我技术上很聪明,如果逐步给出,可以遵循技术指导。

任何帮助是赞赏。

VirtualBox 5.1.18中解决了这个问题。

猜你在找的Windows相关文章