đĨī¸ Virtualization¶
Understanding Virtual Machines, Hypervisors and the foundations of modern infrastructure.
Table of Contents¶
- What is Virtualization?
- Why Virtualization Exists
- Physical Machines Before Virtualization
- What is a Virtual Machine?
- Hypervisors
- Type 1 vs Type 2 Hypervisors
- VirtualBox Overview
- Host vs Guest Systems
- Virtual Hardware
- Virtual CPU
- Virtual RAM
- Virtual Storage
- Virtual Network Interfaces
- Virtual Disks
- Snapshots
- Resource Allocation
- Advantages of Virtualization
- Disadvantages of Virtualization
- Real World Uses
- Virtualization vs Containers
- Why Born2beroot Uses Virtualization
- Mental Model
1ī¸âŖ What is Virtualization?¶
Virtualization is the process of creating a virtual version of a computer system.
Instead of running a single operating system directly on physical hardware, virtualization allows multiple isolated systems to run on the same machine.
Think of virtualization as:
Creating a computer inside another computer
2ī¸âŖ Why Virtualization Exists¶
Before virtualization became common, organizations typically used:
1 Physical Server
=
1 Operating System
This approach caused several problems:
- Expensive hardware
- Low resource usage
- Difficult maintenance
- Poor scalability
Many servers used only a small percentage of their available resources.
Example:
CPU Usage: 10%
RAM Usage: 15%
Disk Usage: 20%
Most of the hardware remained unused.
Virtualization was created to solve this problem.
3ī¸âŖ Physical Machines Before Virtualization¶
Traditional infrastructure looked like this:
Server A â Database
Server B â Website
Server C â Mail Server
Server D â Backup System
Each service required its own machine.
Today, a single powerful server can host many virtual systems simultaneously.
4ī¸âŖ What is a Virtual Machine?¶
A Virtual Machine (VM) behaves like a completely independent computer.
A VM has:
- CPU
- Memory
- Storage
- Network Interface
- Operating System
Even though these resources are virtual, the operating system treats them as real hardware.
Example:
Physical Machine
â
âŧ
Hypervisor
â
âŧ
Virtual Machine
â
âŧ
Debian Linux
5ī¸âŖ Hypervisors¶
A hypervisor is software responsible for managing virtual machines.
Its job is to:
- Create virtual machines
- Allocate resources
- Isolate systems
- Control access to hardware
Without a hypervisor, virtualization would not be possible.
Popular hypervisors:
- VirtualBox
- VMware
- Hyper-V
- KVM
- Xen
6ī¸âŖ Type 1 vs Type 2 Hypervisors¶
There are two main categories.
Type 1 Hypervisors¶
Run directly on hardware.
Hardware
â
Hypervisor
â
Virtual Machines
Examples:
- VMware ESXi
- Hyper-V Server
- Xen
Type 2 Hypervisors¶
Run inside another operating system.
Hardware
â
Host OS
â
VirtualBox
â
Virtual Machines
Examples:
- VirtualBox
- VMware Workstation
Born2beroot normally uses this model.
7ī¸âŖ VirtualBox Overview¶
VirtualBox is one of the most popular desktop virtualization tools.
It allows users to:
- Create VMs
- Allocate resources
- Manage virtual disks
- Create snapshots
- Configure networking
VirtualBox acts as the bridge between the host machine and the guest operating system.
8ī¸âŖ Host vs Guest Systems¶
This distinction is extremely important.
Host¶
The host is:
The real machine
Examples:
- Windows
- macOS
- Linux
Guest¶
The guest is:
The virtual machine
Examples:
- Debian
- Rocky Linux
Example:
Windows Host
â
VirtualBox
â
Debian Guest
9ī¸âŖ Virtual Hardware¶
Every VM receives virtual hardware.
Examples:
- Virtual CPU
- Virtual RAM
- Virtual Disk
- Virtual Network Card
The guest operating system believes this hardware is real.
đ Virtual CPU¶
The virtual CPU represents processing power assigned to the VM.
Example:
Physical CPU = 8 cores
VM 1 = 2 cores
VM 2 = 2 cores
VM 3 = 2 cores
VM 4 = 2 cores
The hypervisor distributes resources between machines.
1ī¸âŖ1ī¸âŖ Virtual RAM¶
Memory is also shared.
Example:
Physical RAM = 16 GB
VM A = 4 GB
VM B = 4 GB
VM C = 4 GB
Allocating too much memory may negatively impact the host system.
1ī¸âŖ2ī¸âŖ Virtual Storage¶
A VM stores data inside virtual disks.
The guest operating system sees:
A normal hard drive
even though the disk is actually a file on the host machine.
1ī¸âŖ3ī¸âŖ Virtual Network Interfaces¶
Virtual machines require network connectivity.
Virtual adapters allow:
- Internet access
- Communication between VMs
- Communication with the host
1ī¸âŖ4ī¸âŖ Virtual Disks¶
Virtual disks are files representing storage devices.
Common formats:
- VDI
- VHD
- VMDK
The guest system treats these files as physical disks.
1ī¸âŖ5ī¸âŖ Snapshots¶
Snapshots are one of the most useful virtualization features.
A snapshot records the state of a VM at a specific moment.
Example:
Clean Installation
â
Snapshot
â
Experiment
â
Problem Occurs
â
Restore Snapshot
Snapshots make testing much safer.
1ī¸âŖ6ī¸âŖ Resource Allocation¶
Every VM consumes resources.
Administrators must decide:
- CPU allocation
- Memory allocation
- Storage allocation
- Network configuration
Poor allocation can reduce performance.
1ī¸âŖ7ī¸âŖ Advantages of Virtualization¶
Benefits include:
â Isolation
â Easy testing
â Portability
â Lower hardware costs
â Better resource utilization
â Safer experimentation
1ī¸âŖ8ī¸âŖ Disadvantages of Virtualization¶
Potential drawbacks:
â Resource overhead
â Increased complexity
â Additional management layers
â Hardware limitations
Despite these drawbacks, the benefits usually outweigh the costs.
1ī¸âŖ9ī¸âŖ Real World Uses¶
Virtualization is used almost everywhere.
Examples:
- Cloud providers
- Development environments
- Testing platforms
- Corporate servers
- Educational environments
Companies often run hundreds or thousands of virtual machines.
2ī¸âŖ0ī¸âŖ Virtualization vs Containers¶
Students often confuse these concepts.
Virtual Machines¶
Include:
Operating System
Kernel
Applications
Containers¶
Share the host kernel.
They are lighter and faster but provide a different type of isolation.
Examples:
- Docker
- Podman
2ī¸âŖ1ī¸âŖ Why Born2beroot Uses Virtualization¶
Virtualization provides:
- Safety
- Isolation
- Reproducibility
- Easy recovery
Students can experiment without risking their primary operating system.
If something breaks:
Delete VM
Create New VM
Continue Learning
2ī¸âŖ2ī¸âŖ Mental Model¶
Think of a Virtual Machine as:
A complete computer
inside another computer
Think of the Hypervisor as:
The manager
of those computers
Final Mental Image¶
Physical Computer
â
âŧ
VirtualBox
â
âŧ
Debian VM
â
âŧ
Linux Administration
Virtualization creates a safe environment where systems can be studied, configured and maintained without affecting the real machine.