When you have the need to create VM boxes that can run in multiple environments Packer is an excellent choice.
Out of the box Packer comes with support to build images for Amazon EC2, DigitalOcean, Google Compute Engine, QEMU, VirtualBox, VMware, and more.
Support for more platforms is on the way, and anyone can add new platforms via plugins.
For a local development environment we can leverage the advantages of using Vagrant to run VMs and test or develop right in a clean environment without inadvertently introducing settings or configurations of our host machine.
This allows to level the conditions of the development, staging, QA and production environments.
In this way we would avoid circumstances like:
I don’t know what happened. It ran fine in my machine.