What is Virtualization?
At its most basic level, virtualization is about encapsulating the capabilities and features of a physical machine in a virtual environment, known as a virtual machine.
But why is virtualization needed?
Here are a few reasons:
• Decrease expenses: Physical servers can be expensive, and virtualization can decrease the number of servers or other hardware, or even completely remove physical hardware from a company's infrastructure.
• Scale: Without properly implemented DevOps, it may be hard for a company to scale resources as server usage increases. Virtualization makes this process easier and can delegate a server's resources to virtual machines as needed based on usage.
• Efficiency: Like scaling, virtualization can also make it easier to decrease the resources allocated to a virtual machine if there is reduced usage.
Virtualization Structure
Virtualization works by using a system that creates a middle layer to manage resources. This lets you run an operating system or application on top of a virtual setup.
The OS that runs inside a virtual machine is called a guest OS, while the OS that runs the virtualization system is the host OS.
Hypervisors
A hypervisor creates a layer between hardware and software. It usually comes with a management tool that helps users create or load virtual machines.
There are two types of hypervisors based on where they sit in relation to the hardware. One type runs directly on the hardware and creates a lightweight operating system, while the other runs as an application on top of an existing operating system.
Type 1 Hypervisors Example:
Type 1 hypervisors, also known as bare metal hypervisors, create an abstraction layer directly between hardware and virtual machines without a common operating system between them.
Examples of type 1 hypervisors include VMware ESXi, Proxmox, VMware vSphere, Xen, and KVM.
Type 2 Hypervisors
Type 2 hypervisors, or hosted hypervisors, sit on top of an existing operating system, creating a layer for software applications. Unlike type 1 hypervisors, they are usually managed through a user-friendly application interface. These hypervisors are aimed more at individual users and developers, rather than handling lots of virtual machines at scale.
Examples of type 2 hypervisors include VMware Workstation, VMware Fusion, VirtualBox, Parallels, and QEMU.
Containers
Containers are the current solution to the issues encountered with hypervisors at scale.
They share common features with virtual machines, but unlike VMs that are fully separate from the host OS, containers work closely with it. Containers have their filesystem, access to CPU and RAM, and process space.
Besides being lightweight, containers are also easy to move around and strong since they don’t hide everything from the host.
Like VMs rely on a hypervisor for virtualization, containers depend on a container engine for managing resources.
Top comments (1)
Great introduction to virtualization and containers! The breakdown of hypervisors and the explanation of containers makes things easy to understand. Thanks for sharing this beginner-friendly guide.