Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm far from an expert in virtualization, so pardon my ignorance.

I've had this idea (really doubt it's original, haven't looked much into the topic) of "disposable" virtual machines for QA environments.

At work we use a couple of physical machines where each QA environment is just a different Unix account and port configuration. Every QA test leaves traces of previous tests, and it's generally a PITA to manage the environments, keep them updated, etc. This is very tedious and prone to breakage.

I could use something like Puppet to easily manage and keep track of changes, but it would still require an awful lot of configuration and planning.

So is there a VirtualBox (preferably), VMWare or other virtualization solution that helps me create certain VM configurations on the fly when needed, and allows me to dispose of them quickly? I am thinking of one VM per test bundle, that would save the results and additional configuration for quick recovery if needed. Maybe using snapshots like patches that I could reapply to different VMs. Also, could I have some sort of "base" VM with the OS and static apps, and then apply "patch" VMs on top?

I'm not really sure something like this is possible and what I need to consider. I'm sure I'm missing out on tons of details.

If something like this doesn't exist, I was thinking of writing something on my own using the VirtualBox API. How difficult would it be to go this route?

Thanks for your help.


share|improve this question

closed as off-topic by gnat, MichaelT, GlenH7, Kilian Foth, ChrisF Sep 16 '13 at 20:19

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, MichaelT, GlenH7, Kilian Foth, ChrisF
If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

5 Answers

up vote 2 down vote accepted

You probably want to look into Vagrant - it's a system for automating the creation of Virtualbox VMs, which sounds like exactly what you want.

share|improve this answer
That looks very interesting. I'll be looking into it. Thanks! –  imiric Jul 21 '11 at 18:27
add comment

Cloning a VM is very easy using VMware and possible but a little trickier using VirtualBox.

Once you can create clones, you can do everything you listed there. Create a base machine, clone it as many times as you like. Install a QA environment, clone that as many times as you like. Install bits of patches on each QA system. Clone those if you really want.

And each of your clones may also have snapshots.

share|improve this answer
add comment

At work we use VMWare LabManager to do this. It is very easy to use and can be scripted but it is a pretty penny to license. You can set up libraries of configurations that can be used for fully automated testing environments.

share|improve this answer
Yes, thank you, this seems exactly what I was looking for. I'll look into this and see if there's an open source alternative I could adapt to my needs. –  imiric Jul 12 '11 at 1:18
add comment

On Linode they have what they call 'stack scripts'. I'm sure other VPS hosts do something similar. They're extensive scripts that can be executed to create a specific VPS stack (LAMP, etc) from a bare-bones OS install. Perhaps an approach like that would work for you? Create a master script that can take a set of parameters via a command line or interactive prompt and perform the required package installations and configurations against a snapshot of a base OS install. It'd be a good project for an intern.

share|improve this answer
add comment

You could look into Amazon's Elastic Cloud Computing (EC2). The only thing is that EC2 is on the web, and that may or may not work for what you want. But being able to make-and-dispose VMs easily from images is the idea behind the service. You pay for CPU time, and prices sound pretty reasonable.

share|improve this answer
add comment

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