Jordan Foreman
Jordan Foreman

Reputation: 3888

Vagrant - Unable to sync folder from secondary drive

Whenever I run vagrant up, I get the same error:

$ vagrant up
Bringing machine 'www' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is missing: /d/project

And here is the relevant setup in my Vagrantfile:

config.vm.synced_folder "D:\\cq", "/var/www/project",
    owner: "www-data", group: "www-data"

My directory setup is a bit weird, so maybe the issue lies there. I'll list out anything I can think of that might be causing vagrant up to fail.

I'm just getting started with Vagrant, so I'm sure I'm missing something obvious, but my research isn't turning up anything too useful. I've tried adding...

config.vm.provider :virtualbox do |vb|
    vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
end

...per https://github.com/fideloper/Vaprobash/issues/183, but to no avail. If there is anything else I can provide to help troubleshoot this issue, please let me know!

Upvotes: 1

Views: 1483

Answers (1)

James
James

Reputation: 607

I replicate your error and it seems to be related to the string formatting. In Windows the vagrant file that I use is like this:

config.vm.synced_folder "d:/tmp", "/var/www/html"

Try to changing the path to forward slash and use only one. Also I noted that the error message looks into /d/project which I should understand is D:\project. That folder needs to exist in your drive.

Upvotes: 1

Related Questions