gpt4 book ai didi

windows - Vagrant 错误 : Unable to Mount VirtualBox Shared Folders (Guest Additions, vboxsf)

转载 作者:可可西里 更新时间:2023-11-01 12:04:53 24 4
gpt4 key购买 nike

问题

我在 Windows 10 上安装了 Vagrant,因此我可以在虚拟机中创建个人本地开发环境。我读到的关于 Vagrant 的所有内容都说我什至可以启动多个系统并使用 NAT 端口转发测试它们之间的通信。但首先,我只想创建一个开发环境虚拟机,然后再对它的其余部分做太多。

我按照 SitePoint 教程安装了 VirtualBox、Vagrant、PuTTy 和 PuTTYGen:https://www.sitepoint.com/getting-started-vagrant-windows/ .接下来,我在 C: 驱动器上创建了一个 vagrant 项目文件夹,执行了 vagrant init,删除了 Vagrantfile,最后,vagrant init ubuntu/trusty64。然后我执行了 vagrant up,但该过程因错误而失败:

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 命令行的屏幕截图:

Screenshot of Vagrant/VirtualBox error

这是一个文本版本:

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)

我已经尝试过

This post在我的研究中似乎是最有前途的。

不幸的是,所提供的解决方案和提供的任何链接都没有解决问题。我已经尝试了很多东西,但我不是系统管理员(我猜这是解决此问题所需的技能)。尤其令人不安的是,2013/2014 年的许多“解决方案”最近都表明不再有效。这些解决方案讨论了一些与符号链接(symbolic link)不工作有关的事情,安装像 vagrant-vbguest 这样的插件,以及一些关于 vbox 添加不匹配的事情。我真的不明白所有这些,但我尽力了。这是我已经尝试但尚未解决的方法:

  1. vagrant 插件安装 vagrant-vbguest。 Vagrant 显示插件已安装,但我在 vagrant up 上遇到了同样的错误。

  2. 我在研究此问题时阅读的未提供有效解决方案的链接列表。

我的问题

  1. 我怀疑问题出在 VirtualBox,而不是 Vagrant。这是真的吗?

  2. 如何解决此问题以便继续学习本教程?

  3. 自 2014 年左右以来,在 Stack Overflow 上回答的 Vagrant 问题似乎急剧下降。这是什么原因? Vagrant/VirtualBox 是否不再被视为“最佳实践”?是否有更好的解决方案让用户忽略 Vagrant 问题?

再次声明,我不是系统管理员,但我精通技术并且可以遵循技术指导。

最佳答案

vagrant plugin install vagrant-vbguest

这对我不起作用,它似乎与 vagrant 1.9.2 不兼容,我卸载了最新版本的 virtual box (5.1.16) 并使用最新版本的 vagrant 1.9.2 安装了 5.1.12 版本和宅基地,它对我有用。

关于windows - Vagrant 错误 : Unable to Mount VirtualBox Shared Folders (Guest Additions, vboxsf),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42074246/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com