这是homestead.yaml:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Code
to: /home/vagrant/Code
sites:
- map: rd-cp.dev
to: /home/vagrant/Code/rd-cp/public
databases:
- homestead
当我运行vagrant up
时,我收到了一个虚拟机,但/home/vagrant/Code
为空。目标文件夹存在,似乎没有流浪者尝试映射到它。
Bootup说:
default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/me/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead/0.5.0/virtualbox
没有提及Code。 知道我做错了吗?
答案 0 :(得分:1)
Homestead的问题尚未解决,但我能够通过编辑Vagrantfile非常简单地解决这个问题:
config.vm.synced_folder "C:/Code", "/home/vagrant/Code"
就是这样,就是这么多。