4
votes

I have a vagrant VM (virtualbox) setup with meteor. My host and guest are both Ubuntu. The VM contains a vboxfs share folder setup through the Vagrantfile. The behavior I am noticing is similar to a NFS mount.

I am able to create a meteor project in this shared folder, but when I run the project I get errors pointing to mongodb.

If I follow instructions on https://github.com/pixelhandler/vagrant-dev-env/blob/master/README.md my app works just fine.

Upon further investigation it seems that MongoDB does not work on NFS shares, http://www.mongodb.org/display/DOCS/NFS

Has anyone else run in to this issue? and if so, have you figured out a (non-rsync) solution?

I plan to send link of this question to 10gen, perhaps someone from their team can answer it.

3

3 Answers

6
votes

Not sure what Mongo's plans are re running on NFS / vboxfs, but you could work around this by running your own MongoDB not in the shared folder (eg, use the ubuntu mongodb package). Use the MONGO_URL environment variable to tell meteor where to connect. If you pass this variable, meteor will not try to start MongoDB in the meteor project directory.

4
votes

You can move the data dir somewhere inside the VM, and use a symlink from the vagrant folder:

cd /vagrant/.meteor/local
ln -s ~/db/

This means the data will not be shared, but you probably want it git ignored anyway.

(https://grahamrhay.wordpress.com/2013/06/18/running-meteor-in-a-vagrant-virtualbox/)

0
votes

grahamrhay's solution would not work with the vagrant box started on Windows. There is no way to make symbolic links on windows for vagrant, at least not for administrator accounts.