【发布时间】:2020-10-22 18:40:38
【问题描述】:
我在 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 执行 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",但对我没有帮助。
我还有什么遗漏的吗?
【问题讨论】: