vagrantfile - How to include a file in vagrant vbox -


lets i'm running instance of box. how include file physically resides in same directory box , vagrantfile? suppose need state in vagrantfile. how should include look?

my vagrantfile (excluding comments) is:

vagrant.configure("2") |config| config.vm.synced_folder ".", "/vagrant_data" 

running box get:

(...) default: ssh auth method: private key default: warning: authentication failure. retrying... default: warning: authentication failure. retrying... 

i can 'vagrant ssh' it, theres no /vagrant_data folder available

from vagrant doc

by default, vagrant shares project directory (remember, 1 vagrantfile) /vagrant directory in guest machine.

note when vagrant ssh machine, you're in /home/vagrant. /home/vagrant different directory synced /vagrant directory.

so if have file physically resides in same directory vagrantfile able access in vm /vagrant directory.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -