windows - Vagrant Windows 10 'hangs"on vagrant up

标签 windows vagrant

我在 Windows 10 上遇到 Vagrant(1.8.1,使用 VirtualBox 5.0.20)的问题。

当我遵循入门教程时 https://www.vagrantup.com/docs/getting-started/在我输入 vagrant up 后,我的控制台卡住了:

==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key

它不会继续,我可以看到虚拟机在 VirtualBox 中启动,我可以使用 VirtualBox GUI 使用默认凭据登录,所以虚拟机本身正在运行。

根据 https://www.vagrantup.com/docs/virtualbox/common-issues.html 我应该以管理员身份运行 VirtualBox,并从具有管理员权限的 cmd.exe 执行 vagrant up,但是当我这样做时,我收到消息:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "1b9d4f9b-04d8-48bf-8d16-d3aed99d341b", "--natpf1", "delete", "ssh"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp

这似乎与网络上的 100 多个帖子不同: https://github.com/Varying-Vagrant-Vagrants/VVV/issues/375 因为在上面列出的输出之后我没有感到厌烦,所以它只是坐在那里,大约 10 分钟后它出现了消息:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

我也读过 Vagrant stuck in "Waiting for VM to Boot"但这对我没有帮助。

这里还有什么我想念的吗?

最佳答案

在我的例子中,vagrant up 卡在 'Syncing VM folder' 上,在带有 Vagrant 1.9.3 和 VBox 5.1.18 的 Windows 7 上。原来它需要Powershell >= 3.0。 我是从https://www.google.ca/search?q=powershell+3.0+download&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=x0fdWLfsBubQXu2OorAD下载的,之后工作正常。

关于windows - Vagrant Windows 10 'hangs"on vagrant up,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37068939/

相关文章:

c++ - windows.h 的 Beep() 的更快替代品

windows - 如何在我的 htdocs 中链接到 Windows 上的另一个文件夹?

windows - 有什么办法可以半自动提交吗?

ubuntu - 无法从主机操作系统访问 Vagrant VM 中的 Elasticsearch 2.0

Vagrant:如何将文件夹从访客同步回主机?

c++ - 为什么 Windows 的 gflags 不会因这段代码而崩溃?

windows - 在 Visual Studio Code 中运行 Golang

macos - Vagrant 插件和 nokogiri 安装问题

virtualbox - Vagrant 启动了错误的 VirtualBox

macos - 使用 Vagrant 获取 shell 脚本问题和失败