During installation of Docker for Windows, it recommends WSL 2 instead of HyperV, why?

x/techminute
· By: peterKing · Blog
During installation of Docker for Windows, it recommends WSL 2 instead of HyperV, why?

Docker Desktop’s installer nudges you toward WSL 2 and only falls back to Hyper-V if you insist.
The reasons are practical, not political—WSL 2 simply gives more performance and less pain for the desktop-developer use-case that Docker Desktop targets.


  1. 70 % faster cold-start ⏱️

  • WSL 2 kernel is a thin Linux wrapper that boots in < 2 s.
  • Hyper-V has to spin up a full Windows hypervisor partition → 8-12 s on a laptop.

  1. Smaller memory footprint 🧠

  • WSL 2 uses lazy allocation and releases RAM back to Windows when Linux is idle.
  • Hyper-V reserves the fixed amount you set in the DockerDesktopVM (default 2 GB) up-front and never gives it back until the VM is shut down.

  1. CPU & I/O throughput 🚀

  • WSL 2 shares the same NT kernel scheduler; no extra context switches.
  • Bind-mounts of Windows disks (/mnt/c) are 9p-over-VMBus in WSL 2 vs Samba-over-virtual-NIC in Hyper-V → ~3× faster npm install, git status, etc.
  • Networking is NAT-less VMBus; no 10 GB virtual switch overhead.

  1. One kernel to update 🔒

  • Docker Desktop ships its own WSL 2 kernel; Windows Update patches it automatically.
  • With Hyper-V you are responsible for MobyLinuxVM’s kernel + initrd upgrades (Docker still hides this, but it’s an extra layer).

  1. Sleep / resume “just works” 💤

  • WSL 2 distros suspend with Windows; containers keep running.
  • Hyper-V VM is paused; on resume you often see clock skew or frozen containers requiring a Docker restart.

  1. No Enterprise feature lock ❌

  • Hyper-V is disabled on Windows 10 Home and some OEM SKUs; Docker would lose those users.
  • WSL 2 runs on every Win10 1903+ edition.

  1. Smaller installer & simpler lifecycle 🛠️

  • WSL 2 distro is a tar.gz dropped into AppData.
  • Hyper-V needs a .vhdx, virtual switch, firewall rules, service templates—bigger download, more failure points.

When Hyper-V is still useful

  • You need Windows containers (process-isolation) and Linux containers side-by-side.
  • Your company mandates Hyper-V for security policy / Code-Integrity.
  • You want to pin the VM to specific CPU cores or Nested Virtualisation (WSL 2 can’t do that).

Bottom line

For “I just want docker-compose up and VS Code attached” on a laptop, WSL 2 == faster, leaner, simpler.
That’s why the installer recommends it; Hyper-V is kept as the escape hatch for edge cases, not the happy path.

Comments (0)

U
Press Ctrl+Enter to post

No comments yet

Be the first to share your thoughts!