What is a Virtual Machine?
Virtual Machine : Under Virtual Machines,server hardware is virtualized using Type 1 Hypervisor( on bare metal servers).Each VM has separate OS & apps.It shares hardware resource from the host.A Hypervisor is a software or firmware that sits between the hardware and the virtual machine and virtualizes the server.Each VM takes up lot of system resources.They not only run just a full copy of an operating systems,but a virtual copy of all the hardware that the operating system need to run.This adds overhead in memory and storage footprint.This issue was adding lot of complexity to all stages of software deployment cycle from development to production.Each VM has its own binaries, libraries,applications which makes up its size in gigabytes.
Some of the benefits of VMs are they have better security controls,and entire operating system is available to applications deployed in the individual VM.
What is a Hypervisor?
Hypervisor is a software or firmware that controls and allocates what portion of hardware resources each operation system should get.There are two types of Hypervisors:
Type 1 Hypervisor(Bare-Metal Hypervisor):This is installed directly on the system hardware and is completely independent from the operating system. Some of the examples of Type 1 Hypervisor are VMware ESX and ESXi,Microsoft Hyper-V,Citrix XenServer,Oracle VM.
Type 2 Hypervisor (Hosted Hypervisor):This is installed on an operating system that provides virtualization services,such as I/O device support and memory management.It is completely dependent on the host operating system for its operations. Some of the examples of Type 2 Hypervisor are VMware Workstation,Oracle VM VirtualBox,VMware Server,Microsoft Virtual PC,Red Hat Enterprise Virtualization.
What is a Container?
Container: To simply put,Containers virtualize operating system.Containers typically sit on top of a physical server and its host OS like Linux or Windows.Each container shares the host OS kernel and usually the binaries and libraries too.Shared components are read only.They have the functionality of sharing OS resources which removed the need to reproduce the entire OS code.What this means in practice is you can put two to three times as many applications on a single server with containers.Containers are exceptionally light and they are only megabytes in size and take seconds to start.Compared to VMs,they take minutes to run.They provide you the benefit of creating a portable,consistent operating environment for development,testing and deployment.Other advantage of using containers is since they share common operating system,bug fixes and patches will be easy.
Benefits: 1.Reduced IT management resources. 2.Quicker spinning up apps 3.Reduced & simplified security updates.