Table of contents
Have you ever thought about running a PC inside another PC? Or Running MacOS on Windows 11?
This is where Virtual Machines come to play!
🖥️ Virtual Machines (VMs) allow multiple operating systems to run on a single physical machine.
Let’s understand with a simple example . . .
Say you are on Windows, but you want to try Ubuntu, Linux Mint or MacOS, without removing Windows or buying another laptop or PC.
Then you can do that easily by creating a Virtual Machine, with its own RAM, CPU and Storage, that will run your preferred OS on top of your Windows OS.
So it’s a Virtual Machine inside your Physical Machine.
(Follow this image 👇 for better understanding)
OS running on top of another OS
In the above picture, “Virtualization” means creating a virtual version of your physical machine which means, another machine is running with its own Operating System on top of your physical machine that has Windows as its Operating System**.**
But how are Virtual Machines or virtual versions of physical machines created?
Using a technology called Hypervisor . . .
Hypervisor helps us to run new Operating Systems on top of your Host OS.
(Host OS: The Operating System that is by default installed on your computer)
Hypervisor asks Host OS for some hardware resources like RAM, CPU, and Storage to run another OS on top of the Host OS.
Then it creates Virtual RAM, Virtual CPU, and Virtual Storage to run different Operating Systems on your Host Operating System.
!! Warning ⚠️ !!
But remember you can only allocate the ram available on your computer.
Say your RAM size is 8GB, and if your Host OS, say Win10, uses 2GB of RAM, then the remaining RAM available for creating VMs is 6GB.
Use your resources wisely 🧐.
Some popular Hypervisors: VirtualBox, VMware
VirtualBox by Oracle
Types of Hypervisors
Type 1 Hypervisor
Type 1 hypervisor, also known as a bare-metal hypervisor, runs directly on the host machine’s physical hardware and provides a layer of abstraction between the physical hardware and virtual machines.
This means type 1 hypervisor uses hardware resources directly without the need for a Host OS.
Examples of type 1 hypervisors are VMware ESXi, Citrix Hypervisor, and Microsoft Hyper-V.
(See the image 👇 for a better understanding)
Type 2 Hypervisor
Type 2 hypervisor, also known as a hosted hypervisor, runs on top of a host operating system and enables multiple guest operating systems to run on the same physical hardware.
Type 2 hypervisors are commonly used on personal computers.
Examples of type 2 hypervisors are Oracle VirtualBox, VMWare Workstation, and Parallels Desktop.
(See the image 👇 for a better understanding)
Advantages 👍
Cost Savings 💰
With Virtualization, you do not have to buy a new computer or remove current Operating System, just to try any Operating System.
Isolation 👨💻 & Security 🔒
Not only that, Virtual Machines are isolated.
Isolated?
Let’s understand with an example:
Say you are running three Virtual Machines on Windows — V1, V2, V3.
V1 is using Ubuntu
V2 is using Linux Mint
V3 is using MacOS
Whatever you do with V1, will not affect V2 and V3, and not even your Windows OS which is the Host OS.
If anyone of the Virtual Machines crashes, the rest will work without any problem. This means each VM works independently.
Therefore Virtual machines can provide an additional layer of security by isolating applications and operating systems, preventing them from accessing the host system or other virtual machines.
Flexibility 💪
Virtual machines allow you to run multiple operating systems on a single physical machine, making it easier to switch between different environments and configurations.
From Win to Linux to MacOS to any other OS.
Disadvantages 👎
Photo by Christian Wiediger on Unsplash
Resources 💻
Each VM needs its own operating system, due to which you have to share resources from your available RAM, CPU and Storage on your computer.
Therefore VMs are limited by the hardware resources allocated to them.
Overhead ⚠️
Virtual machines require more resources than running an operating system directly on physical hardware.
This can lead to reduced performance and increased resource consumption.
Longer Startup Time ⏳
It usually takes up some time to start up a Virtual Machine.
Loading the hypervisor that manages the Virtual Machines.
Allocating resources.
Loading the guest operating system (Guest OS is the OS that you use on your Virtual Machine)
Many virtual machines have startup scripts that run when the virtual machine starts up. These scripts can take time to execute, depending on their complexity.
Conclusion
I guess that’s enough for now. To actually learn something, you always need to implement it practically.
Follow this tutorial on how to install VirtualBox on your computer and run different Operating Systems with ease :
Install VirtualBox on Windows — (YouTube)
Drop your questions if you have any doubts.
Like this blog if you found it useful :)