views:

469

answers:

10

Duplicate

Reasons to Use a VM For Development

I'm trying to roll out a policy in my company where all developers have to work on a virtual machine (e.g. VMWare Workstations) that have the dev. environment such as IDE, tools, service packs already installed to make it easier for new team comers, smoother to provision new machines, etc...

do you recommend such an approach or do you work in a similar fashion in your company?

A: 

With modern IDEs there's a lot of graphics and disk IO going on, neither of which is performed well by VMs. So - if your VM responds fast enough for the developers to use, then I'd say there's no reason why not. If it doesn't you either need to get a faster machines for them or go back to documenting how to setup the build environment.

the other factor against VMs is that if you change the environment, you have to do it for all VMs, and document the changes anyway. If you're telling everyone how to set up their system, you might as well let them set their own system up on the base metal.

Incidentally, we do have VMsa for this - but they tend to be for old versions of the product, so we can still build it without having to install the old service packs, sdks and compilers. Its ok, but I find installing everything locally and switching between them (using junction to point to the build directories) is easier.

Now IIRC VMware has a virtualisation project called thinApp that transparently puts a OS environment onto your local box, so you can have several conflicting applications running side-by-side. I've not used it, but did look into it as something that might be better than whole guest VMs running in their own windows.

gbjbaanb
+2  A: 

I highly recommend using virtual machines for development. Local virtual machines have very little performance penalty and make it much safer to try new ideas/software.

Just make sure you have enough RAM to allow for several VMs and the host OS.

See also

Chris Nava
Little performance penalty - really? We've used VMWare Server and Client for running XP sessions, and it was considerably slower for us, regardless of the amount of RAM we threw at it. For an average user they may not have noticed a difference, but our developers were pretty peeved.
Jess
What sort of applications were they using/writing? I've found that for me, graphic applications suffer the most from virtualization. Eclipse _does_ take a hit but I would hardly consider it intolerable. Running it over a VPN RemoteDesktop connection is much worse.
Chris Nava
It may not be worse than Remote Desktop over VPN but is that really the metric we want to measure this by. I don't think VPN would really be that bad, because it's just your screen that's slow. Builds don't take any longer, and the database is still fast. With VM, the slow things get slower.
Kibbee
+1  A: 

Where i work at the policy mandates that we all have a physical machine wich runs a VM. We only have admin privileges to the VM and not the physical machine. This tends to create problems when we have to run several development applications, builds tend to be slow, everything is slow for that fact. Also when the VM starts reaching the 15gb limit (around a month and a half use) things get complicated as the VMs start crashing and we need to ask for VM compression.

My experience has been bad so i wouldn't recommend it. We usually run the following applications in the VM : Text editors, IDE, Weblogic instance, TOAD for database access. Explorer and Firefox, office applications and less.

Nuno Furtado
+1  A: 

Personally, while I feel it's a good idea for all the reasons you mentioned, I also feel that it requires quite a bit of extra cost on machines. I was just trying out Windows 7 over the weekend on VMWare and a moderate machine (AMD X2 4600, 2 GB RAM) I find that working in a VM can very much be a worse experience than working on top of the real hardware.

Kibbee
+12  A: 

I've got a colleague who likes to work this way. He's got a virtual machine for each project he works on.

I personally don't like using a virtual machine to do development.

  1. It's slower than working directly on my machine.
  2. It doesn't do multiple monitors well.

Don't protect your devs from knowing the gritty details about IDEs, tools, and service packs. They need to know these things.

Also, don't force your devs to work a certain way. Some may not be happy about it, and unhappy devs = less productive devs.

Matt Brunell
A: 

At our shop, we pretty much use all VM's for development. One useful strategy we've employed though to increase VM performance, is to always run them on a high speed external hard drive. Doing this makes them run incredibly fast, since VM's usually a demand a lot of disk IO, on as the prior post mentioned.

James
A: 

There are valid reasons to use VMs for development. However, if you're thinking of doing this just to standardize development environments across your organization, there are better ways to accomplish that (ie, having standard machine images).

DannySmurf
+1  A: 

I have worked with both methods for years. Currently I use VMs. They have many many advantages. However, don't force anyone into one particular way. They won't be productive if they are forced. If you can, convince them.

Advantages of VM for Dev:

  • Very quick deployment: One volunteer updates the image with the latest and customizes, and all get the benefit.
  • Each project can get a separate copy, no interference and no conflicts.
  • Very simple to "freeze" everything and restart! No need to save, close, run, load...
  • When things go wrong, it's an image, scape it, clone a new one and checkout your code.
  • Freeze while debugging or testing (sometimes you want to capture a specific state). Snapshots help if you want to go back and repeat some actions (think testing).
  • VMWare has remote debugging and backward execution!
  • Reproducibility! You devs and testers can reproduce bugs since the environment is controlled (assuming nothing other than work is on the image) and with saved states (assuming they use snapshots).

On the other hand, there are disadvantages:

  • VMs are bulkier, take a lot of space and memory.
  • You won't get 100% of your hardware performance.
  • You will lose some time on image maintenance.
  • Some people just hate it.
Ash
A: 

Start with some developers and try to gather some actual data about productivity change.

David Plumpton
+1  A: 

In some cases, like doing SharePoint dev work, you are more or less required to work on a server, and I just don't like the idea of turning my laptop into a 2003/2008 server :-)

We have two VMWare ESX boxes that hosts our dev machines and it works great as long as people remember to switch off those images that are not in use. Another advantage is that we have a complete network of ESX images in their own domaine which gives us the abillity to do a lot of funny stuff :-)

Kasper