Virtual machines (VMs), pioneered by VMware over two decades ago, are used by most large enterprises to build a virtualized computing environment. A virtual machine is an emulation of a physical computer. VMs make it possible to run several operating systems on one server, dramatically improving resource utilization of enterprise applications.
VMs are managed by a software layer called a hypervisor, which isolates VMs from each other and allocates hardware resources to each VM. Each VM has direct or virtualized access to CPU, memory, storage, and networking resources.
Each virtual machine contains a full operating system with applications and associated libraries, known as a “guest” OS. There is no dependency between the VM and the host operating system, so Linux VMs can run on Windows machines, and vice versa.
Containers are an isolated unit of software running on top of an operating system (usually Linux or Windows). Unlike virtual machines, they only run applications and their dependencies. Containers do not need to run a full operating system on each instance—rather, they share the operating system kernel and gain access to hardware through the capabilities of the host operating system. This makes containers smaller, faster, and more portable,
Like virtual machines, containers allow developers to increase CPU and memory utilization on physical machines. However, containers have taken it a step further.