I'm interested in transitioning my development environment onto the cloud.

I currently use VirtualBox with Vagrant to manage separate virtual machines for each individual project.

What would be the optimal setup for hosting these virtual machines in the cloud?

Given than I have nearly a dozen VMs, setting up separate EC2 instance for each one is not economical.

A cheaper option might be to snag a low-end VPS from one of the many cheap VPS providers out there. The downside, aside from reliability, is that I don't need all my VMs available to me at all times. For example, VMs that I use as my staging environments only need to be on a few times a week at best.

As an alternative, I've thought about running VirtualBox and Vagrant on a powerful box with enough memory to support multiple machines running simultaneously. Is this a smart setup, or are there caveats I have not considered?

As a side note to the aforementioned option, is there an alternative to VirtualBox that would be a wiser choice?


EC2 only charges storage for non-running VMs. Import VMs to EC2, just be sure to turn them off when you are done. Use EBS backed AMIs for permanent storage, cost about $9/mo for 12 10GB volumes. If you use the VM 40-50 hours/week your costs will be minimal. Cheap VPS servers are generally overprovisioned and you will have performance issues, I would recommend EC2. Another note, adding a VM on top of a VM (VPS) will also tend to kill performance and is not recommended. The only viable other option is dedicated servers like from StormOnDemand. I believe they are one of the few to sell full bare-metal servers by the hour, but I haven't used that product of theirs so I can't say for sure.

Multiple VMS Just launch the AMIs as needed on different instances, the cost of multiple instances vs a larger instance is negligible. Running multiple VMs on top of a VM will cause problems. Paying the extra per-hour for a large enough bare-metal server to host multiple VMS will increase the cost quite a lot also. The only reason I can see for large instance bare-metal and multiple VMs is if you switch between VMs a lot, and you want deterministic startup times. EC2 can be slow at times to start VMs, but they seem to be getting better.

VirtualBox Vagrant only supports VirtualBox, if you are happy with your current setup then leave it as is. VirtualBox is a fairly robust solution for your problem so I don't see any reason to change it considerably. If you come up with feature x that VirtualBox doesn't support (unlikely), then you would want to consider changing.

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