2021-11-13 11:58:46 +00:00
|
|
|
---
|
|
|
|
title: Lexicon
|
|
|
|
description:
|
|
|
|
published: true
|
2022-01-12 15:43:14 +00:00
|
|
|
date: 2022-01-12T15:43:12.102Z
|
2021-11-13 11:58:46 +00:00
|
|
|
tags:
|
|
|
|
editor: markdown
|
|
|
|
dateCreated: 2021-11-13T11:58:43.776Z
|
|
|
|
---
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
# Key terms related to virtualization
|
2021-11-13 18:47:25 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Emulator
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Emulators or virtualizers are software that provide material components
|
|
|
|
similar to physical hardware, but that are made of computer code instead
|
|
|
|
of silicon, -- virtual hardware --, such as virtual floppy disks.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
QEMU is a popular emulator that can act as a simulator or virtual
|
2021-11-15 15:26:10 +00:00
|
|
|
machine monitor. In the latter case, it can leverage hardware
|
|
|
|
acceleration,
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Hardware-assisted virtualization
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Hardware-assisted virtualization is a feature of certain computer
|
|
|
|
hardware made to take advantage of virtualization.
|
|
|
|
|
|
|
|
Such hardware reduces the overheads associated with virtualization and
|
|
|
|
is thus key to unlocking near-native performance for virtual machines.
|
|
|
|
In other words, hardware-assisted virtualization translates into better
|
|
|
|
performance for virtualized workloads, significantly reducing the gap in
|
|
|
|
performance between a virtual machine and a physical one.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Nested-virtualization
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Nested-virtualization refers to the ability to run a virtual machine
|
|
|
|
inside another virtual machine.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Virtualization
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Most computers are made of hardware and software. By analogy, the brain
|
|
|
|
that animates the cells to control a body can be thought as the
|
|
|
|
operating system that controls components of its body.
|
|
|
|
|
|
|
|
Virtualization can be defined as the ability to run a software-based
|
|
|
|
computer inside a physical computer. , It is a set of computer-related
|
|
|
|
techniques that make it possible to create replicas of computer hardware
|
|
|
|
out of computer code. Those replicas are often referred to as virtual
|
|
|
|
machines.
|
|
|
|
|
|
|
|
There are roughly three types of virtualization:
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* **Simulation or emulation**: when a computer is fully emulated and
|
2021-11-15 15:26:10 +00:00
|
|
|
can be made to look like any device to an operating system
|
2022-01-12 15:43:14 +00:00
|
|
|
* **Partition**: when computer resources are split such that each
|
2021-11-15 15:26:10 +00:00
|
|
|
operating system can only see a subset of available hardware
|
|
|
|
resources
|
2022-01-12 15:43:14 +00:00
|
|
|
* **Paravirtualization**: when both hardware and software-assisted
|
2021-11-15 15:26:10 +00:00
|
|
|
virtualization is being used. In this case, the guest is aware that
|
|
|
|
it is running in the virtualized environment, and acts accordingly.
|
|
|
|
|
|
|
|
Virtualization is used to better isolate resources on a physical
|
|
|
|
computer and to distribute them across various workloads, enabling
|
|
|
|
better use of resources through consolidation. For instance, with
|
|
|
|
virtualization, multiple operating systems can run concurrently on a
|
|
|
|
physical machine.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Hypervisor
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
A hypervisor is an operating system or firmware that is designed to run
|
|
|
|
guest systems: it handles scheduling, execution of hyper privileged
|
|
|
|
instructions, memory management and over-commitment, and provides
|
|
|
|
drivers for physical devices.
|
|
|
|
|
|
|
|
The Virtual Machine Monitor (VMM) is a software that runs on top of the
|
|
|
|
hypervisor and manages the life cycle of a virtual machine. It provides
|
|
|
|
device models for emulated devices and implements tasks such as start,
|
|
|
|
suspend, migrate, and stop virtual machines.
|
|
|
|
|
|
|
|
The hypervisor and VMM work in tandem with emulators, which provide them
|
|
|
|
virtual hardware.
|
|
|
|
|
|
|
|
As of 2021, there are two major open-source hypervisor that are both are
|
|
|
|
able to leverage hardware-assisted virtualization:
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
- Xen (2003)
|
|
|
|
- Kernel-based Virtual Machine (KVM) module for Linux (2007)
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
## Device
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Devices are computer components that can be attached to machines. They
|
|
|
|
can be classified in two ways : physical or emulated.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
| | Physical hardware | Emulated: model-based | Emulated: paravirtual |
|
|
|
|
| :- | :-: | :-: | :-: |
|
|
|
|
| *Design* | Specific | Specific | Generic |
|
|
|
|
| *Type* | Silicon-based | Software-based | Software-based |
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Physical
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Physical components refer to devices that can be attached to a
|
2021-11-15 15:26:10 +00:00
|
|
|
system. For instance, a dedicated physical graphics card
|
|
|
|
attached to a physical system can be directly attached to a
|
|
|
|
virtual machine, which then becomes responsible for managing it,
|
|
|
|
a technique called *passthrough*. The PCI-SIG standards provide
|
|
|
|
IOMMU-related specifications to allow a host operating system to
|
2022-01-12 15:43:14 +00:00
|
|
|
not have a driver for a particular device and passthrough
|
2021-11-15 15:26:10 +00:00
|
|
|
the device to the guest. The guest will have a device with
|
|
|
|
nearly native performance, and use the standard vendor's drivers
|
|
|
|
for the device.
|
2022-01-12 15:43:14 +00:00
|
|
|
* The PCI-SIG standards also provide a way to partition compatible
|
2021-11-15 15:26:10 +00:00
|
|
|
devices using so-called Virtual Functions (VFs). In this case,
|
|
|
|
the host manages the way a physical device is used by the guest.
|
|
|
|
Both host and guest must have specific device drivers. It offers
|
|
|
|
nearly native performance.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Emulated
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Model-based
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Model-based emulated hardware are designed after real
|
2021-11-15 15:26:10 +00:00
|
|
|
devices, but are made out of computer code, not silicon. The
|
2022-01-12 15:43:14 +00:00
|
|
|
i440fx and Q35 chipsets are both instances of emulated
|
2021-11-15 15:26:10 +00:00
|
|
|
hardware. This is the slowest (but most compatible) way to
|
|
|
|
provide a device to a guest. An emulated GPU is not going to
|
|
|
|
be fast enough in an emulated mode to do 3D rendering.
|
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Paravirtual
|
2021-11-15 15:26:10 +00:00
|
|
|
|
2022-01-12 15:43:14 +00:00
|
|
|
* Paravirtual hardware, also known as paravirtualized Virtual
|
2021-11-15 15:26:10 +00:00
|
|
|
I/O devices or simply virtio, are also made out of computer
|
|
|
|
code. Contrary to emulated hardware, they function as a
|
|
|
|
generic piece of software-based hardware which doesn't
|
|
|
|
replicate a specific hardware component.
|
|
|
|
|
2021-11-15 16:20:36 +00:00
|
|
|
### Paravirtualization
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Paravirtualization refers to the emulation practice of letting an
|
|
|
|
operating system running in a virtualized environment know that it is
|
2022-01-12 15:43:14 +00:00
|
|
|
running in such an environment.
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
Under this configuration, more efficient communication methods are
|
|
|
|
available between the host and the guest, including VirtIO devices
|
|
|
|
(e.g.: virtio-net for network devices, virtio-blk for block storage
|
|
|
|
devices). Such devices can communicate directly with the host, instead
|
|
|
|
of emulating every single command of an IDE, SATA, SCSI or NVMe device,
|
|
|
|
as it is the case for model-based emulation.
|
|
|
|
|
2021-11-15 16:20:36 +00:00
|
|
|
### Virtual machine
|
2021-11-15 15:26:10 +00:00
|
|
|
|
|
|
|
A virtual machine is a recreation of a real, physical, silicon-based
|
|
|
|
computer using software. It performs almost exactly as a physical
|
|
|
|
computer, and can thus host an operating system.
|
|
|
|
|
|
|
|
The expression "virtual machine" is often abbreviated VM. VMs are also
|
|
|
|
often referred to as guests, in contrast to the hosts that host them.
|