Reputation: 513
Whenever I start my vagrant box and check with virtual box on listed boxes, it does not recognize the virtual machine. More to that, the shared folders mounts well but does not actually work. I created a folder in the host machine that cannot be seen in the guest VM.
This is what I did:
Running vagrant up
and ssh runs my virtual box well, syncs my shared folders however, I cannot see any shared files in either the host or guest. Each has its own files
Upvotes: 0
Views: 350
Reputation: 5564
You should run vagrant run
and any other vagrant command without sudo
.
In this case you probably have to destroy the virtual machine first with sudo vagrant destroy
(this time with sudo
since you created with it), and delete the Vagrantfile in your project root folder. Then run again
vagrant init
vagrant up
Last but not least, if you are using NFS for shared folder (although that shouldn't be your case) you might have to adjust your sudoers. See Vagrant docs https://docs.vagrantup.com/v2/synced-folders/nfs.html
Upvotes: 0
Reputation: 53793
As @Railslide mentioned, the fact you run the command with sudo gets you an issue with permission, your sudo user will not be able to write into the directory (owned by your user) you could workaround by setting specific permission in the Vagrantfile for the synced_folder part but really run the command with your user and everything will go normal.
Upvotes: 1