The layers of a cloud server
Video 002 of 140 in Virtualization Foundations, in the unit “The whole stack in one picture”. 2:54, with English and Hindi audio.
When a customer's app runs in a cloud, it sits on top of several layers of software and hardware. Each layer has one job, and each one rests on the layer below it. This article names the layers from the physical metal up to the app, explains how a physical server differs from a virtual machine, and shows why a fault in a lower layer reaches every layer above it. Knowing the stack tells you where to look first when something fails.
What you will learn
- The stack runs from the hardware, through the host operating system and the hypervisor, to the virtual machine and its guest operating system.
- A virtual machine holds its own guest operating system, and the customer's app runs on that guest.
- A fault in a lower layer affects every layer above it, so check the lower layers first.
- In some products the hypervisor and the host operating system are one program.
Think of a building: each layer rests on the one below
Think of a tall building. The ground holds up each floor, and each floor rests on the one below it. The top floor is where people actually work, just as the customer's app is the part the customer uses.
The comparison breaks in one place. Some virtual machines can be moved to another server while they run, if the products allow it. A floor cannot be moved. The conditions for a move vary by product, so check them before you plan one.
The stack from the metal up
- Hardware: the CPU, memory, disks and network cards, at the bottom.
- Host operating system: the server's own operating system, which manages the hardware for the layers above. It is often Linux.
- Hypervisor: a program that cuts the server into virtual machines, and keeps them apart from one another.
- Virtual machine: a slice of the server, holding one guest operating system and its apps. The guest is the operating system that the machine sees.
Each virtual machine runs its own guest operating system, and the customer's app runs on top of it. In some products, the hypervisor and the host operating system are one program, so the stack has one layer fewer.
A physical server and a virtual machine compared
A physical server has real CPU, memory and disks under one host operating system. A virtual machine has virtual hardware, which the hypervisor presents to its own guest operating system.
The guest believes the hardware is its own. It cannot see the other virtual machines on the same server. The host, by contrast, sees all the real hardware.
How a fault in a lower layer reaches the layers above
Picture one server with two virtual machines on it, running through the hypervisor and the host operating system. If the hardware fails, every layer above it fails too, so both virtual machines are affected at once.
If only one guest operating system crashes, usually only that one machine is affected. When a service stops, ask which layer failed first, and start your search there.
Terms
- Host operating system
- The operating system that runs on the physical server and manages its hardware for the layers above.
- Hypervisor
- The program that cuts a server into virtual machines, shares out their resources and keeps them apart.
- Guest operating system
- The operating system that runs inside a virtual machine and sees only that machine's slice of the hardware.
- Live migration
- Moving a running virtual machine to another server, where the product supports it.
Check yourself
What is the order of the layers from the bottom up?
Hardware, then the host operating system, then the hypervisor, then the virtual machine with its guest operating system and the customer's app.
What does a guest operating system see?
Only its own slice of the server, made by the hypervisor. It cannot see the other virtual machines on the same server.
Why should you check the lower layers first when a service stops?
A fault in a lower layer reaches every layer above it, so the lower layer is the likely cause of failures higher up.
Previous: What is cloud compute?. Next: Where storage and networking sit.