Add Virtualization to Your Development Toolbox

Add Virtualization to Your Development Toolbox

t’s time again to open up your developer’s toolbox and make room for the new must-have tool, virtual machines. As a software consultant, I find myself traveling from customer to customer and constantly working in new development environments. As interesting as that is, a new environment means installing and configuring new tools. Inevitably, a tool install or uninstall fails, I remove a piece of software that I end up needing again later, different versions of tools conflict, or I just plain screw things up. Since my development laptop is my only laptop, wiping out and reinstalling the drive is not a fun task.

Enter virtual machines. Virtualization technology has come a long way in the past few years, and hardware is now fast enough to make a virtual machine feasible for interactive development. Virtualization software, such as Microsoft Virtual PC or VMWare Workstation, allows you to run another complete operating system?a virtual machine (VM)?in your current operating system. Although virtual machines have been gaining popularity on the server side recently, their growth on the client side has been limited?especially in a development environment.

This article presents some interesting uses of virtual machines, gives you some recommendations for getting the most from VM development, and shows why every developer should have a VM on his or her utility belt.

 
Figure 1. Eclipse Running in a Virtual Machine on WinXP

Playing in the Sandbox
During most development projects, you add and remove new third-party libraries and software as the project and requirements progress. Unfortunately, constant installing and uninstalling of applications can quickly damage the Microsoft Windows registry. Just one bad installer can really mess things up. Setting up your development environment in a guest machine (the operating system running in a virtual machine) gives you a system that you can easily recover if damaged. It also gives you peace of mind that no matter what goes wrong, you can still use the expensive new software that you just activated on your laptop. Figure 1 shows Eclipse running in a virtual machine on WinXP.

A virtual machine can provide an excellent development sandbox that forms a clear barrier between your development environment and your personal computer. If your project requires working with potentially unsafe code, such as a virus or low-level data manipulator, a virtual machine can do the trick. You can configure a VM to allow or block network access to the guest operating system, while allowing you to retain network access on your host machine (the machine running the virtualization software). If your project scans personal data, such as a desktop search bar, a VM may be the only thing protecting your personal information from the crawler during development.

Start Testing with a Clean Slate
Some projects require a clean slate for proper testing. Installers are notoriously difficult to test and debug because an error in the installer may leave behind artifacts that render future tests invalid. The only proper way to test an installer is to start with a clean slate each time. However, wiping out and reinstalling an operating system can be very time consuming, especially in a heterogeneous test environment. The solution: a virtual machine with a replicated hard drive.

Most VM software products use virtual hard drives. A virtual drive is simply a single file on the host operating system that emulates a hard drive of a given size to the guest operating system. Some products even allow you to use “growing” virtual drives, which let you specify a very large size for the drive but start small and grow as needed.

The benefit of a virtual drive is that you can easily copy it. Just create a master image, copy it, test your project, and throw it away. This testing pattern provides a sterile environment for each test, yet it doesn’t require any more time than a standard file copy.

You can extend the clean slate concept to multiple guest operating systems by just creating different master virtual disks. Test your installer on Linux, Windows 2000, and WinXP by just booting different virtual hard disks on the same host machine.

Training and Demos in the Field
Of course project development is not the only use for virtualization. A virtual machine with a configured virtual hard disk serves as an excellent training platform as well. The disks can be easily replicated and destroyed as required. As a trainer, you know that every student’s machine is configured in exactly the same way, since they are all copies of the same master image. Constraining the student to a VM prevents destruction to the host operating system, which translates into more uptime for a training facility.

A recent project I was on used a virtual disk as a preconfigured demonstration platform. The sales team (or the poor engineer paired with a salesman) could grab a copy of the demonstration disk and the virtualization software and hit the road. The use of a preconfigured system limits the downtime of waiting for an engineer to build the system and reduces the occurrence of configuration errors in the field.

Which VM Software Is Right for Me?
The first important act of adding virtualization to your toolbox is choosing the virtual machine software you want to use. You have a few choices here, with the two major contenders being Microsoft Virtual PC and VMWare Workstation. A third, less obvious choice is User Mode Linux (UML). Each of these products has its own pros and cons (which are beyond the scope of this article), but ask yourself the following key questions when choosing a product:

  1. Which operating system(s) will run on the host machine? Virtual PC runs on Windows and OSX, VMWare Workstation on both Windows and Linux, and UML on only Linux.
  2. Which guest operating systems will I run? Virtual PC and VMWare work with most, although they have a small “officially supported” operating system list. UML runs only another Linux kernel.
  3. Will I migrate the guest machines to a server or enterprise product? Both Microsoft and VMWare provide server products that can use virtual disks from their client products. If your enterprise is already using a server product, choose a client product to match.
  4. Does my enterprise already have a license to a product? Many developers do not realize that most MSDN subscriptions include access to Virtual PC. If you have a subscription, check if you already have access to a product license.
 
Figure 2. Virtual PC Guest Machine Configuration Dialog

A few other up and coming virtualization products are available, but many are not mature enough to use in a production environment. The more mature products, like Virtual PC, include simple configuration dialogs that let you configure many pieces of the guest machine’s hardware, as shown in Figure 2.

Integrating a virtual machine may appear tricky at first, but remember that it is just another machine on the network. Smart use of shared folders or a network file system (NFS) can allow you to easily share data between guest machines or between the guest and host machines. If you use MS Windows as your guest operating system, don’t forget to look at the sysprep tool for preparing the operating system for reuse. Forgetting to do this can cause problems if you use the virtual machine in a networked environment.

Drawbacks and Limitations
You must consider some tradeoffs when using virtualization. Depending on the usage type, a virtual machine’s performance may not be as good as that of the host machine. Managing the virtual disks can be difficult if they are too large and difficult to move or copy. Depending on the guest operating system and length of its use, you may need to purchase multiple licenses to keep everything legal. Even with these limitations, virtual machines have a lot going for them.

Add Virtualization to Your Toolbox
I hope you see the value of using virtualization as a development tool. Easily recoverable systems and a protected sandbox environment drastically reduce downtime during development and testing. Preconfigured demonstration and training machines mean increased productivity and a reduced error rate when you take them into the field. Virtualization products are now affordable and readily available for almost all host and guest platforms. Simplify your life, make some room in your development toolbox, and add virtualization to your next project.

devx-admin

devx-admin

Share the Post:
Development Project

Thrilling East Windsor Mixed-Use Development

Real estate developer James Cormier, in collaboration with a partnership, has purchased 137 acres of land in Connecticut for $1.15 million with the intention of

USA Companies

Top Software Development Companies in USA

Navigating the tech landscape to find the right partner is crucial yet challenging. This article offers a comparative glimpse into the top software development companies

Software Development

Top Software Development Companies

Looking for the best in software development? Our list of Top Software Development Companies is your gateway to finding the right tech partner. Dive in

India Web Development

Top Web Development Companies in India

In the digital race, the right web development partner is your winning edge. Dive into our curated list of top web development companies in India,

USA Web Development

Top Web Development Companies in USA

Looking for the best web development companies in the USA? We’ve got you covered! Check out our top 10 picks to find the right partner

Renesas Tech Revolution

Revolutionizing India’s Tech Sector with Renesas

Tushar Sharma, a semiconductor engineer at Renesas Electronics, met with Indian Prime Minister Narendra Modi to discuss the company’s support for India’s “Make in India” initiative. This initiative focuses on

Development Project

Thrilling East Windsor Mixed-Use Development

Real estate developer James Cormier, in collaboration with a partnership, has purchased 137 acres of land in Connecticut for $1.15 million with the intention of constructing residential and commercial buildings.

USA Companies

Top Software Development Companies in USA

Navigating the tech landscape to find the right partner is crucial yet challenging. This article offers a comparative glimpse into the top software development companies in the USA. Through a

Software Development

Top Software Development Companies

Looking for the best in software development? Our list of Top Software Development Companies is your gateway to finding the right tech partner. Dive in and explore the leaders in

India Web Development

Top Web Development Companies in India

In the digital race, the right web development partner is your winning edge. Dive into our curated list of top web development companies in India, and kickstart your journey to

USA Web Development

Top Web Development Companies in USA

Looking for the best web development companies in the USA? We’ve got you covered! Check out our top 10 picks to find the right partner for your online project. Your

Clean Energy Adoption

Inside Michigan’s Clean Energy Revolution

Democratic state legislators in Michigan continue to discuss and debate clean energy legislation in the hopes of establishing a comprehensive clean energy strategy for the state. A Senate committee meeting

Chips Act Revolution

European Chips Act: What is it?

In response to the intensifying worldwide technology competition, Europe has unveiled the long-awaited European Chips Act. This daring legislative proposal aims to fortify Europe’s semiconductor supply chain and enhance its

Revolutionized Low-Code

You Should Use Low-Code Platforms for Apps

As the demand for rapid software development increases, low-code platforms have emerged as a popular choice among developers for their ability to build applications with minimal coding. These platforms not

Cybersecurity Strategy

Five Powerful Strategies to Bolster Your Cybersecurity

In today’s increasingly digital landscape, businesses of all sizes must prioritize cyber security measures to defend against potential dangers. Cyber security professionals suggest five simple technological strategies to help companies

Global Layoffs

Tech Layoffs Are Getting Worse Globally

Since the start of 2023, the global technology sector has experienced a significant rise in layoffs, with over 236,000 workers being let go by 1,019 tech firms, as per data

Huawei Electric Dazzle

Huawei Dazzles with Electric Vehicles and Wireless Earbuds

During a prominent unveiling event, Huawei, the Chinese telecommunications powerhouse, kept quiet about its enigmatic new 5G phone and alleged cutting-edge chip development. Instead, Huawei astounded the audience by presenting

Cybersecurity Banking Revolution

Digital Banking Needs Cybersecurity

The banking, financial, and insurance (BFSI) sectors are pioneers in digital transformation, using web applications and application programming interfaces (APIs) to provide seamless services to customers around the world. Rising

FinTech Leadership

Terry Clune’s Fintech Empire

Over the past 30 years, Terry Clune has built a remarkable business empire, with CluneTech at the helm. The CEO and Founder has successfully created eight fintech firms, attracting renowned

The Role Of AI Within A Web Design Agency?

In the digital age, the role of Artificial Intelligence (AI) in web design is rapidly evolving, transitioning from a futuristic concept to practical tools used in design, coding, content writing

Generative AI Revolution

Is Generative AI the Next Internet?

The increasing demand for Generative AI models has led to a surge in its adoption across diverse sectors, with healthcare, automotive, and financial services being among the top beneficiaries. These

Microsoft Laptop

The New Surface Laptop Studio 2 Is Nuts

The Surface Laptop Studio 2 is a dynamic and robust all-in-one laptop designed for creators and professionals alike. It features a 14.4″ touchscreen and a cutting-edge design that is over

5G Innovations

GPU-Accelerated 5G in Japan

NTT DOCOMO, a global telecommunications giant, is set to break new ground in the industry as it prepares to launch a GPU-accelerated 5G network in Japan. This innovative approach will

AI Ethics

AI Journalism: Balancing Integrity and Innovation

An op-ed, produced using Microsoft’s Bing Chat AI software, recently appeared in the St. Louis Post-Dispatch, discussing the potential concerns surrounding the employment of artificial intelligence (AI) in journalism. These

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this autumn sale has already created

Cisco Splunk Deal

Cisco Splunk Deal Sparks Tech Acquisition Frenzy

Cisco’s recent massive purchase of Splunk, an AI-powered cybersecurity firm, for $28 billion signals a potential boost in tech deals after a year of subdued mergers and acquisitions in the

Iran Drone Expansion

Iran’s Jet-Propelled Drone Reshapes Power Balance

Iran has recently unveiled a jet-propelled variant of its Shahed series drone, marking a significant advancement in the nation’s drone technology. The new drone is poised to reshape the regional

Solar Geoengineering

Did the Overshoot Commission Shoot Down Geoengineering?

The Overshoot Commission has recently released a comprehensive report that discusses the controversial topic of Solar Geoengineering, also known as Solar Radiation Modification (SRM). The Commission’s primary objective is to

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing pandemic. This major investment, which