Reputation: 15530
I just trying to add Vagrant to my workflow and I have following probably noob problem. I pull standard hashicorp standard 14.04 image, vagrant up it, SSH to it install my python requirements on it and then then try to execute build commands against code in Vagrant shared folder and run in to problems. Basic errors I get say those locations don't exist or cannot be found.
First action I, go ls /vagrant
and can see my shared folders. I cannot cd to them from Vagrant machine I have tried to halt the machine.
Vagrantfile shared folder code.
{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/Users/Kimmo/Documents/Mist.io","disabled":false}}}
I am using Virtualbox as provider newest version.
My dev machine is OSX 10.9.5
There are not access limitations on the folder itself.
Thanks for you help in advance :)
Upvotes: 2
Views: 2322
Reputation: 2762
Does /vagrant
exists inside the VM just after you start it ?
If no you can add this parameter : "create":true
. According to the doc, for the create: true
paramater : If true, the host path will be created if it does not exist. Defaults to false.
If the folder /vagrant
exists but you can cd
or ls
it, you can add parameters wich will define the right/owner of this folder:
owner
: (string) the user who should be the owner of this synced folder. By default this will be the SSH user. Some synced folder types don't support modifying the owner.group
: (string) the group that will own the synced folder. By default this will be the SSH user. Some synced folder types don't support modifying the group.Also for the hostpath parameter you have to give him a folder path, not a file path. In your conf I can see: "hostpath":"/Users/Kimmo/Documents/Mist.io"
. If Mist.io
is a file and you want to access this file inside your VM, just give the path to the folder containing this file, /Users/Kimmo/Documents
in your case.
Upvotes: 1