vagrant up 启动超时

报错页面

boot_timeout

解决方案

1. 修改 IP

打开/path/Homestead.yaml

ip: "192.168.56.一个新的值"

2. 修改 MAC 地址

refresh_mac

3. 修改配置文件

virtualbox.png
box.ovf里面搜索Network
change_config

4. 重启 Homestead

vagrant reload --provision

如果执行以上步骤,还是timeout,就得尝试启动办法

1.关机vagrant halt

2.编辑文件Vagrantfile,增加以下内容

    # 查看启动页面
    config.vm.provider "virtualbox" do |vb|
        vb.gui = true
    end

3.重启虚拟机vagrant up --provision,可以看到启动错误

vagrant up 启动错误

注意到报错信息 Failure:File system check of the root filesystem failed,联系上下文是因为服务器意外宕机导致虚拟机磁盘出了问题。
可以通过 fsck 命令来解决,具体为 fsck 加上途中小红框标出的部分,如:

fsck /dev/mappeer/slave3–vg-root

然后回车,一路输入y,等到再次出现(initramfs)字样时,按Ctrl + D 就好了。

vagrant up 启动超时
最后,等待虚拟机启动了

本作品采用《CC 协议》,转载必须注明作者和本文链接
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 6
巅峰互联

vagrant 比 docker 好用 vagrant 一直在使用。

1年前 评论

哎,有时候windows下,我vagrant 也容易这样,启动超时,然后对IP网络啥的一顿重置,貌似又好啦,不知道啥原因

1年前 评论
英雄没有斗篷 (楼主) 1年前
Tacks (作者) 1年前

windows下用 laragon 比每天vagrant up --provision 好100倍

1年前 评论

vagrant up 启动超时如何解决?

我的环境

  • Windows 10 企业版
  • VirtualBox 6.1.12
  • Vagrant 2.2.9

常用命令

  • 启动虚拟机 vagrant up --provision
  • 重启虚拟机 vagrant reload
  • 关闭虚拟机 vagrant halt

常见网络连接错误

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.

一般解决办法

// 先关机
$ vagrant halt
// 网络重启
$ netsh advfirewall reset
$ netsh int ip reset
$ netsh int ipv6 reset
$ netsh winsock reset
// 重新启动
$ vagrant up --provision
1年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
文章
1
粉丝
1
喜欢
0
收藏
0
排名:3299
访问:84
私信
所有博文
社区赞助商