Hypervisor is a kind of software which allows us to have multiple virtual machines within one physical machine.
Basically, hypervisor will allocate the resources of the host physical machine (like RAM, CPU etc.) in between the virtual machines. This hypervisor provides portioning and isolation of the hardware and creates virtual machines, so it is also called virtualization hypervisor. So depending upon resource availability on the host machine, we can create a limited number of virtual machines. The virtual machines will have their own OS.
In this post, we will discuss Hypervisor and container technology And we will compare them.
Types of Hypervisor
There are two types of Hypervisor.
- Type 1 hypervisor or Bare metal hypervisor or Native hypervisor
- Type 2 hypervisor or hosted hypervisor
Type 1 hypervisor or Bare metal hypervisor or Native hypervisor
This type of hypervisor runs directly on the hardware of the host machine. It does not need any underlying OS. This type of hypervisor directly talk with the hardware.
Example: Microsoft Hyper-V hypervisor, etc.
Type 2 hypervisor or hosted hypervisor
This type of hypervisor require an underlying OS, otherwise they can’t run. Since this hypervisor need OS of the hosted system, hence it is called “hosted hypervisor”. In this case, hypervisor will be installed on the OS as a software and hypervisor will communicate with hardware through OS.
Example: Oracle Virtual Box, VMware workstation etc.
Fundamentally, Container technology is a way to package an application and all its dependencies, so that the application can run reliably when we change the environment. That means container technology enables the portability and make sure that application can run with all dependencies, maintaining isolation from other processes.
Unlike hypervisor which virtualize the hardware of the host machine to create multiple VM, container technology virtualize the OS of the host machine to create multiple containers.
Comparison between hypervisor, VMs and container technology
|Hypervisor, VMs||Container technology|
|Hypervisor virtualize the hardware of the host machine to create multiple VM.||Container technology virtualize the OS of the host machine to create multiple containers.|
|VMs are an abstraction of hardware.||Container technology is an abstraction of the app layer.|
|The created VMs need to have their own OS.||The created container use the OS of the host machine.|
|VMs take more space (e.g. RAM, ROM etc.)||Containers take less space (e.g. RAM, ROM)|
|Hypervisor is mostly used by cloud service provider to create required VMs on powerful hardware for customers.||Containers are used to run multiple copy of application.|
|Considering resource utilization, VMs are not cost-effective to run multiple copies of application.||Considering resource utilization, containers are much cost-effective compare to VMs to run multiple copies of application.|
|VMs do not provide efficient & flexible sharing and running option as containers.||Container technology enables us to share and run the application anywhere.|
|VMs are the result of using hypervisor.||Containers are the result of using container technology. Basically, we need to use container engine to create the containers.|
If you are interested in learning DevOps, please have a look at the below articles, which will help you greatly.
- Kubernetes Series: Part 1 – Introduction to Kubernetes | Background of Kubernetes
- Kubernetes Series: Part 2 – Components of Kubernetes cluster | Kubernetes cluster in detail
- Kubernetes Series: Part 3 – What is Minikube and How to create a Kubernetes cluster (on Linux) using Minikube?
- Introduction to Ansible | High Level Understanding of Ansible
- What is “Monitoring” in DevOps? Why do we need to Monitor App/DB servers, Transactions etc.?
- What is End-to-End Monitoring of any web application and Why do we need it?
- DevOps Engineer or Software Developer Engineer which is better for you?- Let’s discuss