Homestead没有与mac同步数据

时间:2017-10-30 13:54:11

标签: macos laravel virtualbox homestead nfs

我的VirtualBox未与我的MacBook正确同步。当我查看我的laravel配置文件夹时,我遗漏了view.php的文件。当我在我的虚拟机上列出ls -lisa的所有文件和目录时,我看不到views.php。但是当我执行cat views.php时,我会看到文件的内容。

另一个奇怪的事情是:当我只是将test.php添加到配置文件夹时,views.php在我的机器中可见。我还发现很多vendor文件都丢失了......

我有一台配备Hight Sierra,Vagrant 1.9.7和VirtualBox 5.0.40的MacBook Pro。我已经为NFS vagrant plugin install vagrant-bindfs安装了vagrant插件。我的配置文件如下所示:

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:

    - map: ~/Sites/seo-app.dev
      to: /home/vagrant/seo-app.dev
      type: "nfs"

sites:

    - map: seo-app-local.dev
      to: /home/vagrant/seo-app.dev/public_html

    - map: admin.seo-app-local.dev
      to: /home/vagrant/seo-app.dev/public_html

    - map: api.seo-app-local.dev
      to: /home/vagrant/seo-app.dev/public_html

    - map: client.seo-app-local.dev
      to: /home/vagrant/seo-app.dev/public_html


databases:
    - reviews
    - seo_app

blackfire:
    - id: *************
      token: **********
      client-id: **********
      client-token: ***********

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

1 个答案:

答案 0 :(得分:1)

这也发生在我身上。我解决了该问题,使计算机停止运行并使用Provisioning选项启动它。这里的命令:

$ homestead halt
$ homestead up --provision