Laravel Homestead映射了VM中不可用的文件夹

时间:2015-11-09 06:53:16

标签: php laravel vagrant virtualbox homestead

我想在我的本地开发环境中使用Laravel预先打包的Vagrant box Homestead。但是,我遇到了一个问题,即我的Mac中配置的文件夹与我的VM中的文件夹不同步。这是我的Homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/dev/Web/Yoosit
      to: /home/vagrant/Code

sites:
    - map: yoosit.app
      to: /home/vagrant/Code/Yoosit/public

databases:
    - homestead

variables:
    - key: 'APP_ENV'
      value: 'local'
    - key: 'APP_DEBUG'
      value: 'true'

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 93000
#       to: 9300
#     - send: 7777
#       to: 777
#       protocol: udp

我的虚拟机中根本没有可用的文件夹。当我在ls -l/home/vagrant时。

编辑引导输出

Roemers-MacBook-Pro:.homestead roemerbakker$ vagrant halt
==> default: Attempting graceful shutdown of VM...
Roemers-MacBook-Pro:.homestead roemerbakker$ vagrant 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: 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: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /Users/roemerbakker/.homestead
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

0 个答案:

没有答案