Intuition to Why we need Virtual Machines?

Note : If you are comfortable with why virtualization concept has been introduced, you can Skip to the Benefits of virtual machines section

Consider two individuals Kiran and Navya who are developing some applications individually and want to test their application on multiple platforms or different versions of a specific OS etc.

Kiran’s system has Windows 11 installed and now he wants to test his application on Linux, Windows 7 and Windows 10. Whenever he wants to test, he will switch between OSes leading to unnecessary booting and switching time between OSes.

Where as Navya has the same Windows 11 machine and she has installed a Virtualization software by which she can create virtual machines and she has installed the Linux, Windows 7 and Windows 10 OS on the top of Virtualization software, where she can run multiple OS on the same Windows 11 machine and test those simultaneously without rebooting and switching between multiple OS.

Also, Both wants their applications to be deployed, fortunately they both used .NET for application logic and MySQL for database and wants to deploy application server on a Windows machine and Database Server on a Linux Machine. Moreover Users demand for resources like CPU , Database vary upon time (Like for sometime if need for processing or serving web pages is in demand, may be dealing with database might be low and vice-versa). Now for running those Linux and Windows machines, Kiran thought obviously he needs two physical servers as he though he cannot run multiple OS on a single physical server and bought them and then installed windows on one machine and Linux on the other.

Here, Both the machines are not utilizing the hardware efficiently most of the time. As Both machines might have a idle time and sometimes they might not require the full capacity of the machine like power of CPU, RAM, Storage it has etc..

So, unnecessarily More Cost for buying 2 physical servers, maintenance time when upgradation required, lesser efficiency in resource utilization of hardware.

But Navya bought a single physical server and installed virtualisation software and created Virtual Machines with Windows OS and Linux OS -one running application server and the other running the database server, Now the only single machine is providing the resources like hardware, CPU etc for both the virtual machines here, If any point of time, if any resource requires high utilization and other machine needs less resources, Hypervisor can automatically share the resources among VM’s what they require.

Here Navya have incurred Lower Expenditure Costs, Maintenance Costs as upgradation is very easily and almost no manual involvement, and Higher efficiency in Resource Utilization as the hardware is shared by two machines here.

– So let us look at the advantages of using virtual machines.

How to Run Multiple Virtual Machines Windows and Linux Inside VirtualBox?

Virtual Machines are the software applications/files which emulate the physical computers.

This process of emulating a physical computer and making able to run instances of it on a single physical machine is called Virtualization.

A Virtual Machine (VM) allows us to run multiple or different Operating systems on a single physical machine and share the same hardware, networking, storage among them. Virtualization helps us to utilize the underlying hardware more efficiently.

A normal single computer system or a machine runs only one OS at a time, where as VM’s allow us to run multiple OS at a time.

We call it virtual because, there are no actual machines present, it creates an illusion as if we are actually using different machines each having it’s own hardware, input/output devices, CPU, storage, networking components etc.

In this article, we will primarily see :

  • what are virtual machines?
  • Working of a virtual machine.
  • Benefits of using them.
  • Popular Virtualization Software
  • Installation of VirtualBox
  • Creating Windows 10 and Linux Virtual Machines
  • Running Windows 10 and Linux VM’s on a Windows 11 platform.

Before going into the detail of Virtual Machines, lets see some primary terminologies.

Similar Reads

Primary Terminologies:

What is a Computer System?...

Intuition to Why we need Virtual Machines?

Note : If you are comfortable with why virtualization concept has been introduced, you can Skip to the Benefits of virtual machines section...

Benefits of Virtual Machines:

Resource Utilization: The hardware resources like CPU, Storage, Network components are utilized very efficiently when there are several machines using these resources. Lower Expenditure costs: Utilizing the hardware resources properly for several machines will makes us to buy only fewer machines which will lower the expenditure costs. Shorter Development and Testing times: We do not manually switch between different operating systems to test our applications. Flexibility: Using Virtual Machines, we can dynamically allocate resources to a machine, and hence for scaling out or in, we have a great flexibility to do , unlike in physical servers, we have to manually place a new server and upgrade it. Lower Maintenance Time: Upgrading or adding more no. of servers physically to the existing ones and enabling co-ordination between them will take much time and might result in server down time. Energy Efficiency: Lesser the Physical servers, lower the power consumption, lower carbon foot print and hence energy efficient. Space Savings: More the servers, we usually require more space to accommodate them in the data centres. Cloud Computing: Cloud computing is the technology where IT resources like servers, networking components, Run time environments, storage, computing power are provided on demand over Internet by the third party and usually follows a pay-as-you-go principle. It helps us to get rid of manually owing a physical server and upgradation of servers (which might take lots of time and may result in high costs, inefficient space and energy resources). Rather everything can be provided by the cloud provider on demand ( in a very less time, almost instantly with a few clicks). This would be only possible if they are using virtualization (as they can upgrade easily, more flexibility in allocation of resources to us than the traditional way of owing a physical servers and manually upgrading it). Hence, Virtualization is one of the backbone of Cloud Computing technology. Check out here, for in-depth Cloud computing tutorial...

Working of a Virtual Machine:

Virtual Machines are created by the user, by specifying the initial requirements like RAM, storage etc.. Hypervisor will allocate these resources to the virtual machines. When a Machine is started, it runs as if is a separate computer system with each having it’s own CPU, RAM, storage, networking components etc. These Virtual Machines do not interact and they are isolated from each other. Each processes or tasks running on different virtual machines interacts with the hypervisor and hypervisor interacts with the hardware allowing programs run simultaneously utilizing the hardware efficiently. If there is a demand for more resources for a particular machine, hypervisor will dynamically allocate it. We can save the state of a particular VM and then we can also transfer it to other systems (we are cloning the system very easily). Stopping a particular VM will stop running a virtual machine and the progress, applications installed, tasks done are preserved if we close a Virtual Machine after saving it’s state....

Popular Virtualization Software:

Azure Virtual Machines Oracle VirtualBox Google Compute Engine Red Hat Virtualization...

Steps for Creating and Running Virtual Machines:

– We will try to Install a Linux based PepperMint OS, Windows 10 OS using VirtualBox on a Windows 11 OS machine and run those virtual machines....

F.A.Q’s

Q.1 Even without having VM’s, If we have a server which requires only lesser resources (let’s say 100GB hard disk, 32 GB RAM, 8 cores of CPU) and other servers which require higher amount of resources,((let’s say 300GB hard disk, 16 GB RAM, 6 cores of CPU) we can buy those servers only according to the requirement and then utilize the hardware efficiently without wasting the resources, then why only VM’s?...