Where storage and networking sit
Video 003 of 140 in Virtualization Foundations, in the unit “The whole stack in one picture”. 2:57, with English and Hindi audio.
A virtual machine needs more than processor power and memory. It needs a disk to keep its files, and a network connection to reach people and other machines. Those two parts sit outside the virtual machine, beside the compute layers. This article shows where the real storage and networking are, how one save travels from an app down to real storage, and how storage and network faults show up when they go wrong.
What you will learn
- A virtual disk is usually a file, kept on storage that the host can reach.
- Real storage is either local disks inside the server or an array reached over the network.
- A virtual network card joins a virtual switch, which uses the server's physical network cards.
- Storage faults show up as slowness, and network faults show up as a machine nobody can reach.
Why a disk cannot stay on one server
Start with the disk. A virtual machine's disk is usually a file, and that file sits on storage the host can reach. If the storage sits inside the same server, the data stays there. If that server fails, the machine stops, and its data is hard to reach.
Take a shop's database, which must keep its files even when a server fails. Shared storage solves this. It is an array on the network, and any host that can reach it can start the machine again. So many clouds keep disks on shared storage.
How one save travels from the app to the disk
- The app writes data to a file, as usual. It does not know where the disk really is.
- The guest operating system passes the write to its disk driver, which believes it is talking to a real disk.
- The hypervisor turns that virtual disk into a request on the host. Often, the virtual disk is a file kept on the host's storage.
- From there, the data reaches real storage: local disks inside the server, or an array reached over a network connection.
The virtual parts and their real partners
The guest sees a disk and a network card. Both are virtual, made by the hypervisor from parts that really exist. A virtual disk is a file the hypervisor shows to the guest as a disk. A virtual network card is a port that the hypervisor joins to a virtual switch.
The real storage sits beside the server, in its own disks or in an array reached over the network. The real network is the server's physical network cards, and the switches that connect them to the rest. The hypervisor sits in the middle, carrying each virtual part to its real partner.
What goes wrong, and how you notice it
- Slow disk: every save and every read must wait for the disk, so pages load slowly.
- Cut network path: the machine runs, but nobody can reach it. The cause may be a physical network link or a switch port.
You notice these faults when users complain, or when outside checks fail while the machine still shows as running.
Terms
- Virtual disk
- A file that the hypervisor shows to a guest operating system as if it were a real disk.
- Virtual switch
- A software switch inside the hypervisor that connects virtual network cards to the server's physical network.
- Storage array
- A set of disks in one unit, reached over a network, that holds data for many servers.
- Shared storage
- Storage that several hosts can reach, so any of them can start a machine whose disk is kept there.
Check yourself
Why do many clouds keep virtual machine disks on shared storage?
If a host fails, another host that can reach the shared storage can start the machine again, so the data stays available.
What does a virtual network card connect to?
A virtual switch in the hypervisor, which uses the server's physical network cards to reach the rest of the network.
How does a slow disk usually show itself to users?
Pages load slowly, because every save and read must wait for the disk.
Previous: The layers of a cloud server. Next: The control plane, in one picture.