What’s the difference between container and hypervisor?
Understanding tech is often about understanding the layers of abstraction, from programming to the OSI model. This is true for virtual machines (VMs), as well as containers.
Containers can be conceptually “click” if you focus on the abstracted information provided by virtual machines and containers. This is it:
Hypervisors and virtual machines abstract hardware from your computer and allow you to run operating system software.
Containers (technically, container engines) abstract operating systems and allow you to run applications
This is a simplified explanation. Think about the functions of each technology to help you decide which tool is best for a given situation. We’ll be covering the topic in greater detail and giving you a crash course in virtual machines versus containers.
Virtual Machines Explained
VMware offers one of the most elegant definitions of virtual machines when they refer to a VM “a software computer”. There are two main ways to run virtual machines: Type 1 virtualization and Type 2.
Learn how to become a security expert with SPOTO’s Cybersecurity Training
Type 1 virtualization is a common way to start training in professional production environments. Type 1 virtualization is a lightweight operating system, also known as a hypervisor. It is installed on a server or computer. The physical box is sometimes called “bare-metal” and Type 1 hypervisors often are called “bare-metal hypervisors.” VMware’s ESXi and KVM (Kernel Based Virtual Machine) are two common examples of bare-metal hypervisors.
You can install multiple “traditional” operating system on top of a bare-metal hypervisor once you have installed it. ESXi can be installed on the same hardware to run Windows Server 2016, CentOS 7.6, or Ubuntu 18.04. ESXi allows virtual compute, storage, memory, and memory to the operating system.
These “virtual” resources are used by operating systems in the same way as physical resources. This abstraction of hardware is what I referred earlier. You can then install services and applications (e.g. You can install applications and services (e.g. Active Directory or a Web server) onto your operating systems.
Type 2 hypervisors are also known as. Hosted hypervisors work in a different way. They are not installed on top bare metal hardware. Instead, they are installed on top a standard operating system. Hosted hypervisors include VMware’s VMware Player and Oracle’s VirtualBox.
Hosted hypervisors allow you to run an isolated operating system within your main system. Let’s say you want Linux Mint but don’t want Windows to be uninstalled from your computer or dual boot. A hosted hypervisor allows you to run Linux Mint on a single Windows PC.
Side note: It may seem confusing to describe HyperV as a Type 1-hypervisor for those who are familiar with Windows Server Operating Systems. HyperV appears to run on top of another operating platform, which would make it Type 2. But, when you get to the core of the matter, HyperV runs underneath the operating system and can access the hardware. These SuperUser answers do a great job of explaining the details.
You are looking for a deeper look at virtualization and hypervisors. Jacob Moran’s Intro to Virtualization course is a great place to start. Jacob provides information on terminology and certifications, but also discusses practical topics such as choosing the right hypervisor.
Virtual Machines: Benefits
We now know what virtual machines are and can begin to explore the benefits. The main benefits of virtualization, relative to running on bare-metal, are summarized at the following:
Increased efficiency of hardware. Virtualizing servers allows you to run more operating system on your hardware. This allows for greater efficiency in everything, from maintenance to upgrades.