我正在尝试在 Windows 8.1 x64 上设置 Laravel Homestead,但我似乎无法通过以下错误。
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: casensitive_default_1420409560257_10693
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> 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
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
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 的一个非常流行的错误,我在 stackoverflow 上发现了几个类似的帖子,例如:one和two。但是在我的 Vagrantfile 中设置 boot_mode 并不能解决问题。
Vagrant.configure("1") do |config|
config.vm.boot_mode = :gui
end
为了确保我有 VT-x,我下载了 intels 工具,我这样做了:i7 core;我检查了 BIOS 中是否启用了虚拟化。
在我使用默认值的 Vagrantfile 中(其中大部分似乎已被注释掉)并且我已将 config.vm.box 设置为:
"laravel/homestead"
我的 Homestead.yaml 设置为(并且已经有 id_ras.pub 和 id_rsa):
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/d/projects
to: /home/vagrant/projects
sites:
- map: roopla.app
to: /home/vagrant/projects/test_app/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
这与我正常的 Composer、PHP、GruntJS、BowerJS、AngularJS 日相差甚远,而且我不确定我真正在做什么,最初我只是在学习 Laravel 4/5,然后我侧身跳了起来,因为 Homestead 看起来很有用和kewl,所以我只是盲目地遵循指示,所以任何可以传授的知识片段都将不胜感激。