Nowadays Virtualization is the most trending topic in the 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 the 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:
- Full Virtualization: Full virtualization helps in virtualizing the main physical server so that different applications and software can be supported. Full virtualization allows the flexibility to combine existing systems with the newer ones with increased efficiency and well-organized hardware. The technique enables the administrators to run unchanged and entirely virtualized operating systems.
- Partial Virtualization: This method simulates the underlying hardware configuration for the virtual machines being created. The key factor for partial virtualization is address space virtualization, where each virtual machine consists of independent address space. This method is easy to implement and provides a useful and robust virtualized environment.
- Paravirtualization: This virtualization technique is a kind of enhancement of virtualization technology, where OS to be installed as guest OS is reconfigured before installation inside the virtual machine. Thus, this method runs modified versions of operating systems. Using this technique, the guest is very well aware of its environment as the paravirtualized OS is altered to be alert about its virtualization
In today’s world, many virtualization solutions are available which could be used by users as freeware. To list down a 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.
Recommended Reading =>> VirtualBox Vs VMWare
How Virtualization technique is 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 the 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 the 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 are 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 into picture. Virtualization surely makes life easier by allowing the 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 the 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.
What You Will Learn:
Points to Consider before installing Virtual Machine (VM):
- Decide which applications you are going to install on your virtual machine. According to that install a 32 or 64-bit Operating system in VM. Some applications are not compatible with old operating systems. E.g. If you are going to use UFT 12.01 it doesn’t work with Windows XP. So you should install a higher version of Windows to work with UFT. Check OS compatibility of your required application before proceeding with operating system installation.
- Is your Processor supports Virtualization? Almost all of the new processors support virtualization but it is a good idea to check the manufacturer’s website to know the details. E.g. Intel Pentium Dual Core T2390 processor doesn’t support virtualization for a 64-bit operating system. So, in that case, you should install a 32-bit operating system compulsory.
- VMWare also provides a trial period. So you should have a key or serial number to keep using it further.
We are going to use VMWare Virtualization software for demonstration.
Steps to install and configure VMWare:
#1) Download the 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 clicking Next button a couple of times.
#3) After installation open the VMWare workstation by using either the 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 the Next button.
#6) Specify the path of the operating system setup file.
#7) In the Next step you need to specify a key or a serial number of the operating system. If you are using the 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 a virtual machine should have sufficient space.
#9) Specify the 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 the 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 little RAM or processor. Leave default settings or allocate in such a 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 the operating system set up on the virtual machine, and then it will be ready to use your regular OS.
- If you didn’t specify any operating system while creating the virtual machine, later you can install it just like we do for your laptop or desktop machines. We can use CD/DVD or USB devices like Pen Drive or even set up a file on the disk to install the operating system in the VM.
- If your CD/DVD drive is not working then also it is very simple to install the operating system. Go to VM -> Settings – > select CD/DVD -> in the right half select the radio button for ‘use ISO image from’ and specify the path on your hard disk where the .iso file is placed. This location will be treated as a CD/DVD drive of your machine.
- Make sure correct boot order is specified in BIOS so installation will start while getting VM power on (in this case guest OS is not installed).
Passing data between host and VM:
Generally, VM is having its own drive and it is not showing drives from the host OS in the VM environment. Also, VM drive cannot be used from the 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 the 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 products for almost all the years of my career, I am a huge fan of virtualization because:
- Virtualization allows creating a full-fledged, cost-effective test lab, which might be almost impossible without it.
- With a clone, snapshot, and migrate features, it’s easy to create a copy, revert to the fresh environment, and carrying a virtual machine, and all these means, server provisioning can be faster and up-time can be increased effectively.
- Saving in terms of space, energy, and resources.
With the advantages are seen above, there are also few points to remember:
- If we need to store multiple VM images, then there would be a need for storage space for which we need a huge capacity storage box. E.g.: NAS (Network Attached Storage box) would be an additional cost.
- Even though VMware provides a High Availability feature, the guest OS would anyway go for a reboot.
- If a user has deployed VCenter: The maximum limit for hosts is 1000 i.e. Host per VCenter.
- Virtual Machines Powered on per VCenter Server is 10000.
- Number of Registered Virtual Machines per VCenter Server is 15000.
- The number of hosts per data center is 500 for VCenter Server
- In Cluster and Resource pool, the maximum limit for hosts are 32
- Virtual Machines Powered on per Cluster is 4000
- Virtual Machines Powered on each host is 512.
Overall, virtualization permits flexibility in terms of hardware deployment and configuration and is 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.
Further reading =>> Commonly asked VMware interview questions
8 thoughts on “How to Install and Use VMWare Virtual Machine in Software Testing”
VMWare is extremely useful for us in dev and test activities. We are using VMWare Player environment for this purpose. You can try it from here:
AutoLab is another good solution to automate test lab setup. it’s free if you have access to VMWare http://www.labguides.com/autolab-older-downloads/
Thank you so much for this indeed useful article.
Keep Posting :)
Very useful article.. thank you..
Currently we are having opening for Manual testing with our company based in Chennai.
Experience : 2 – 3 years in Manual testing
Job Location : Chennai
Job Type : Contract (6 months)
Preferably Immediate Joinees
Interested can forward your resume with experience, notice period, current CTC and expected CTC to the below
Contact Email ID : email@example.com and Subramanian.Kandasamy@raqmiyat.com
Could you explain What is full virtualization, partial virtualization and paravirtualization?
use a spare pc or buy one . . .
windows 10 and vmware . . . forget it!
Very useful article. It’s really helps alot keep posting . thank you..