Cloud Computing and Hypervisors: How Virtual Machines Work
Cloud Computing and Hypervisors: How Virtual Machines Work
Virtualization is one of the fundamental technologies behind modern cloud computing.
When you create a virtual machine (VM) in a cloud platform, you usually aren't receiving a dedicated physical server. Instead, a virtualization layer allows multiple virtual machines to run on the same physical infrastructure while keeping their computing environments logically isolated.
The technology responsible for creating and managing these virtual machines is called a hypervisor.
What Is a Hypervisor?
A hypervisor is software—or, in some architectures, firmware—that creates and manages virtual machines.
It allows a single physical server to run multiple independent operating systems.
For example:
Physical Server
+-------------------------------+
| CPU | RAM | Storage | Network |
+---------------+---------------+
|
v
Hypervisor
+---------------+---------------+
| | |
v v v
VM 1 VM 2 VM 3
Linux Linux Windows
Each VM behaves like an independent computer.
It has its own:
Virtual CPU
Virtual memory
Virtual disk
Virtual network interface
Operating system
Applications
The hypervisor controls access to the underlying physical hardware.
Virtual CPU
Virtual memory
Virtual disk
Virtual network interface
Operating system
Applications
Why Are Hypervisors Important for Cloud Computing?
Cloud providers operate enormous data centers containing physical servers.
If each physical server could run only one customer's operating system, infrastructure utilization would often be inefficient.
Virtualization allows the physical resources to be divided among multiple workloads.
For example:
Physical Server
|
+-----------------------------+
| |
v v
Virtual Machine Virtual Machine
| |
4 vCPU 8 vCPU
8 GB RAM 16 GB RAM
| |
Application A Application B
The cloud provider can therefore use physical infrastructure more efficiently while providing customers with isolated virtual environments.
Hypervisor Architecture
A simplified virtualization architecture looks like this:
+--------------------------------------------------+
| Applications |
+--------------------------------------------------+
| Guest Operating System |
+--------------------------------------------------+
| Virtual Hardware |
+--------------------------------------------------+
| Hypervisor |
+--------------------------------------------------+
| Physical Hardware |
| CPU | RAM | Storage | Network |
+--------------------------------------------------+
The hypervisor sits between the virtual machines and the physical hardware.
It manages how resources are allocated and provides the virtualization boundary between guest operating systems.
Type 1 Hypervisor
A Type 1 hypervisor, also called a bare-metal hypervisor, runs directly on the physical hardware.
+-------------------------+
| Virtual Machines |
+-------------------------+
| Hypervisor |
+-------------------------+
| Physical Hardware |
+-------------------------+
There is no conventional host operating system underneath the hypervisor.
Type 1 hypervisors are commonly associated with enterprise and data-center virtualization.
Examples include technologies such as:
VMware ESXi
Microsoft Hyper-V
Xen
Cloud providers use specialized virtualization technologies and infrastructure that may differ from these traditional products.
VMware ESXi
Microsoft Hyper-V
Xen
Type 2 Hypervisor
A Type 2 hypervisor runs on top of a host operating system.
+-------------------------+
| Virtual Machine |
+-------------------------+
| Type 2 Hypervisor |
+-------------------------+
| Host OS |
+-------------------------+
| Physical Hardware |
+-------------------------+
This model is commonly used on developer desktops and laptops.
Examples include:
Oracle VirtualBox
VMware Workstation
Parallels Desktop
For example, a developer running Linux inside a Windows laptop can use a Type 2 hypervisor to create a virtual machine.
Oracle VirtualBox
VMware Workstation
Parallels Desktop
Type 1 vs Type 2
The distinction is useful for understanding virtualization, although modern virtualization stacks can be more sophisticated than this simple classification suggests.
How a Cloud VM Is Created
When you create a VM through a cloud console or API, several layers are involved.
Conceptually:
User
|
| Create VM
v
Cloud API
|
v
Compute Control Plane
|
v
Virtualization Infrastructure
|
v
Physical Host
|
v
Hypervisor
|
v
Virtual Machine
The cloud platform selects suitable physical infrastructure and creates the requested virtual resources.
The user then interacts with the VM as though it were a physical server.
Virtual CPU
A VM doesn't normally receive a physical CPU core directly.
Instead, the hypervisor presents virtual CPUs (vCPUs) to the guest operating system.
For example:
Physical CPU
|
+-------------------------+
| |
v v
VM-A VM-B
4 vCPU 2 vCPU
The virtualization platform schedules the virtual CPUs onto available physical CPU resources.
This allows physical CPU capacity to be shared among multiple VMs.
Virtual Memory
Virtual machines also receive virtual memory.
For example:
Physical Memory
|
+--------------------------+
| |
v v
VM-A VM-B
16 GB 8 GB
The virtualization layer maintains mappings between guest virtual memory and physical memory.
Depending on the virtualization platform and configuration, techniques such as memory overcommit, ballooning, and hardware-assisted virtualization can influence how memory is managed.
Virtual Storage
A VM typically sees a virtual disk rather than a physical disk directly.
VM
|
| Virtual Disk
v
Hypervisor
|
v
Storage System
|
v
Physical Storage
In cloud environments, that underlying storage may be backed by distributed storage systems rather than a single physical disk.
This abstraction allows cloud providers to provide features such as:
Snapshots
Volume resizing
Replication
Backup
Encryption
High availability
Snapshots
Volume resizing
Replication
Backup
Encryption
High availability
Virtual Networking
Networking is also virtualized.
A VM may see:
Virtual NIC
|
v
Virtual Switch
|
v
Physical Network
|
v
Cloud Network
The cloud platform can then provide higher-level networking capabilities such as:
Private networks
Subnets
Routing
Security groups
Firewalls
Load balancers
NAT
Internet connectivity
This is one reason cloud networking can be managed through APIs instead of manually configuring physical switches.
Private networks
Subnets
Routing
Security groups
Firewalls
Load balancers
NAT
Internet connectivity
Hardware-Assisted Virtualization
Modern processors include hardware features that make virtualization more efficient.
Examples include:
Intel VT-x
AMD-V
These CPU capabilities allow virtualization platforms to execute guest workloads more efficiently while maintaining isolation between virtual machines.
Modern hypervisors also use technologies such as second-level address translation to improve memory virtualization performance.
Intel VT-x
AMD-V
Hypervisor vs Container
Hypervisors and containers both provide isolation, but they work at different levels.
Virtual Machine
+-----------------------+
| Application |
+-----------------------+
| Guest OS |
+-----------------------+
| Virtual Hardware |
+-----------------------+
| Hypervisor |
+-----------------------+
| Physical Hardware |
+-----------------------+
Container
+-----------------------+
| Application |
+-----------------------+
| Libraries |
+-----------------------+
| Container Runtime |
+-----------------------+
| Host OS / Kernel |
+-----------------------+
| Physical/Virtual Host |
+-----------------------+
A VM normally includes a complete guest operating system.
Containers share the host kernel while isolating application processes and their environments.
Virtual Machines vs Containers
This doesn't mean containers have replaced VMs.
In fact, they often work together.
How Kubernetes Fits Into the Picture
Modern cloud platforms frequently combine several layers of abstraction.
A simplified architecture might look like:
Application
|
Pod/Container
|
Kubernetes
|
Container Runtime
|
Virtual Machine
|
Hypervisor
|
Physical Server
This is an important concept.
A Kubernetes cluster may run on virtual machines, while those virtual machines themselves run on physical servers managed by a virtualization platform.
So the technologies are not necessarily competing with one another.
They operate at different layers.
Cloud Computing: From Hardware to Application
The complete stack can be visualized as:
+--------------------------------------+
| Applications |
+--------------------------------------+
| Containers / Kubernetes |
+--------------------------------------+
| Operating System |
+--------------------------------------+
| Virtual Machine |
+--------------------------------------+
| Hypervisor |
+--------------------------------------+
| Physical Infrastructure |
+--------------------------------------+
| CPU | Memory | Storage | Network |
+--------------------------------------+
Cloud providers abstract many of these layers from the customer.
A developer may simply request:
8 vCPU
32 GB RAM
500 GB Storage
Linux
The cloud platform handles the underlying infrastructure required to provide those resources.
Why Hypervisors Matter to Cloud Engineers
Understanding hypervisors helps explain many cloud concepts that otherwise appear abstract.
For example:
Why a VM has vCPUs instead of physical CPUs
How multiple VMs can run on one physical server
Why VM isolation is possible
How cloud providers achieve infrastructure utilization
How virtual networking works
How virtual storage is presented to VMs
Why containers and VMs have different characteristics
How Kubernetes can run on virtual infrastructure
A cloud engineer doesn't necessarily need to manage the hypervisor directly, but understanding the virtualization layer makes it much easier to reason about performance, isolation, resource allocation, availability, and cost.
Why a VM has vCPUs instead of physical CPUs
How multiple VMs can run on one physical server
Why VM isolation is possible
How cloud providers achieve infrastructure utilization
How virtual networking works
How virtual storage is presented to VMs
Why containers and VMs have different characteristics
How Kubernetes can run on virtual infrastructure
Final Takeaway
Cloud computing is built on several layers of abstraction.
At the infrastructure level, virtualization and hypervisors allow physical computing resources to be divided into isolated virtual machines.
Containers then provide another layer of application-level isolation, and orchestration platforms such as Kubernetes can manage those containers at scale.
The relationship can be summarized as:
Physical Hardware
↓
Hypervisor
↓
Virtual Machines
↓
Container Runtime
↓
Containers
↓
Kubernetes
↓
Applications
Understanding this stack is essential for anyone working in Cloud Engineering, DevOps, Data Engineering, Solution Architecture, or Kubernetes.