Friday, January 6, 2012

Many VMs keep it neat

I've been working a lot on Virtual Machines recently so I can keep all the code and settings for each project I'm working on separate. When I need a desktop dev environment or a web server I just create a  new VM!

It sounds overkill to start a new machine for each project but here are several reasons why creating one is a great idea.

  1. Separation - When you have a whole machine for each project it's impossible for one set of tools to get in the way of the other. You can keep the config right for just that project.
  2. Backup - I snapshot each machine before I do something big. The ability to go back to a point in time in one click is incredibly powerful if you use it regularly. I also run an rsync script regularly to copy the VMs to another drive, so you are not relying on one HDD. You just copy one file and you have the whole machine backed up.
  3. Keep your "host" clean and running fast - When you install many apps on one machine they generally slowly get clogged up and confusing. I use OSX as my host and run mostly linux and Win7 in the VMs.
  4. Software versions - I recently needed 2 different versions of the same software for different tasks. Creating a new machine made it so easy. 
I started off using VMware Fusion, as I used to work with VMware ESX and was always impressed with it. However I've recently been using VirtualBox more and more. It's free and I haven't found anything I can't do with it yet.

A few tips:

Run dropbox on the machines and keep any files you want to move between machines on there. It's the perfect backed up, versioned shared directory.

You need lots of Ram. I have a Mac Pro with 2 dual core processors which can cope fine with 3 VMs running simultaneously. RAM you can't really do without. I use 10GB which always leaves plenty for the  Mac too.



0 comments:

Post a Comment