Reputation: 11
When I vagrant up or reload , synced folders are mounted but When I ssh from another pc , synced folders are not showing and when I ssh in the actual machine, synced folders are shown. What am I doing wrong ? Or what do I have to do?
this is my Vagrant file
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-6.7"
config.vm.synced_folder "/home/telenet/telenet", "/var/www/html/code",
:owner => "vagrant",
:group => "vagrant",
:mount_options => ["dmode=777,fmode=777"]
config.ssh.insert_key = false
config.ssh.forward_agent = true
config.vm.network "public_network"
#config.vm.provision :shell, :path => "lamp.sh"
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
end
Answer : In vagrant file , in config.vm.network I add ip: "some ip address" . Then I use that ip address to ssh my virtual box, then boom there it was. It works
Upvotes: 1
Views: 56