我在Laravel使用Homestead和vagrant,一切都很好,直到我尝试升起机器和工作的时候。 我收到此错误:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' 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: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (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.
任何人都可以帮我修复此问题而无需重新安装吗?
我尝试过:
答案 0 :(得分:1)
看起来你的流浪者在使用私钥访问你的虚拟机时遇到了问题:
vagrant ssh
- >如果一切正常而无需输入密码,则错误可能在其他地方(请参阅使用config.vm.boot_timeout
推荐的设置)
也许您的私钥不在虚拟机的known_hosts
列表中
2.1备份工作站中的私钥
a)默认情况下,使用UBUNTU-OS时,文件位于~/.vagrant.d/insecure_private_key
b)您也可以在vagrant ssh-config
之后运行命令vagrant up
,以便检索正在使用的private_key的确切位置)
2.2删除文件并重启vagrant
vagrant reload
或vagrant reload --provision
vagrant将尝试为您重新生成一个新私钥。
根据你添加的vagrantfile: 您还应该配置类似于以下示例的网络(删除#并检查您的vagrantfile的内容是否与下面的示例相似):
MY_IP_ADDRESS = '10.11.12.15'
Vagrant.configure(2) do |config|
config.vm.box = "base"
config.vm.network :private_network, ip: MY_IP_ADDRESS
config.ssh.forward_agent = true
end
示例"hashicorp/precise64"
请查看vagrant-documentation @ https://www.vagrantup.com/docs/boxes.html