What are the key use cases for use of virtualization in software development?
Asked Answered
A

16

7

What are the key use cases for the use of virtualization -- that is, running one or more "virtual PCs" using software such as VMWare and Microsoft Virtual PC -- for software development?

Also -- are there other instances/uses of virtualization that aren't covered by my definition above (use of a tool like MS Virtual PC or VMWare), and that are useful to developers?

My impetus for asking is this StackOverflow comment by Metro Smurf asserting "You'll wonder how you ever developed without it!", regarding use of virtualization.

(Please include just one use case per response. Thanks!)

Aggressive answered 15/10, 2008 at 17:50 Comment(1)
I use VMWare a lot for development and I'm glad to see these kinds of questions are not getting closed for being not-programming-related any longer.Kraut
A
11

Application testing in multiple environments is one obvious use of virtualization that I'm aware of. Testing your application on other operating systems (without requiring additional physical computers to do so), as well as testing that involves software that generally only allows you to install a single version on a given machine (such as the Internet Explorer browser; running both IE6 and IE7 on the same machine is not an officially supported configuration), are good candidates for virtual machine usage.

Aggressive answered 15/10, 2008 at 17:50 Comment(1)
I use a VM for testing an msi I built. It's great to be able to revert back to a previous snapshot and know all the changes my installer made have been undone.Humbug
C
5

If your build-server is running in a VM, you can make a snapshots of it for every software release in order to be 100% sure that you can recreate the build environment (in case you want to make patches to old releases, for example).

Clicker answered 15/10, 2008 at 20:46 Comment(0)
I
4

If you set up snapshots of your development environment (and back them up) it can be very easy to resume productivity if your computer breaks down. When your machine breaks down right before your release - and you can resume immediately with all your tools installed and configured, it can be a lifesaver.

Integrant answered 15/10, 2008 at 17:54 Comment(2)
@AviewAnew - That does sound useful! Can you recommend any tools that can be used to set up the kind of snapshot that you are describing?Aggressive
Snapshots are great to have. Even if you had a pile of physical machines under your desk for testing you would still need to backup and restore them to get them back to their original states for testing. Using VMs is much faster.Kraut
Y
2

The simplest case which applies to my current situation is that we have a complex client-server environment and with virtualization every developer can very quickly get a baseline set of operating systems to deploy their local build to and verify end to end functionality.

Locally you have your dev box, and N client boxes which get re-initialized as fresh OSes each time you want to try a build. Essentially it's the test environment equivalent of a 'make clean' where even the client workstation gets replaced with a new OS.

Yoo answered 15/10, 2008 at 17:52 Comment(0)
M
2

Quickly distributing environments between team members is a very nice use case to for virtualization especially if you have a lot of various components, tools, etc.. This can save you a ton of time with new hires, contractors, or other individuals who need an environment quickly.

Mamey answered 15/10, 2008 at 17:55 Comment(2)
@SaaS Developer - That does sound useful. In this case, is the distributed environment a virtual machine image (and then you actually do your development work inside the VM); or is there some other means to set up a distributed environment as you're describing?Aggressive
Yes, you are correct. Once you setup your dev environment within the VM the way you want it, you create a snapshot/baseline image. You would continue to use source control to manage your source code. If or your env. crashes or a new hire comes on just use the base image and checkout latest source.Mamey
I
2

Many presenters use a VM for presentations - it allows them to revert immediately to reset the presentation for the next day, transfer all presentation materials quickly between computers, and not have to show your attendees your messy My Documents folder.

Integrant answered 15/10, 2008 at 17:55 Comment(1)
@AviewAnew - Great answer. I had read about presenters using virtualization for their presentations before (e.g. Scott Hanselman on his blog), but had forgotten about it. Thanks for the reminder. :-)Aggressive
M
2

Using virtualization for sales activities is also a great use case. You can take a snapshot at a particular time that you can save as your demo baseline. Then once you run through the demonstration and change the data, etc. you can restore back to your previous baseline for future demonstrations. You can also capture multiple baselines and pick and choose which baseline best fits the upcoming demo.

Mamey answered 15/10, 2008 at 17:58 Comment(0)
H
1

Test environments. If you have more than one setup that a system needs to be targeted for (e.g. Windows & Linux, XP & Vista) then a machine with lots of RAM and VMWare (or on of the others) is a good way to manage the environments.

Another is developing on one system and targeting another. For example, at one point I did some J2EE work on a workstation running Linux where the client was I.E. 5.5. A VM with Windows 2000 and IE 5.5 would let me test the application.

Hypnoanalysis answered 15/10, 2008 at 18:0 Comment(0)
M
1

Reasons I use virtual machines for development.

  • Isolate different development environments.
  • Testing environments.
  • Easy recovery due to computer hardware failure/upgrade.
  • Ability to "roll-back" changes to your development environment if something corrupts it.

Currently, I am using VirtualBox for my VM setup. I used to use VirtualPC, but I REALLY hated not having any type of "snapshot" feature (like VMware and VirtualBox have).

Memoried answered 15/10, 2008 at 18:2 Comment(0)
A
1

We develop software for use in our SaaS application, our production environment has a large number of servers and their software environment needs to be absolutely predictable; we can't have ANYTHING installed extra, or absent from our development machines.

Moreover, our application requires a number of different server types in order to function properly (at least 7 last time I counted); mostly they can't be installed on the same (virtual) machine - at least, not without violating the "same software as production" requirement.

In order to have a consistent environment, it's necessary to use VMs. I don't know how anyone ever manages without them.

Snapshots and rollbacks are nice too, but I use them only occasionally (really useful during installation / upgrade tests).

Suppose you're developing a new version of your software, and checking that the upgrade from the previous version works correctly... how long does it take to do a test cycle without being able to rollback the box? Do you have to reinstall the OS then the old version? Can you guarantee that the uninstall really uninstalls everything?

Actor answered 15/10, 2008 at 20:54 Comment(0)
B
1

Being able to test/retest your deployment process is a huge savings.

Bugloss answered 6/1, 2009 at 15:13 Comment(0)
M
1

I'm suprised that nobody has mentioned the VMware record/replay feature (awesome video demo) which is great for debugging.

I have a headless server running ESXi which runs various machines for building installers (so I don't have to give up processing power on my desktop), automated testing (server is faster than any desktop) and various test environments (about 20 different configurations) so that the support team can easily jump onto a configuration that closely matches a customers system.

When you have one really beefy server running VMs that can be shared between support, test and dev teams, you introduce huge cost savings. In all, we're running ~25 VMs on ESXi (dual-quad core Xeon 2.5G + 8Gb RAM) shared between 5-10 people, some of the developers use Virtual PC and then I use VMware Workstation on my desktop. All of the Mac users here use VMware Fusion as well

Mutant answered 7/1, 2009 at 0:59 Comment(0)
M
1
  • Developing Add-Ins for different versions of Microsoft Office (using Visual Studio Tools for Office).

My main work machine has Office 2007. When I work with Add-Ins for Office 2003 I use a virtual machine with Visual Studio and Office 2003.

Manly answered 1/5, 2009 at 23:38 Comment(0)
R
1

I am surprised that no one has mentioned the benefit of increased security by isolating, for example, the database server and web server in different VM's.

Roughhouse answered 22/4, 2017 at 0:21 Comment(0)
T
0

Some server applications can use VMs too. When one vm is not used much, the server can locate the resources to other vms.

Teresiateresina answered 15/10, 2008 at 17:52 Comment(0)
K
0

Some sort of test environment: if you are debugging malware (either writing or developing a pill against it) it is not clever to use the real OS. The only possible disadvantage is that the viruses can detect that they are being run in the virtualization. :( One of the possibilities to do it is because the VM engines can emulate a finite set of hardware.

Korea answered 8/12, 2009 at 22:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.