Reputation: 4678
I am trying to set up a Django Mezzanine project on Vagrant. I have done the following
installed vagrant
installed virtualbox
vagrant init
vagrant box add hashicorp/precise32
replaced everything in Vagrantfile with:
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise32"
end
vagrant up
vagrant ssh
sudo apt-get update
sudo apt-get install python-dev python-pip
pip install mezzanine
mezzanine-project testproject
But I can't see my files on the host.
I have tried configuring Synced Folders by adding to the Vagrantfile:
config.vm.synced_folder "/", "/srv/home/vagrant"
To no avail.
I then tried isolating the problem by removing Python from the equation and running the following in the guest SSH instead:
touch foo
To no avail yet again.
What am I doing wrong?
Upvotes: 0
Views: 845
Reputation: 33923
You have the concept of synced folders back-to-front
https://docs.vagrantup.com/v2/synced-folders/basic_usage.html
Synced folders make a dir of your host visible to the vagrant vm
If you need to see files on the host, you need the files to exist on the host first (and then sync them so the vm can see them too)
Upvotes: 1