How do Virtual Machines (VMs) Work?

Virtualization is a foundational technology that enables cloud computing. It not only brings several benefits, such as better resources usage, speed, and the possibility to deploy different operating systems on the same hardware (multi-tenancy), cloud computing would not even be possible without it. This article describes how virtualization and virtual machines work and how they differ from the traditional approach.

In traditional IT, someone would first have the hardware, including components such as processors and storage – for example, a laptop. On this laptop, there is an operating system (OS) installed, for instance, Windows. On top of the OS, there are different applications installed, such as an application to write documents, an application for video chat, and an email program.

Imagine that you would like to run an application that requires a different OS or that you do not want to run on the same OS as your email program for some reason. To achieve this, you would like to deploy a different, additional OS on your hardware. Therefore, you would install a hypervisor. A hypervisor is installed like an application on the initial OS of your hardware. However, it can simulate direct access to the hardware of your laptop. This allows you to install an additional OS on top of the hypervisor in a so-called virtual machine (VM). For this guest OS, the hypervisor simulates the real hardware and provides access according to the specifications of the VM. As a result, the OS can run as if it were directly installed on the laptop, i.e. the OS does not know that it is only running in a virtual environment. On top of the guest OS, applications that can only run on this OS can be installed that cannot be installed outside the VM. In addition to the above, a hypervisor is capable to create multiple VMs and running multiple guest OS in them – all with access to a particular amount of the real resources.

Cloud services are based on this technology. In the case of a cloud, the hypervisor is installed on the server of a cloud provider, and on top of the hypervisor, there are usually several VMs running. The usual case, which is most efficient in terms of resources, is that several customers share the same hypervisor on one server – each with its own VM. This architecture is called multi-tenant architecture (where tenant means customer). In some cases, often due to compliance regulations, e.g. in banking, customers are not allowed to share the same physical hardware with other tenants/customers. In such a case, their VM is the only one running on the hypervisor on one physical server. This architecture is called single-tenant architecture.

The typical cloud advantages can be realized because the VMs running on the hypervisor are easy to start, stop, transfer, or copy. Therefore, the resources that the guest OS has available can be flexibly adapted to the current need by providing a greater part of resources from the current server or by adding another physical server. Also, failures can be easier dealt with. If a physical server fails, the VMs that were running on that server can be easily and quickly restarted on another server. On top, the possibility to copy and back up the VMs is often used for disaster recovery. In such a case, a copy of the VM is regularly updated, so that data loss in case of a physical server failure is minimized.

Leave a comment

Your email address will not be published. Required fields are marked *

Pin It on Pinterest