2.2 Virtual machines or containers ?

Virtualisation Containerisation (aka lightweight virtualisation)
Abstraction of physical hardware Abstraction of application layer
Depends on hypervisor (software) Depends on host kernel (OS)
Do not confuse with hardware emulator Application and dependencies bundled all together
Enable virtual machines:
Every virtual machine with an OS (Operating System)

2.2.1 Virtualisation

  • Abstraction of physical hardware
  • Depends on hypervisor (software)
  • Do not confuse with hardware emulator
  • Enable virtual machines:
    • Every virtual machine with an OS (Operating System)

2.2.2 Containerisation (aka lightweight virtualisation)

  • Abstraction of application layer
  • Depends on host kernel (OS)
  • Application and dependencies bundled all together

2.2.3 Virtual machines vs containers

Source

Pros and cons

Virtualisation Containerisation
PROS Very similar to a full OS.
With current solutions, high OS diversity.
No need of full OS installation (less space).
Faster than virtual machines.
Easier automation.
Current solutions allow easier distribution of recipes.
Better portability.
CONS Need more space and resources.
Slower than containers.
Not that good automation.
Some cases might not be exactly the same as a full OS.
Still less OS diversity, even with current solutions.