I've been studying http://www.vagrantup.com/ for several days and I'd like a feedback by people using it in a professional context or for personal projects. I think I get what positive things can bring Vagrant but I have questions about its drawbacks:

  • I'm a php developer and I work in a small company. I'm wondering if Vagrant could be useful for me and newcomers in my company since it's forcing a total development environment. I mean, people often prefers to work on their OS (Linux/Mac/Windows). How do you deal with that, do you force everyone to use Linux for example?
  • Doesn't it add complexity since you are entirely working on a Virtual Machine?
  • Don't you fear your VM main file get corrupted one day and you wouldn't be able to use it again? I feel nervous about using VM because of that.

Thank you.

closed as off-topic by gnat, user40980, user53019, Kilian Foth, World Engineer Feb 23 '15 at 23:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, Community, Community, Kilian Foth, World Engineer
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Half the point of vagrant is to get away from the golden vm image many shops are using these days. – Wyatt Barnett Apr 10 '13 at 9:00

The main advantage of working with a virtual machine is that you can quickly get a development environment up and running. A modern, complex application probably uses a number of external dependencies, like various database servers, message queue daemons and whatnot. Installing these on every developer's machine individually for a local development environment can be quite a hassle. Using a virtual machine image, you can distribute a pre-configured environment easily.

This does not mean that you set this image up once and cross your fingers that it'll never corrupt. It also doesn't mean that developers are writing their code inside the virtual machine. To create the virtual machine, you should create scripts which can set up a base OS to the desired state. Look at Ansible, Chef, Puppet, simple shell scripts and similar tools for that. These scripts can be used to set up a virtual machine, your production system, test systems etc all from the same source. Creating and distributing a complete image of a virtual machine is just a time saver, since such scripts could take a while to run. It also allows you to easily reset your environment to a known good state if you have messed things up. The VM image is not your one and only source though; if it corrupts it doesn't matter, since it doesn't hold any data or code and since you can simply recreate it.

Secondly, vagrant maps paths inside the virtual machine to paths on the host machine. Your developers can simply write their code as usual on their regular machine and just execute it inside the VM. Since the paths are shared this can happen immediately without needing to copy any files back and forth.


  1. Maybe vagrant can be useful to you, if your app requires a complex setup.
  2. Not really, since nothing much changes.
  3. See above.
  • 2
    Great answer. I didn't understand the fact that you are not actually coding inside Vagrant VM So I better understand the purpose of Vagrant now, Thank you. :) – phemios Apr 10 '13 at 8:45
  • If you do use the shared folders option, it's perhaps not a great idea to share your source directly, since files modified in the VM will also be changed in the host. (e.g. a bug executed in the VM could possibly delete source files on the host). – Brendon Apr 14 '13 at 16:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.