Running Multiple Unrelated Vagrant Environments at Once

I'm currently using multiple VirtualBox development environments (I was using VMWare Desktop until I found out it didn't like Ubuntu version upgrades at all) at once. I get tickets to fix/test/develop stuff in classic ASP, PHP/Codeigniter, Java and other technologies all day. I've got lots of RAM and lots of hard drive space on my development machine because of this and it works well for me to be able to leave multiple environments open all day long and switch between them.

Now I'm interested in checking out Vagrant, but [it looks like Vagrant is aimed at people who use one environment at a time](!topic/vagrant-up/DbQWzGQo5iU). Does anyone else have a similar situation as mine that uses Vagrant? How would I do it (have multiple unrelated development environments running at the same time)?

4 thoughts on “Running Multiple Unrelated Vagrant Environments at Once”

  1. Vagrant is still going to create VMs for you, they’re just headless. If you have a PHP project, create (or use) a PHP flavored Vagrantfile for that project. Do the same for Java or ASP, etc. You can have multiple Vagrant environments running at once.

  2. I keep at least 3 env running in the way you describe, all built with vagrant.

    Vagrant doesnt really do anything to the vm engine itself nor the number of vms you run at once, think of it as just a provisioner. If you wrote enough ansible scripts, you could replicate everything vagrant does (minus the marketplace).
    As long as you are ok with headless and/or remoting the display, you will be fine.

    Vagrant is designed to run many at once. For instance, it will automatically detect if another vm is already using ports and will automatically adjust the new vm to compensate on the next empty port.

    If anything, youll find vagrant makes the act of creating and trying new vms so easy that you will overrun the hd with images. Thats what I did anyway. Make sure you get guest additions working and learn how to (re)package vms.

    Welcome to vagrant, “you can check out (a new image) any time you like, but you will never (want to )leave ”

    Edit: add this content…
    Also, if the physical base host is a Windows box, its best to run vagrant from cygwin with rsync installed. The shared folder feature is happier this way.

  3. Works great. I use vagrant to test saltstack stuff. So often have multiple environments for different salty things I’m working on.


Leave a Comment