Alex Mueller on Software and Technology 
Tuesday, July 11, 2006

I have been using VMWare Workstation recently in addition to Microsoft's Virtual PC. I do not think using VMWare will completely replace my need for VPC, because both have their advantages and disadvantages. The concept of virtual machines intrigued me enough to begin exploring, and then integrating them into my daily life. I mainly use them for development, but I will also use them to test new software so I can keep my host operating system clean.

What is a virtual machine?

There are several definitions, but in the following post, the virtual machines that I am referencing are instances of operating systems run within virtualization software. Virtualization software is capable of simulating a working computer instance, allowing the creation and execution of multiple x86 virtual computers simultaneously. Each virtual machine can execute its own operating system, such as Windows, Linux, Mac, and others. Simply put, virtualization software allows one physical machine to run numerous operating systems simultaneously, regardless of hardware configurations.

I have posted before on VPC and how I like to use differencing disks to manage my virtual machines. I find that Microsoft's VPC makes this process easy. Basically, when using differencing disks, we can create a base image as our parent. From that read-only parent, we can create child instances where we use the operating system of the parent, and anything added affects our child instance. If something should happen, we can easily delete our child instance and start over, creating a new child that uses our base image as the parent.

My Setup

Typically, I have a base parent with a specific operating system, and any useful software utilities I believe all computers need, such as winrar, textpad, ect. I will then create a child of that parent and install whatever software I need on it. In this case, I will have a child that is specific for ASP.NET 1.1 development, which includes IIS, the .NET 1.1 framework, Visual Studio 2003, SQL2000, MSDN library, and a few other nice utilities. I will do the same thing for a ASP.NET 2.0 environment, an Apache/PHP/MySQL environment, and other types. I then create a child from that instance where I do all of my work. I can easily delete my individual working environments without having to install all of my development tools. I am also able to update the parents as I need, although I have read that this is not allowed, nor advised in VPC, but it has been working for me without complaints.

I found a need to use VMWare after struggling with VPC running MS Visual Studio 2005. Following my above scenario, I created a new Visual Studio 2005 environment, where I installed the .NET 2.0 framework and SQL 2005. I discovered the performance was extremely lagging, especially when debugging. Stepping through lines of code took a few seconds each. It was miserable, so I sought alternative solutions.

VMWare Specific

VMWare has been the leader in the virtualization software market for some time, so I decided to try installing Visual Studio 2005 and testing its performance. I was impressed. Running Visual Studio 2005 within a VMWare workstation was just as fast as running it on my host operating system. At this point, I am sold on VMWare, except for one thing, differencing disks.

In VMWare, differencing disks is known as cloning, or linked-clones. After spending some time creating a base virtual machine, then creating child instances, or clones, I have discovered a few things. These discoveries are discussed below.

The first is, with VMWare, there is no ability to update the parent image and still use its children. Cloned images use a snapshot of the parent. This is supposed to be the same way with VPC, but I have been able to successfully update parent images in VPC. The second is, when setting the base hard drive size, set it as big as possible to allow for growth. The third is the ability to manage hard drive space by allocating more or less. Last, plan ahead as far as possible when creating that base image so all the necessary applications, updates, utilities, and settings are installed. We do not want to have to reinstall software down the road.

Through trial and error, I have observed that if the hard drive capacity of the parent image is set to not exceed 8GB, then the sum of all of its children cannot exceed 8GB. Let me explain this further. Assume we have a 1 GB parent image, and it is set to not exceed 8GB (We can specify if we want the parent image to automatically take up 8GB, or to grow to 8GB as it requires space). Now assume we create a child of the parent, and install 4 GB of software on it. We have 3GB remaining in our parent-child environment. Now assume we create another child of the parent, installing 3GB of software on it. At this point we have reached our limit of 8GB. We cannot create another child from the parent, because two child images already exist, totalling 7GB of disk space to add to our 1GB of disk space on the parent. At this point, the parent image can no longer be cloned. I suggest making the parent hard drive as big as possible. I believe 950GB is the maximum size.

VMWare provides a built in utility to manage virtual disks, called vdiskmanager. This tool becomes useful if we improperly estimated the original size of our parent hard disk. Using vdiskmanager, I can make my 8GB parent expand to 20GB, or even more. What this does is increase the maximum capacity of the parent disk, but the use of all clones are lost at this point, because clones are created based upon a snapshot of the parent.

Vdiskmanager only makes the drive larger, not the actual partition. In order to realize the extra capacity, VMWare suggests using a third party tool to allocate the new space with the existing partition. I use GParted, the Gnome Partition Editor. From their site, one can download a live CD that runs some flavor of Linux and the GParted application. We can boot into our virtual machine running the GParted application and reallocate our current partition with the unused hard drive space.

Final Notes

I am still discovering advantages to both VPC and VMWare. Today, I am leaning more towards the performance benefits of VMWare. In the future, I can install a flavor of Linux if I want, while VPC does not support this. I have been able to install Red Hat 5.2 in VPC, but I could not exceed an 800x600 resolution.

What I want to know is, are there any other developers out there who develop in virtual environments like I do? If so, have you found any performance issues with VPC or VMWare? With Visual Studio 2005? What are you doing that is different than my setup, and what can you share with me to help improve this process?

Tuesday, July 11, 2006 12:03:37 PM (Mountain Standard Time, UTC-07:00) | Comments [0] | Tools#
MuellerDesigns.net
Search
On This Page
The Split Personality of the Tester/Developer
Cross Site Scripting (XSS)
Creating files with FSUTIL
PowerShell Management Library for Hyper-V
Installing Windows 7
Installing Linux in Hyper-V
Internet Explorer 8 Release Candidate 1
PowerShell Documentation
Automate Daily Tasks with PowerShell
SketchPath XPath Editor
Software Testing - Revisited
Architecting Buildings and Software
NBCOlympics.com with Silverlight
Marker Interfaces and C# Attributes
Most Popular
JavaScript ReplaceAll Functionality
What is polymorphism?
What is composition?
Sorting with IComparable and IComparer
Applying the Observer Pattern in ASP.NET
MVP in ASP.NET
What is abstraction?
What is encapsulation?
What is a class?
What is inheritance?
Authentication in ASP.NET
Calendar Controls
XPathNavigator.CheckValidity new for 2.0
SQL Server 2005 Connection Issues
Auto-attach to process '[####] aspnet_wp.exe' on m...
What is an object?
FreeTextBox
VMWare and VPC
An Example of Reflection using C#
Changing File Ownership In Vista and Longhorn
Archive
Links
Categories
My Local Blog Map
Blogroll
About
Powered by:

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
MuellerDesigns.net

Sign In

Help Those In Need
The Hunger Site
Ronald McDonald House Charities (RMHC) of Western Washington & Alaska