我正在尝试启动Homestead,以便在位于虚拟机中的几个网站上工作,但它们不可用,即使它们昨天在我第一次配置时工作,即使没有错误也是如此显示。这是宅基地的输出文本:
C:\Users\Luis>homestead up
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 => 8000 (adapter 1)
default: 443 => 44300 (adapter 1)
default: 3306 => 33060 (adapter 1)
default: 5432 => 54320 (adapter 1)
default: 22 => 2222 (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
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Luis/AppData/Roaming/Composer/vendor/laravel/homestead
default: /home/vagrant/Code => D:/www
default: /home/vagrant/laravel => D:/www/laravel
default: /home/vagrant/Code/phpmyadmin => D:/www/phpmyadmin
default: /home/vagrant/Code/codeigniter => D:/www/codeigniter
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
正如我所提到的,它昨天工作得很好,但我无法访问任何已安装的Web应用程序(Laravel,phpMyAdmin,Codeigniter)。
这是我的homestead.yaml文件:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:\Users\Luis\.ssh\id_rsa.pub
keys:
- C:\Users\Luis\.ssh\id_rsa
folders:
- map: D:\www
to: /home/vagrant/Code
- map: D:\www\phpmyadmin
to: /home/vagrant/Code/phpmyadmin
- map: D:\www\codeigniter
to: /home/vagrant/Code/codeigniter
- map: D:\www\laravel
to: /home/vagrant/laravel
sites:
- map: homestead.app
to: /home/vagrant/Code/laravel/public
- map: laravel.app
to: /home/vagrant/Code/laravel/public
- map: phpmyadmin.app
to: /home/vagrant/Code/phpmyadmin
- map: codeigniter.app
to: /home/vagrant/Code/codeigniter
databases:
- homestead
- codeigniter
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
Ping到192.168.10.10也不起作用。你可以猜到主机是Windows。
这些域也列在hosts文件中。
我还能做什么?
答案 0 :(得分:2)
尝试vagrant provision
您的VM。另请检查您的防火墙和防病毒软件,尝试暂时禁用它并再次ping 192.168.10.10
。