Setting Up a Virtual Environment

by | Feb 4, 2014 | Software Development, Virtualization | 0 comments

It wasn’t that long ago when a development environment required multiple physical computers to perform tasks from the mundane to the most sophisticated. While the virtualization of these environments became more adopted, software vendors introduced new products and services to meet with the demand. Alternative solutions and products emerged. Today, there are many products from which to choose. This article is not intended to provide a comparison of those products or provide the pros and and cons for choosing one product over the other, however, to demonstrate a development virtual environment that produces results.

VirtualBox, backed by Oracle, is a free open source virtualization product for enterprise to the home user. It is capable of running on most operating systems from Windows, Apple, Linux, to Solaris. For this development environment, a workstation running Microsoft Windows is the development computer. From the VirtualBox platform packages, at the time of this writing, VirtualBox 4.3.6 for Windows hosts is selected for the VirtualBox downloads page.




The installation is rather quick. With only a few clicks, VirtualBox is installed and ready for use. Once VirtualBox is started, the user is presented with the Oracle VM VirtualBox Manager. The image below is an example of the Oracle VM VirtualBox Manager that has been used for quite some time.


One of the nice features that should be highlighted is the ability to group virtual machines into groups and create custom labels for that group. The virtual machines that make up the group can be started individually as well as a group, by right clicking on the group name and selecting start. It is also worth noting that another nice feature is the ability to run multiple virtual machines simultaneously.

This development environment primarily tests various applications, settings, and configurations in Linux. To that end, one of the first virtual machines created was a Linux distribution (“CentOS“) to run Kickstart to perform automatic unattended installations. Kickstart can be configured many different ways, and as may be seen from the image above, development for PXE and NFS setups exist. Once the Kickstart configuration is setup and ready to go, a new virtual machine may be created, started and connected to the Kickstart server to receive the operating system and custom configurations.

To simplify things further, a snapshot may be made to protect the desired state of the virtual machine. One of the benefits that a snapshot provides is a savings in time. Instead of rebooting the virtual machine to connect to the Kickstart server and waiting for the installation to the operating system to finish, a couple of clicks later, from within the Oracle VM VirtualBox Manager, the current state of the virtual machine can be reverted back to the state of the snapshot taking a few minutes. Multiple snapshots may be made throughout development, so reverting back to the desired state is effortless.

To demonstrate the role of maintaining multiple snapshots in development is an example of working with the Linux firewall, more specifically – iptables. Modifications to iptables may be made using via command line, as demonstrated in the example below, or via the system-config-firewall utility.

iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -J ACCEPT

Assume for a moment, that the iptables has many customizations made using various commands and editors. Then that one final update was made using system-config-firewall utility.



Any changes made using the system-config-firewall utility will overwrite any changes made using any other method. If a snapshot were made just prior to this seemingly minor configuration change, the virtual machine may be restored to the state just prior to this change eliminating any effort in attempting to recreate the iptables.

Another example where a snapshot saved the day occurred when a virtual machine would not start. For one reason or another it was corrupt. Fortunately, a system restore using a snapshot had the system up and running in just about a minute.

While alternatives to VirtualBox are available, virtual machines created with VirtualBox may be exported and through some conversion ported to an alternate third-party application. Imports into VirtualBox are also made possible through various tools.

There is yet another added benefit to selecting VirtualBox as the virtual environment for choice. It is free. VirtualBox is the application of choice for this development environment.


Related Posts


Submit a Comment

Your email address will not be published. Required fields are marked *