Featured image of post What's a Hypervisor? And Why Does My Docker Need One???

What's a Hypervisor? And Why Does My Docker Need One???

Hypervisors Explained..

What’s a Hypervisor? And Why Does My Docker Need One???  

Introduction  

So, you’re running Docker on Windows or Mac, and suddenly someone tells you:  

“You need a hypervisor to run Docker.”  

And you’re like… what even is a hypervisor?!  

-–  

What Even is a Hypervisor?  

A hypervisor is a fancy piece of software that lets you run virtual machines (VMs) on your computer.  

It creates, manages, and runs virtual machines while keeping them separate from your main system.  

Think of it like:  

🔹 A zookeeper managing multiple animals (virtual machines).  

🔹 A ringmaster controlling multiple performers (operating systems).  

🔹 A hallway of isolated rooms where each VM lives its own life.  

Without a hypervisor, you’d have no way to create virtual computers inside your real one.  

-–  

A Brief History of Hypervisors  

YearDevelopmentNotes
1960sIBM MainframesEarly VM concepts for multi-user computing
1990sVMware launches ESXiVirtualization takes off for enterprises
2000sVirtualBox, Hyper-V, KVMMore consumer-friendly hypervisors
2010sContainers emergeDocker disrupts the VM world
TodayCloud-based HypervisorsAWS, Azure, and Google Cloud dominate

Hypervisors were originally created for mainframes but became mainstream in the late 1990s and early 2000s with VMware, Hyper-V, and KVM.  

-–  

Why Does Docker Need a Hypervisor?  

Docker on Linux → No Hypervisor Needed  

If you run Docker on Linux, everything just works. Why? Because containers natively use Linux kernel features like namespaces and cgroups.  

Docker on Windows/Mac → Needs a Hypervisor  

But on Windows and macOS, Docker can’t talk to the Linux kernel directly. Instead, it runs a small virtual machine using a hypervisor like:  

  • Hyper-V (Windows)  

  • VirtualBox (Older Windows/Mac versions)  

  • Apple’s Hypervisor Framework (macOS)  

This is why Docker Desktop automatically installs a hypervisor to make everything work.  

💡 If you’re on Windows or Mac, Docker runs inside a tiny Linux VM, and that VM needs a hypervisor to exist.  

-–  

Hypervisors vs. Other Virtualization Technologies  

FeatureType 1 HypervisorType 2 HypervisorContainers
Runs on Bare Metal?✅ Yes❌ No❌ No
Performance✅ Fastest❌ Slower✅ Super Fast
Resource Usage✅ Optimized❌ More Overhead✅ Very Low
Example TechnologiesVMware ESXi, Hyper-V, KVMVirtualBox, VMware WorkstationDocker, LXC
Best ForDatacenters, CloudPersonal Use, TestingMicroservices, Cloud Apps

💡 Verdict: Hypervisors run entire OS instances, while containers share the host OS, making them lighter and faster.  

-–  

Key Takeaways  

  • Hypervisors allow you to run virtual machines inside your computer.  

  • Docker needs a hypervisor on Windows/macOS because it requires a Linux kernel.  

  • Type 1 hypervisors (KVM, Hyper-V, ESXi) are faster than Type 2 (VirtualBox, VMware Workstation).  

  • Containers like Docker are NOT hypervisors, but they rely on them in non-Linux environments.  

-–  

References  

  1. Hypervisor Wikipedia  

  2. Microsoft Hyper-V Documentation  

  3. Docker Desktop and Hypervisors  

  4. KVM Virtualization  

  5. VMware vs. VirtualBox