Homestead 启动不了,启动的时候一直停留在 SSH auth method: private key
我是git clone https://github.com/laravel/homestead.git Homestead
生成了Homestead.yaml配置文件(我本机IP是192.168.199.17),内容如下:
ip: "192.168.1.254"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders: - map: E:\www\vagrant
to: /home/vagrant/Code
sites: - map: homestead.app
to: /home/vagrant/Code/Laravel/public
databases: - homestead
我有vagrant box add laravel/homestead,vagrant box list也有显示这个添加好了这个box。
vagrant up启动结果如下所示:
E:\Program Files\Homestead>vagrant up
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
homestead: Adapter 1: nat
homestead: Adapter 2: hostonly
==> homestead: Forwarding ports...
homestead: 80 (guest) => 8000 (host) (adapter 1)
homestead: 443 (guest) => 44300 (host) (adapter 1)
homestead: 3306 (guest) => 33060 (host) (adapter 1)
homestead: 5432 (guest) => 54320 (host) (adapter 1)
homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
==> homestead: Booting VM...
==> homestead: Waiting for machine to boot. This may take a few minutes...
homestead: SSH address: 127.0.0.1:2222
homestead: SSH username: vagrant
homestead: 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.
问题描述:看上述启动过程显示,一直停留在homestead: SSH auth method: private key,过了四五分钟后,就显示后面的内容,请问如何解决?
@JobsLong 谢谢回复。思路很对,在VB手动启动,发现是cup的vt没开启。现在解决了,解决办法:进入BOIS,将intel virtual technology设置为enable,原来是disable
@樵夫 请问怎么进入VB的BOIS进行修改
@OMGZui 不是修改VB的BOIS,是改你的电脑的BOIS,开启那个虚拟技术支持
我的问题 和你的 一毛一样 但是 我的bois已经 设置好了啊 还是安装不上 我这个 就是昨晚可能没有正常关机 今早起来就这样了 搞死人 各种重装就是 不行 不知道怎么回事 不知道有没有还有这种情况的 哎
@成成 我的和你一样,不知你现在解决了么?
@wwhu668
已解决
移除文件
D:/Homestead/.vagrant/machines/homestead-7/virtualbox/private_key
运行
vagrant up
(vagrant会生成一个新insecure_private_key文件)参考
@wwhu668 我在D:/Homestead/.vagrant/machines/homestead-7/virtualbox/ 这个位置没有private_key
@caiqihuang 这个就不知道了,你看下 →_→ 这里有没有你需要的答案。
@wwhu668 已经解决了,在Oracle VM VirtualBox设置网络就不会卡在那里了。
@caiqihuang
@wwhu668
@樵夫 感谢几位的分享。
搜索进来的同学可以看这里 Homestead 启动时 SSH auth method: private key 解决方案汇总 。
@caiqihuang 我在D:/Homestead/.vagrant/machines/homestead-7/virtualbox/ 这个位置也没有private_key,设置VirtualBox勾选“接入网线”也不行--
@wwhu668 为什么我的开启了也没有解决呢?
@wwhu668 为什么我的开启了也没有解决呢?
@caiqihuang 怎么设置这个网络啊, 我设置了可是 还是没有 private_key 问题, 你是怎么设置的啊》?
已解决,关了防火墙就好了