环境:
- Mac 10.12.3
- VirtualBox 5.0.24
- vagrant 1.9.1
- homestead 4.0.5
debug
在 Homestead.aml
文件加入一行gui: true
,运行命令vagrant up --provision
时,VirtualBox会自动打开一个窗口,可以观察启动情况。
连接超时
homestead-7: 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.
打开 VirtualBox >> 网络 >> 高级 >> 接入网络。
composer 报错
如果报错信息里有 composer, 有可能是网络问题导致composer无法更新。可以先绕过更新,进入系统后再操作。
打开homestead目录下的scripts/homestead.rb文件。搜索composer, 在大概270行,把代码注释掉。
268 # Update Composer On Every Provision
269 # config.vm.provision "shell" do |s|
270 # s.name = "Update Composer"
271 # s.inline = "sudo /usr/local/bin/composer self-update && sudo chown -R vagrant:vagrant /home/vagrant/.composer/"
272 # s.privileged = false
273 #end