Vagrant Windows 10'挂起'在流浪者身上

时间:2016-05-06 09:32:26

标签: windows vagrant

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

在我输入vagrant up后,当我按照入门教程https://www.vagrantup.com/docs/getting-started/进行操作时,我的控制台一直停留在:

==> 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内部看到VM启动,我可以使用VirtualBox GUI使用默认凭据登录,因此VM本身正在运行。

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

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",但它对我没有帮助。

我还缺少什么吗?

3 个答案:

答案 0 :(得分:2)

在我的情况下,在使用Vagrant 1.9.3和VBox 5.1.18的Windows 7上,“同步VM文件夹”上出现了vagrant up。事实证明它需要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下载的,之后工作得很好。

答案 1 :(得分:1)

尝试从VirtualBox或命令行关闭VM

C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe controlvm default poweroff

然后从vagrant重新启动VM。 如果在关闭VM时出现错误,请强制关闭

C:\Progra~1\Oracle\VirtualBox\VBoxManage.exe startvm default --type emergencystop

然后vagrant up将很好地运作

答案 2 :(得分:0)

我实际上已经发现了我的问题。来自某个addware扫描程序的.dll阻止了虚拟机VM的启动。我失去了论坛主题的链接,这帮助我解决了这个问题。

我所做的是在VirtualBox中从VM打开日志并有一个读取槽。在某些时候,一条表示错误的行出现了.dll名称是罪魁祸首。我从我的电脑上删除了有问题的.dll文件,它已修复。

如果我再次找到该主题的链接,那么我将在此处发布它的确切内容。我不在我现在解决问题的机器上,所以我无法访问我的搜索历史。