Understanding Linux Virtualization
Virtualization is basically, creating virtualized resources and mapping them to physical resources and it can be done by specific hardware functionality or software functionality. This can be used, for example, to create a virtual machine on your computer, so you have two machines running in the same hardware.
This technology is getting more popular now, but it's not something new or revolutionary, it came from 1967 when IBM created the IBM CP-40 and its S/360-40. But in 2004, with all the new technologies such as PCI Express, DDR2 and multi-core processors, took off and 15 years of development later it got polished enough to attract all the big companies and make them compete for the best virtualization technology.
The competitive market of virtualization
- Red Hat (KVM)
- Microsoft (Hyper-V)
- VMWare (ESXi)
- Oracle (Oracle VM)
Types of Virtualization
- Desktop Virtualization (VDI - Virtual Desktop Infraestructure)
Is a method of simulating a user workstation so it can be accesed from a remotely connected device. The pros of this type is that include easier, centralized managment and monitoring, much more simplified update workflows, simplified deployment processes and easier management of compliance and security-related options.
- Server Virtualization
Is a software architecture that allows more than one server operating system to run as a guest on a given physical server host. I think this type is the most used one right now because it´s very usefull to the companies that need a lot of servers to carry out more tasks. They are easier to backup and more energy efficient than physical ones.
- Application Virtualization
Is a software technology that encapsulates computer programs from the underlying OS on which they are executed. It reminds me of containers and microservices.
- Network Virtualization (SDN - Software-Defined Networking)
This is a technology that creates virtual networks that are independent of the physical networking devices, such as switches.
- Storage Virtualization (SDS - Software-Defined Storage)
Is a technology that creates virtual storage devices out of pooled, physical storage devices that we can centrally manage as a single storage device.
Ways to make VMs
- Partitioning
The CPU is divided into different parts and each part works as an individual system.
- Full Virtualization
A virtual machine is used to simulate regular hardware while not being aware of the fact that it's virtualized.
- Software-based
Uses binary translation to virtualize the execution of sensitive instruction set while emulating hardware using hardware. Trash...
- Hardware-based (KVM hypervisors)
Removes the binary translation from the equation while interfacing with a CPU's virtualization features, which means that instruction sets are being executed directly on the host CPU.
- Paravirtualization
The hypervisor has an API and the OS of the VM makes calls to it. The host OS has to be modified to receive the calls from that API (hypercalls)
- Hybrid Virtualization
Full virtualization + Paravirtualization
- Hardware-based (KVM hypervisors)
It's a type of application virtualization that uses containers... told you ;)
A container is a object that packages an application and all its dependencies so that the application can be scaled out and rapidly deployed without needing a VM or a hypervisor.
Hypervisor/VMM
The VMM (Virtual Machine Manager) or hypervisor is a software that monitores and controls virtual machines or guest OSes. It's responsible for ensuring different virtualization tasks, for efficiently controlling physical platform resources and for allocating the resources requested by these guest OSes.
Types of hypervisors
There are two types of hypervisors but its definitions are not clear yet. The main difference between this two is that, type 1 ones runs the VMs directly on top of the hardware, unlike the type 2 ones that runs on top of a present OS.
- Type 1 Hypervisor
These are also called bare-metal, embedded, or native hypervisors. Their main advantages are that they are easy to install and configure, small in size and more secure
- Type 2 Hypervisor
They reside on top of the OS so they have better customization and wider range of hardware support