In the previous lesson we defined the cloud by its five characteristics: self-service, network access, resource pooling, elasticity, and measured service. Now we open the "black box" to see how they are achieved. Behind every click in a cloud console there are buildings the size of several football pitches, hundreds of thousands of servers, a software layer called virtualization that makes it possible to split each physical machine among many customers, and a control plane that automates the whole process. You do not need to be a data center engineer to work with the cloud, but understanding these mechanisms will let you reason about performance, isolation, failures, and costs, and will help you understand why IaaS, PaaS, and SaaS exist in the shape they do.

  1. Cloud-scale data centers

A data center is a building designed to house computing equipment under optimal conditions. The large cloud providers run data centers of massive scale (often called hyperscale), grouped into the regions and availability zones we saw in Basic Concepts of Cloud Computing.

1.1 Hardware

  • Servers in racks. Servers are mounted in standard cabinets (racks) and these are lined up in rows. The large providers usually design their own hardware, stripping out everything they do not need (graphics cards, USB ports, decorative casings) to cut cost and complexity.
  • Storage. Large arrays and clusters of disks (SSDs and mechanical disks) offered to customers as virtual disks or object storage.
  • Network. High-capacity switches and routers that interconnect thousands of servers and link the data center to the internet and to the other zones.
  • Specialised hardware. GPUs and accelerators for artificial intelligence, and cards that offload work from the main CPU (we will see this with AWS Nitro).

1.2 Power

A large data center consumes as much electricity as a small city. That is why it has:

  • Several independent power feeds.
  • UPS (uninterruptible power supplies) with batteries covering the first seconds or minutes of an outage.
  • Diesel generators (or other sources) that start up if the outage drags on.
  • A key efficiency measure is PUE (Power Usage Effectiveness): the building's total energy divided by the energy that reaches the computing equipment. A PUE of 1.0 would be perfect; the large providers report figures close to 1.1-1.2, while a typical corporate server room is usually well above that.

1.3 Cooling

Servers turn almost all the energy they consume into heat. Hot and cold aisles are used, outside-air cooling when the climate allows, water, and, increasingly, direct liquid cooling for AI racks, which pack a lot of power into very little space.

1.4 Redundancy and physical security

  • The N+1 or 2N principle applies: there is always at least one spare component (power supply, air conditioning unit, network link) so that a failure does not stop the service.
  • Physical security: fences, biometric access control, 24-hour surveillance, a log of who comes in and out, and certified disk destruction at end of life.
  • At this scale, hardware fails constantly (with hundreds of thousands of disks, some break every day). The cloud is not built on nothing ever failing, but on software detecting failures and routing around them automatically.
Aspect Hortalia's warehouse cabinet A cloud provider's data center
Power supply One socket and, with luck, a small UPS Several feeds, UPS, generators
Cooling Warehouse air Industrial systems designed for the job
Redundancy None: a single server N+1 or 2N in every component, several zones
Physical security A key to the cabinet Biometric control, 24/7 surveillance
Staff Laura, when she can Specialised teams 24/7

  1. Virtualization: one physical machine, many virtual machines

Virtualization is the technology that makes it possible to run several virtual machines (VMs) on a single physical server. Each VM believes it has its own hardware (CPU, memory, disk, network card) and runs its own operating system, but in reality they all share the same physical machine.

The software that makes this possible is called a hypervisor (or VMM, Virtual Machine Monitor). Its jobs are to:

  • Share out the physical resources (CPU cores, memory, disk, network) among the VMs.
  • Isolate the VMs from one another, so that none can read another's memory or disks.
  • Translate or broker accesses to the hardware.

Why does this matter so much for the cloud? Because without virtualization each customer would need an entire physical server. With it:

  • A physical server with 96 cores and 768 GB of RAM (illustrative figures) can host dozens of small VMs belonging to different customers. This is resource pooling.
  • Creating a VM means creating a few files and reserving resources, something software does in seconds. This is what makes self-service and elasticity possible.
  • The hypervisor knows exactly how many resources each VM uses. This is what makes measured service possible.

Modern processors include virtualization-specific extensions (Intel VT-x, AMD-V, and their ARM equivalents) that let VMs run at almost the same speed as real hardware.

  1. Type 1 and type 2 hypervisors

There are two broad types of hypervisor:

flowchart TB
    subgraph T1["Type 1 (bare metal)"]
        direction TB
        A1["VM 1<br/>Linux"] --- H1
        A2["VM 2<br/>Windows"] --- H1
        H1["Hypervisor"] --- HW1["Physical hardware"]
    end
    subgraph T2["Type 2 (hosted)"]
        direction TB
        B1["VM 1<br/>Linux"] --- H2
        H2["Hypervisor<br/>(application)"] --- OS2["Host operating system"]
        OS2 --- HW2["Physical hardware"]
    end
  • Type 1 (native or bare metal): installed directly on the hardware, with no operating system in between. It is more efficient and more secure, and it is the one used in data centers and in the cloud.
  • Type 2 (hosted): runs as an application inside a conventional operating system. It is handy on a laptop (trying out another operating system, training labs), but it adds a layer and is not used to serve public clouds.
Hypervisor Type Where it is used
VMware ESXi (Broadcom) Type 1 Enterprise data centers, private clouds
Microsoft Hyper-V Type 1 Windows Server, the foundation of Azure's infrastructure
KVM (Kernel-based Virtual Machine) Type 1 (built into the Linux kernel) OpenStack, Google Cloud, and many other providers
AWS Nitro Type 1 (KVM-based, heavily stripped down) Amazon EC2 instances
Xen Type 1 Older generations of EC2, some providers
Oracle VirtualBox Type 2 Laptops and desktop machines
VMware Workstation / Fusion Type 2 Laptops and desktop machines

The AWS Nitro case illustrates where the industry is heading. Instead of a "fat" hypervisor doing everything on the main CPU, AWS moves networking, storage, management, and security onto dedicated hardware cards (the Nitro cards) and leaves a minimal hypervisor behind. The result: almost all of the server's CPU is available to customers, and the attack surface is smaller. The other large providers follow similar strategies with their own chips and cards.

3.1 Checking whether you are inside a virtual machine

A curious exercise: from a Linux system you can find out whether you are on a VM and which hypervisor is underneath. These commands work on most modern distributions:

# 1. Am I virtualized? With what technology?
systemd-detect-virt

# 2. CPU information, filtering the relevant lines
lscpu | grep -iE "hypervisor|virtualization"

Typical output on an AWS EC2 VM:

amazon
Hypervisor vendor:   KVM
Virtualization type: full

Explanation:

  • Lines starting with # are comments: the system ignores them; they are there to document.
  • systemd-detect-virt is a systemd utility that detects virtualization. It returns the name of the technology (kvm, microsoft for Hyper-V, vmware, amazon for Nitro, oracle for VirtualBox...) or none if you are on a physical machine.
  • lscpu shows processor information. With | (a pipe) we send its output to grep, which filters only the lines containing "hypervisor" or "virtualization"; -i ignores case and -E allows | to be used as "or".
  • In the output we can see that the VM runs on Nitro, whose core is based on KVM, and that the virtualization is full.

If you ran systemd-detect-virt on Hortalia's cabinet server (running Linux), you would get none: it is a physical machine.

  1. Virtual machines versus containers

VMs are not the only way to share a server. Containers (popularised by Docker) are another, lighter technique, which today underpins many PaaS services.

  • A virtual machine virtualizes the hardware: each VM includes its own complete operating system (kernel included).
  • A container virtualizes the operating system: all the containers on a machine share the kernel of the host system, and each one only includes the application and its libraries.
flowchart TB
    subgraph VM["Virtual machines"]
        direction TB
        V1["App A<br/>Libraries<br/>Full guest OS"] --- VH["Hypervisor"]
        V2["App B<br/>Libraries<br/>Full guest OS"] --- VH
        VH --- VHW["Hardware"]
    end
    subgraph CT["Containers"]
        direction TB
        C1["App A<br/>Libraries"] --- CR["Container engine"]
        C2["App B<br/>Libraries"] --- CR
        CR --- COS["Host OS (shared kernel)"]
        COS --- CHW["Hardware (physical or a VM)"]
    end
Criterion Virtual machine Container
What it virtualizes Hardware Operating system
Includes its own kernel Yes No, it shares the host's
Typical size Gigabytes Megabytes to hundreds of megabytes
Start-up time Tens of seconds to minutes Milliseconds to seconds
Isolation Very strong (hypervisor boundary) Weaker by default (shared kernel)
Different operating systems on the same machine Yes (Windows and Linux at once) No: the container must be compatible with the host kernel
Typical use Legacy applications, complete systems Modern applications, microservices

Two important nuances:

  • They are not mutually exclusive. In the cloud, containers usually run inside VMs: the provider isolates customers with VMs and, inside, each customer runs their containers.
  • There are intermediate solutions, microVMs (such as Firecracker, created by AWS for its serverless services), which offer the isolation of a VM with start-up almost as fast as a container's.

At Hortalia: the ERP (Windows Server + SQL Server) is a complete, legacy system; it fits naturally into a VM. Marc's store (Python/Flask) is a modern application that could be packaged into a container. This intuition will come in handy when we compare service models.

  1. Multi-tenancy and isolation

Multi-tenancy means that several customers (tenants) share the same infrastructure without seeing each other, just as the neighbours in a block share the structure, the lift, and the plumbing, but each one has their own flat locked with a key.

Multi-tenancy exists at every layer:

Layer What is shared How it is isolated
Compute Physical servers Hypervisor: each customer in their own VMs
Network Cables, switches, routers Virtual networks (VPC/VNet), traffic tagging and encryption
Storage Arrays and disks Separate logical volumes, encryption with per-customer keys
Application (SaaS) The same application and sometimes the same database A tenant identifier on every record, logical access controls

Risks and how providers counter them:

  • "Noisy neighbor": a VM consuming huge amounts of resources could slow the others down. This is mitigated with per-VM resource limits and reservations.
  • Side-channel attacks: CPU vulnerabilities (such as the famous Spectre and Meltdown of 2018) showed that, in theory, one process could infer another's data on the same processor. Providers responded with patches, new hardware, and hardened isolation options.
  • Dedicated hosts: for licensing or compliance requirements, providers offer physical servers reserved for a single customer (for example, Dedicated Hosts on AWS and Azure or sole-tenant nodes on Google Cloud), at a higher price.

Isolating the infrastructure is the provider's responsibility; how you configure access to your resources is yours. We will see this in The Shared Responsibility Model.

  1. APIs and the control plane: from a request to a virtual machine

The piece that turns a pile of virtualized servers into a cloud is the control plane: the set of systems that receive customer requests and carry them out automatically.

It is worth distinguishing two planes:

  • Control plane: creating, modifying, deleting, and querying resources. "Create a VM", "grow this disk", "delete this database".
  • Data plane: the use of the resource once created. The web traffic arriving at the VM, the reads and writes on the disk.

Everything in the cloud is an API: the web console, the CLI, and automation tools are simply different ways of calling the same APIs. Let us look at what happens when Laura creates a VM with the Azure CLI:

az vm create \
    --resource-group rg-hortalia-pruebas \
    --name vm-prueba-erp \
    --image Win2022Datacenter \
    --size Standard_D4s_v5 \
    --location spaincentral \
    --admin-username laura

Explanation:

  • az vm create: the Azure CLI command for creating a virtual machine. Underneath, the CLI builds an HTTPS request to the Azure API (Azure Resource Manager).
  • --resource-group: the "logical container" where the project's resources are grouped.
  • --name: the name of the VM.
  • --image Win2022Datacenter: the starting image, here Windows Server 2022.
  • --size Standard_D4s_v5: the size of the VM (4 vCPUs and 16 GB of RAM in this family).
  • --location spaincentral: the region (Madrid).
  • --admin-username: the administrator user; the CLI will ask for the password interactively.

What happens next, in a few seconds or a couple of minutes:

sequenceDiagram
    participant L as Laura (CLI)
    participant API as Provider API
    participant IAM as Identity and permissions
    participant SCH as Scheduler
    participant H as Physical server (hypervisor)
    participant F as Billing
    L->>API: HTTPS request "create VM" (signed with her credentials)
    API->>IAM: Who is she and does she have permission?
    IAM-->>API: Authorized
    API->>SCH: Find room: 4 vCPUs, 16 GB, Madrid region
    SCH->>H: Reserve resources on a host with free capacity
    H->>H: Create disk from the image, set up virtual network, start VM
    H-->>API: VM running
    API->>F: Start counting usage
    API-->>L: JSON response with the VM details
  1. Authentication and authorization: the control plane checks who is making the request and whether they have permission.
  2. Scheduling: a scheduler picks a physical server with free capacity in the requested region (and zone), taking into account quotas, load spreading, and failure domains.
  3. Provisioning: the agent on the physical server creates the disk from the image, connects the VM to the customer's virtual network, and starts it through the hypervisor.
  4. Metering: from that moment on, usage is counted towards the invoice.
  5. Response: the customer receives the VM details (identifier, IP, state) in JSON format.

Here you can see the five NIST characteristics working together: self-service (nobody from the provider gets involved), network access (an API over HTTPS), resource pooling (the scheduler picks a shared host), elasticity (it is repeated for 1 or for 100 VMs), and measured service (automatic billing).

  1. Orchestration at scale

A cloud provider runs millions of VMs and containers. Doing that by hand would be impossible; that is why everything is orchestrated: software systems that automatically decide where each workload runs and react to changes and failures. Some of their tasks:

  • Smart placement: spreading a customer's VMs across different racks and zones so that one failure does not hit them all.
  • Self-healing: if a physical server fails, restarting its VMs on another. In many cases, live migration: moving a running VM to another host for maintenance without the customer noticing an interruption.
  • Capacity management: forecasting demand and adding hardware before it runs out.
  • Continuous updating: patching the hypervisor and firmware in a staged fashion.

Customers also use orchestrators for their own workloads; the best known is Kubernetes, which coordinates containers across a set of machines. We will talk about it and about managed container services in Types of PaaS. Google, for example, developed the Borg system internally, the conceptual ancestor of Kubernetes.

  1. Why is Hortalia's cabinet server not a cloud?

With all of the above, we can give a precise answer to a question Laura asked herself in the previous lesson. Imagine she decided to install Hyper-V on a new server and create several VMs there (one for the ERP, another for testing the store). Would Hortalia have "its own cloud"?

Required element Virtualized server in the cabinet Public cloud
Virtualization Yes (Hyper-V) Yes
Self-service through an API for users No: everything goes through Laura Yes
A large, shared pool No: a single server Yes: thousands of servers
Elasticity Limited to the hardware bought Practically unlimited for Hortalia
Fault tolerance If the server dies, every VM dies Several zones, self-healing
Metering and pay-per-use No Yes
Professional power, cooling, and physical security No Yes

Conclusion: virtualization is necessary, but not sufficient. A virtualized server is a more efficient server; for there to be a cloud you also need a control plane with self-service, a large resource pool, metering, and a data center's physical infrastructure and redundancy. Virtualizing the cabinet would even increase the risk: it would put all the eggs (ERP and testing) in the same basket.

Common Mistakes and Tips

  • Thinking that "virtualizing" means "having a cloud". Without self-service, metering, and elasticity, it is just virtualization.
  • Believing containers always replace VMs. They solve different problems; in the cloud they coexist, and containers usually run inside VMs.
  • Assuming containers isolate as well as a VM. They share a kernel; for workloads belonging to different customers, extra layers are added (VMs, microVMs).
  • Forgetting that hardware fails. The cloud does not promise that a server will never go down; it promises tools so that your service survives that outage. Designing around a single VM repeats the cabinet problem.
  • Tip: when you use the web console, remember that everything you do is an API call. Learning your provider's CLI early will prepare you for the automation we will see in Infrastructure as Code.

Exercises

Exercise 1. Classify each as a type 1 or type 2 hypervisor and explain what you would use it for: a) VirtualBox on Marc's laptop; b) Hyper-V on a Windows Server; c) VMware ESXi in a data center; d) KVM on a provider's Linux server.

Exercise 2. Marc wants to test the store on his laptop in an environment as close to production as possible, and Laura has to decide how to host the legacy Windows Server ERP. For each case, VM or container? Justify your answer using the comparison table.

Exercise 3. Put in order the steps the control plane follows when creating a VM and point out at which step each NIST characteristic materialises: the scheduler picks a host, JSON is returned, permissions are checked, metering starts, the hypervisor starts the VM, the customer sends the HTTPS request.

Solutions

Solution 1.

Case Type Use
a) VirtualBox Type 2 Lab work or testing on a personal machine
b) Hyper-V Type 1 Server virtualization in the company; the foundation of Azure
c) VMware ESXi Type 1 Data center virtualization, private cloud
d) KVM Type 1 Cloud infrastructure (OpenStack, Google Cloud, the basis of Nitro)

Common mistake: considering Hyper-V a type 2 hypervisor because "it is installed from Windows". Once enabled, the hypervisor runs directly on the hardware and Windows itself becomes a privileged partition on top of it.

Solution 2.

  • The store on Marc's laptop → container. The Python/Flask application and its PostgreSQL can be packaged into lightweight containers that start in seconds and behave identically on the laptop and on the server, because they carry their libraries inside.
  • Legacy ERP → VM. It needs a complete Windows Server operating system with SQL Server, and it is software that was never designed for containers. A VM replicates the current physical server with strong isolation.

Solution 3.

  1. The customer sends the HTTPS request → broad network access and self-service (nobody from the provider gets involved).
  2. Permissions are checked (authentication and authorization).
  3. The scheduler picks a host → shared resource pooling.
  4. The hypervisor starts the VM → this enables elasticity (the process repeats in seconds for one VM or a hundred).
  5. Metering starts → measured service.
  6. JSON is returned with the VM details.

Conclusion

You have seen that the cloud rests on three pillars: data centers designed for redundancy and efficiency at scale; virtualization, which makes it possible to share each server among many customers using type 1 hypervisors such as KVM, Hyper-V, ESXi, or Nitro (with containers as the lightweight alternative); and an API-based control plane that automates the creation, metering, and repair of resources, supported by massive orchestration. You have also confirmed that virtualizing a server is not enough to have a cloud: Hortalia's cabinet would still lack self-service, scale, metering, and redundancy.

Now that you know how the cloud works inside, it is time to assess whether it suits a company like Hortalia: what it gains, what it risks, and when it is not worth it. We will analyse that, with illustrative numbers, in the next lesson: Advantages and Disadvantages of Cloud Computing.

© Copyright 2026. All rights reserved