Open In App

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.

Primary Terminologies:

What is a Computer System?

It is a Physical device typically consisting of hardware like CPU (for processing data), input devices, output devices, and software applications which allows users to perform their desired functionality and an operating system.

What is a hardware ?

Hardware comprises the physical parts of the machine like RAM, Hard disk, Keyboard, CPU etc..

What is an Operating System?

Operating System is a system software which acts like an Interface between hardware and User. Dealing directly with the hardware and managing the resources like storage, CPU etc.. can be tedious, So an Operating System abstracts all of these and allow us to efficiently work with the applications requiring hardware, and provide a lot of convenience.

Operating System between Hardware and User

– Refer more here for learning about Operating System in detail, and difference between Operating System and Hardware .

What is a Host OS?

Host operating system is typically the first operating system that you install on the machine, it is installed on the physical machine and interacts directly with the underlying hardware.

What is a Guest OS?

Guest Operating System is the OS which is associated with the Virtual Machine, It might not interact with the hardware directly, Each Virtual Machine have it’s own OS known as Guest Operating system. It sits top on the Host Operating System. Host OS will generally works as an Intermediary between Guest OS and hardware.

Guest OS vs Host OS

What is a Hypervisor?

Hypervisor is a software component in Virtualization software which creates, runs and coordinate between the Host OS and Guest OS. It is also called as Virtual Machine Monitor(VMM). Refer more.

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.

Benefits of Virtual Machines:

Working of a Virtual Machine:

Popular Virtualization Software:

– List of Available Virtualization Software

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?

Answer:

While it is true that even without VM’s, you can buy servers with only according to specific requirement of yours, but in most of the cases, your requirement for the resources do not remain the same, and sometimes you might need additional amount of resources and sometimes lesser, so scaling our resources when we have physical servers is costly as we have to buy new servers again, but if we have VM’s, we can scale as per our requirement and share the hardware among multiple machines effectively.

Q.2 Using which Hypervisor is more efficient?

Answer:

Generally, Using Virtualization software with Type-1 Hypervisor are more efficient as is deals directly with the hardware, but not with the host operating system.

Q.3 Does Virtualization means adding the more storage or IT resources when we exhaust the actual resources of the existing system?

Answer:

No, Virtualization do not add any resources, It simply enables to virtualize the hardware and use it efficiently by running as many VM’s as we want.

Q.4 Does Hypervisor automatically modifies the requirement specifications of virtual machines present when they require more resources or do we need to manually?

Answer:

Hypervisors can dynamically allocate the resources to virtual machines, although IT administrators can define policies on up to what limit those automations are allowed.


Article Tags :