M042- Vagrant fails to sync files in the shared directory

Hello and thank you Mongo U for this course!

Vagrant is failing to sync files in the shared directory, even after I complete these steps:

 mkdir m042

cd m042 

cp -R ~/Downloads/m042-vagrant-env/ m042-vagrant-env

cd m042-vagrant-env 

vagrant up 

vagrant ssh

…then from within the m042-vagrant-env directory on my Macbook (Mojave 10.14.5) Pro terminal:

vagrant plugin install vagrant-vbguest

 vagrant reload mongodb-m042

vagrant provision mongodb-m042

vagrant up

This brings me to[vagrant@localhost ~]$. When I run ls all that I can see is a certs directory. Running ls -a returns:

.   .bash_history  .bash_profile  certs     .ssh
..  .bash_logout   .bashrc        .profile

Also, I am receiving an error after running vagrant reload mongodb-m042. I’m not sure what this means or if it has anything to do with the issue that I’m facing, but here it is. The output is as follows:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

yum install -y kernel-devel-`uname -r` --enablerepo=C7.6.1810-base --enablerepo=C7.6.1810-updates

Stdout from the command:

Loaded plugins: fastestmirror


Stderr from the command:

Error getting repository data for C7.6.1810-base, repository not found

What could be the issue?

Thanks:-)

Hey @juliettet

So I just setup my Vagrant env for the new course as well. Ran into the /shared folder not synced issue. And followed the suggested sets like you have. However I only got so far as vagrant reload Then when I ssh’ed into the VM I was able to see the /shared folder. So I was wondering if you have tried to run vagrant destroy; then run vagrant up again to see if that will fix the problem?

And as for your issues with the ssh I am not sure on the answer, so I apologize. :disappointed:

1 Like

Hello juliettet,

Thanks for the note. This may be related with the vagrant-vbguest utility being out-of-date.

Furthermore, I’m not sure if vagrant plugin install will get the latest version. Can you try the following set of commands:

mXXX-vagrant-env$ vagrant plugin update vagrant-vbguest
mXXX-vagrant-env$ vagrant destroy
mXXX-vagrant-env$ vagrant up

Let me know if this helps.

Matt

3 Likes

Hi @natac13,

Thanks for responding! I have just tried running vagrant destroy + vagrant up, but unfortunately, that did not resolve the issue. I’m glad that you’ve got everything up and running in your machine though:-)

I’m about to try running the commands from @mattjavaly’s post below…see what happens…

Cheers :smiley:

1 Like

Hi @mattjavaly,

Thank you for responding and taking the time to help me troubleshoot.

After I run the commands that you have suggested, this is what I can see now when I ssh into m042-vagrant-env:

[vagrant@m042 ~]$ ls
certs  shared 

Success!!

Cheers:-)

3 Likes