☁️ Day 7: Virtual Machines & Virtualization — What Actually Runs Our Application?
Discover how virtualization transforms physical hardware into multiple virtual machines and powers cloud computing. Explore hypervisors, virtual servers, and Amazon EC2 through a simple real-world architecture.
Series: Cloud Computing (24 articles)
- …
- 8☁️ Day 7: Virtual Machines & Virtualization — What Actually Runs Our Application? This article
☁️ Day 7/30: Virtual Machines & Virtualization — What Actually Runs Our Application?
Understanding the technology behind our cloud servers
Yesterday, we made our college examination portal more resilient.
Instead of depending on one application server, we introduced multiple servers across Availability Zones.
But there's a question we haven't answered yet:
What exactly is that "server" we're running our application on?
When we draw:
1
Application Server
on a cloud architecture diagram, are we talking about a physical computer sitting somewhere in a data center?
Or is something else happening behind the scenes?
Let's open that box. 🏗️
🖥️ First, Think About a Physical Server
Imagine a powerful physical computer.
It has:
- ⚙️ CPU
- 🧠 Memory (RAM)
- 💾 Storage
- 🌐 Network interfaces
Now imagine that this server is powerful enough to run several different workloads.
If we dedicate the entire machine to one small application, a large portion of its capacity might remain unused.
1
2
3
4
5
6
7
8
9
10
11
12
13
🖥️ PHYSICAL SERVER
CPU: 100% capacity
RAM: 64 GB
┌────────────────────┐
│ Workload │
│ │
│ Uses only part │
│ of the capacity │
└────────────────────┘
⚠️ Capacity remains unused
So we have a problem:
How can one physical machine support multiple workloads while keeping them separated from one another?
The answer is virtualization.
🧩 What Is Virtualization?
At a high level, virtualization allows one physical computer to provide multiple virtual machines (VMs).
Each VM behaves like its own computer, with allocated computing resources and its own operating system.
Think of it like a large apartment building.
🏢 Physical Server = Building
🏠 Virtual Machines = Apartments
Each apartment has its own occupants and space, while the underlying building is shared.
Similarly:
1
2
3
4
5
6
7
8
9
10
🖥️ PHYSICAL SERVER
│
⚙️ VIRTUALIZATION
│
┌─────────┼─────────┐
↓ ↓ ↓
VM 1 VM 2 VM 3
🖥️ 🖥️ 🖥️
↓ ↓ ↓
App A App B App C
Each virtual machine can have its own operating system and workload.
🧠 Meet the Hypervisor
But who manages these virtual machines?
Meet the hypervisor.
A hypervisor is a software layer that manages virtual machines and helps allocate physical resources such as CPU and memory to them.
Think of it as the building manager.
1
2
3
4
5
6
7
8
🖥️ PHYSICAL SERVER
│
⚙️ HYPERVISOR
│
┌─────────┼─────────┐
↓ ↓ ↓
VM 1 VM 2 VM 3
🖥️ 🖥️ 🖥️
The hypervisor helps create and manage virtual machines while maintaining separation between them.
So when you launch a virtual server in the cloud, you're not necessarily getting an entire physical machine dedicated exclusively to you.
You're getting a virtualized computing environment.
☁️ So Where Does Amazon EC2 Fit?
Now the concept becomes practical.
Amazon EC2 (Elastic Compute Cloud) provides on-demand, scalable computing capacity in AWS.
An EC2 instance is a virtual server that you can configure for your application.
So the architecture we created yesterday can now become more specific:
1
2
3
4
5
6
7
8
9
10
👩🎓 Students
↓
⚖️ Load Balancer
↙ ↘
↓ ↓
EC2 VM EC2 VM
🖥️ 🖥️
\ /
\ /
🗄️ Database
Those boxes we previously called "application servers" can now be represented by EC2 instances.
And this gives us an important connection:
**Day 6 taught us how to make our application resilient.**Day 7 teaches us what actually provides the computing environment for our application.
🔍 What's Inside a Virtual Machine?
A VM isn't just an empty box.
Conceptually, you can think of it like this:
1
2
3
4
5
6
7
8
9
10
11
🖥️ VIRTUAL MACHINE
┌──────────────────────┐
│ Application │
├──────────────────────┤
│ Libraries │
├──────────────────────┤
│ Operating System │
├──────────────────────┤
│ Virtual Hardware │
│ CPU | RAM | Network │
└──────────────────────┘
For example, your application might need:
- Linux
- A web server
- Runtime libraries
- Your application code
- A specific amount of CPU
- A specific amount of memory
These requirements can be configured within the virtual server environment.
⚙️ But Where Does the Physical Hardware Go?
Here's where cloud architecture gets interesting.
Behind your virtual machine is still physical infrastructure.
A simplified view is:
1
2
3
4
5
6
7
8
9
10
☁️ AWS Infrastructure
🖥️ Physical Host
│
⚙️ Hypervisor
│
┌─────────┼─────────┐
↓ ↓ ↓
EC2-1 EC2-2 EC2-3
VM VM VM
The physical host provides the underlying computing resources.
The virtualization layer allows those resources to be allocated to virtual machines.
This is one of the fundamental ideas that makes cloud computing practical at large scale.
🧱 Virtualization Doesn't Mean "Fake"
A common beginner misconception is that a virtual machine is somehow a "fake" computer.
It isn't.
From an application's point of view, a VM provides a computing environment with things such as:
CPU + Memory + Storage + Networking + Operating System
The difference is that the underlying hardware resources are virtualized and managed by the cloud infrastructure.
So when you work with a VM, you can interact with it much like you would with a computer or server.
🏢 A Simple Real-World Analogy
Imagine you own a large office building.
You could give the entire building to one company.
But if that company only needs a small portion of the space, much of the building could remain unused.
Instead, you divide the building into separate offices.
1
2
3
4
5
🏢 ONE BUILDING
│
┌─────────┼─────────┐
↓ ↓ ↓
Office A Office B Office C
Each company gets its own space.
They don't need to own the entire building.
That's the basic intuition behind virtualization:
One powerful physical machine can support multiple isolated virtual environments.
Of course, real virtualization technology is much more sophisticated than this analogy.
☁️ What Happens in AWS?
Modern EC2 instances commonly use the AWS Nitro System.
The Nitro System includes purpose-built hardware and software components, including the Nitro Hypervisor, which helps manage functions such as CPU and memory allocation for virtualized instances.
A simplified picture looks like this:
1
2
3
4
5
6
7
8
🖥️ AWS Physical Host
│
⚙️ Nitro System
│
Nitro Hypervisor
↙ ↓ ↘
EC2 EC2 EC2
VM VM VM
The actual Nitro architecture is more sophisticated than this simplified diagram.
For Day 7, you don't need to memorize the Nitro architecture.
The important idea is:
Cloud virtual servers still run on physical infrastructure underneath.
The cloud abstracts much of that underlying hardware from the person using the service.
🔍 Virtual Machine vs Physical Machine
Let's make the difference simple:
| Physical Server | Virtual Machine |
|---|---|
| Actual physical hardware | Virtualized computing environment |
| Directly uses physical resources | Uses allocated virtual resources |
| Physical capacity is involved | Resources can be assigned virtually |
| Requires physical provisioning | Can be provisioned through cloud services |
| Hardware is directly managed | Much of the underlying hardware is abstracted |
And here's the important part:
A virtual machine still depends on physical infrastructure somewhere underneath.
The cloud doesn't remove hardware.
It abstracts much of the hardware away from the person using the service.
🚀 Why Does Virtualization Matter for Cloud Computing?
Let's connect this back to our 30-day journey.
Virtualization helps cloud providers offer computing environments efficiently and at scale.
1️⃣ Isolation
Different virtual machines can operate independently.
2️⃣ Resource Allocation
CPU and memory can be allocated to different workloads.
3️⃣ Flexibility
Cloud users can launch virtual servers according to their requirements.
4️⃣ Faster Provisioning
A virtual server can be provisioned without physically installing a new server for every workload.
5️⃣ Better Infrastructure Utilization
A physical host can support multiple virtualized workloads.
These ideas help explain why virtualization became such an important technology in modern cloud computing.
🧠 Think Like a Cloud Architect
Let's return to our college examination portal.
Yesterday we designed:
1
2
3
4
5
6
7
👩🎓 Students
↓
⚖️ Load Balancer
↙ ↘
↓ ↓
AZ-1 AZ-2
App Server App Server
Today, we can ask:
What are those application servers actually running on?
One possible implementation is:
1
2
3
4
5
6
7
8
9
10
11
👩🎓 Students
↓
⚖️ Load Balancer
↙ ↘
↓ ↓
AZ-1 AZ-2
EC2 EC2
VM VM
\ /
\ /
🗄️ Database
Now our architecture has become one layer deeper.
Day 5: Where is the application?
Day 6: How does it survive failures?
Day 7: What provides its computing environment?
That's how cloud architecture starts becoming a layered system rather than a collection of random services.
🎯 Interactive Challenge
🧩 Can You Spot the Problem?
Imagine a physical server with 64 GB of RAM.
You have three applications:
- Application A needs 8 GB
- Application B needs 16 GB
- Application C needs 12 GB
Would it make sense to buy three separate physical servers just for these workloads?
Or could one physical server potentially host multiple virtual machines, each with allocated resources?
🤔 Think about it...
The second approach is one of the fundamental ideas behind virtualization.
Instead of treating the entire physical server as one indivisible environment, virtualization allows computing resources to be divided into multiple virtual environments.
🏗️ Your Turn: Draw the Architecture
Here's today's mini challenge.
Start with:
1
2
3
4
5
6
7
🖥️ Physical Server
│
?
│
🖥️ VM 1
🖥️ VM 2
🖥️ VM 3
Your task:
Fill in the ?
What technology sits between the physical server and the virtual machines?
💡 Hint
It's the component responsible for managing the virtual machines and allocating resources.
🔎 One More Question...
There's another interesting question waiting for us.
If a VM is running an application...
Where does the application's data go?
Is it stored inside the VM?
What happens if the VM is deleted?
Can we separate compute from storage?
This question will lead us naturally to our next architectural layer.
💡 What I Learned Today
Yesterday, we designed an architecture that could handle failures.
Today, we opened the "server" box and discovered what is behind it.
We learned that:
- A virtual machine is a virtual server environment.
- Virtualization allows physical computing resources to support multiple virtual machines.
- A hypervisor manages virtual machines and helps allocate underlying resources.
- Amazon EC2 provides virtual servers that we can configure for our applications.
- Modern EC2 instances commonly use the AWS Nitro System and its Nitro Hypervisor.
And most importantly:
When we draw "server" on a cloud architecture diagram, there's a lot happening underneath that simple box.
☁️ Day 7/30 — Cloud Computing & Cloud Architecture Challenge
We've now gone from:
Where does our application live?
↓
How does it survive failures?
↓
What actually runs the application?
↓
How does it survive failures?
↓
What actually runs the application?
But our application still needs somewhere to keep its files and data.
So tomorrow, we're opening another box:
💾 Day 8: Cloud Storage — Where Does Our Data Actually Live?
Because a server can run your application...
But where do you put the files your application creates?
Series: Cloud Computing (24 articles)
- …
- 8☁️ Day 7: Virtual Machines & Virtualization — What Actually Runs Our Application? This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article