Nowadays Virtualization is the most trending topic in IT industry and it’s a skill that is expected from every IT employee. What is Virtualization and why it’s so important? Read on to know everything about Virtualization and how it can be a useful skill for software testers.
As wiki says,
Virtualization, in computing, refers to the act of creating a virtual (rather than actual) version of something, including but not limited to a virtual computer hardware platform, operating system (OS), storage device, or computer network resources.
With growing technology and demand, virtualization technology has been expanded from Hardware and Software virtualization to Memory virtualization, Storage virtualization, Data virtualization and Network virtualization. Every scope of virtualization has its own specification.
For this article, we are concentrating on Hardware Virtualization, the most basic and most needed virtualization technique in software testing field.
Computer hardware virtualization is the virtualization of computers or operating systems. In simple words, on single physical hardware, when single or multiple virtual computer environments can be created and each of them can be used as an independent computer, it’s called platform virtualization.
Under Hardware/Platform virtualization, three types of virtualization are included:
In today’s world, many solutions for virtualization are available which could be used by users as a freeware. To list down few of them: VMware Player, Sun Virtual Box, Oracle VM manager, Microsoft Virtual PC etc. All these virtualization solutions can be installed on your local desktop machine or laptop.
How Virtualization technique is useful and advantageous for testers:
On one physical machine, only one Operating System can be installed.
Consider an example: Initially, as per the test plan, the application needs to be tested for RHEL 6.1 and SLES 11.2. After first primary release and looking at the demand of the application, management decides to expand support for other distros of Linux like Ubuntu, Fedora, and Mint. Also, a long-term plan is to develop the same application for windows platform too.
Looking at the scenario, initially, when only two Operating Systems were supported, it was easier to create a test environment using multiple physical machines. But what happens when you have to test different versions and distros and expected to work on 50 machines (with different configurations) on daily basis?
Creating, maintaining and monitoring the huge test environment is a tedious task and time consuming too. And this is where virtualization comes in picture. Virtualization surely makes life easier by allowing deployment of multiple Virtual Machines (VMs) on a single physical machine. In addition to that, some of the main features of virtualization make it more advantageous.
Before moving ahead with pros and cons of virtualization, let‘s get an idea about points to be considered before configuring a virtual machine and how to configure it.
We are going to use VMWare Virtualization software for demonstration.
#1) Download VMWare workstation trial version setup file from here. Set up is around 307 MB. Currently, version 12 is available. Please note we have set up screens on version 11.
#2) Install VMWare on your machine. Setup is simple and requires to click Next button couple of times.
#3) After installation open VMWare workstation by using either start menu or shortcut created on the desktop.
#4) Click on “Create a New Virtual Machine”.
(Note: Click on the image for enlarged view)
#5) With default “Typical” selected click on Next button.
#6) Specify the path of the operating system set up file.
#7) In the Next step you need to specify a Key or a serial number of operating system. If you are using trial version then that part can be skipped.
#8) Enter the name for the virtual machine and specify a path to the directory where you want to create your virtual machine. It is recommended that the drive you’re selecting to install virtual machine should have sufficient space.
#9) Specify an amount of disk space you want to allocate for a virtual machine. Allocate disk space according to the size of software you are going to install on the virtual machine.
#10) On the next screen it will show configuration you selected for a virtual machine.
#11) It will allocate Hardware according to the default settings but you can change it by using Customize Hardware button in the above screen.
You can specify what amount of RAM, a processor has to be allocated for a virtual machine. Do not allocate complete RAM or complete Processor for a virtual machine. Also, do not allocate very less RAM or processor. Leave default settings or allocate in such way that your application should be able to run on the virtual machine. Else it will result in a slow virtual machine.
#12) Click on the Finish button to create the virtual machine at the specified location and with specified resources.
If you have specified a valid file (.iso, .rar., .nrg) for the operating system it will take standard time to complete operating system set up on the virtual machine and then it will be ready to use your regular OS.
Generally, VM is having its own drive and it is not showing drives from host OS in the VM environment. Also, VM drive cannot be used from host OS.
There are few options using which you can use data from Host OS in VM.
Option #1. Using shared directories: Go to VM -> Settings -> Options -> Shared Folders: add the path of the required directories which you want to view in the VM.
Option #2. Using USB devices: When USB devices are plugged in those are default available for host operating system and won’t show in the VM. To make them available in VM do:
VM -> Removable devices -> mouse hover USB device and click Connect (Disconnect from the host). Now USB device will be available in the Guest OS (VM) but won’t be available in the host machine. Do reverse action to make it available in the host machine.
Advantages of virtualization
Working in the storage domain and testing disaster recovery product for almost all the years of my career, I am a huge fan of virtualization because:
With Advantages are seen above, there are also few points to remember:
Overall, virtualization permits a flexibility in terms of hardware deployment and configuration and the most needed skill to perform a task successfully.
What’s your opinion? Do you use VMWare or any other virtualization software? Let us know your tips and tricks.