Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming under virtual machine - pros and cons

I'm an Ubuntu Linux user and I use Win XP only for my work purposes.

Lately I set up a virtual machine with XP + Visual Studio 2008 (powered by kvm-quemu).

My questions are:

  • Have anyone tried to work efficiently under environment set on VM? Are there any performance issues? For example, does slightly worse performance under VM affects your normal efficiency?

  • Are there any other (beside performance) negative aspects of developing software under VM? Are there any problems that I would not be unable to detect/solve in such environment? (we are talking about developing some sort of bigger project, creating an application for Win environment, no hardware related or embedded stuff).

like image 797
Gacek Avatar asked Jul 30 '10 13:07

Gacek


People also ask

Is virtual machine good for programming?

It greatly reduces the uncertainties that are introduced by having multiple versions of programming languages, libraries and operating system features to support multiple projects.

Why do programmers use virtual machines?

Virtual Machines lend themselves well to testing different configurations and setups. Developers can use VM snapshots to try various scenarios, and then quickly and easily restore the environment. This allows developers and software testers to identify configuration problems before end users run into them.


2 Answers

I do all of my client work in VMs and a great deal of my hobby work on VMs. The host operating system is Windows 7 and unless my client has a different preference, I use the very excellent VirtualBox.

I have a moderately powerful laptop that supports hardware virtualization, and whether I am running Linux or Windows XP as the guest O/S, performance does not seem to be a limiting factor for me at all. One essential technique for preventing a performance hit is having the virtual machine's disk on a different spindle than my computers main hardrive. I use an external USB 2 hard drive. Works great.

To me, the advantage of being able to configure my development environment in very specific ways for very specific projects is invaluable. It greatly reduces the uncertainties that are introduced by having multiple versions of programming languages, libraries and operating system features to support multiple projects. I am very rarely surprised by obscure bugs that are caused by unexpected interactions of components that bleed from one project to another.

like image 123
Adam Crossland Avatar answered Nov 13 '22 02:11

Adam Crossland


The two most annoying things when using a development environment under a virtual machine

  • your virtual machine get's only a fraction of your host system's main memory

  • if you have to reboot your host, you will have to wait for the host and for the virtual machine to restart

Another issue may be when your application needs some special drivers, for example, a license key driver. We made the experience that not every VM vendor can deal with that (for us, VMWare was fine, every other vendor we tried did not work).

like image 36
Doc Brown Avatar answered Nov 13 '22 00:11

Doc Brown