首页 > 解决方案 > Vagrant 超时连接

问题描述

设置最新版本的虚拟盒子和流浪者后,我厌倦了运行命令“流浪者”并面临超时错误

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-16.04' version '201910.20.0' is up to date...
==> 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: 80 (guest) => 8080 (host) (adapter 1)
    default: 8025 (guest) => 8025 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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
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 2.2.6
VirtualBox 6.0
OS Ubuntu 16.04

根据对谷歌的研究,尝试了添加超时等解决方案

config.vm.boot_timeout = 300

或设置图形用户界面

config.vm.gui = false

重启机器并重新加载vagrant,

还在同一个问题....

标签: vagrantvirtualboxsetup-projectvagrant-provision

解决方案


推荐阅读