Vagrant WSL2 Provider

Overview The Vagrant WSL2 Provider is a custom Vagrant plugin that brings the familiar Vagrant workflow to Windows Subsystem for Linux 2 (WSL2). It solves a common problem in enterprise Windows environments where traditional virtualization solutions (VirtualBox, VMware) are restricted or perform poorly due to security policies like VBS and Device Guard. The Problem Many developers working in corporate Windows environments face constraints: Virtualization-Based Security (VBS) makes VirtualBox unusable Device Guard/Credential Guard prevents traditional hypervisors from working Nested virtualization overhead causes severe performance penalties Security compliance requirements leave WSL2 as the only viable option This plugin bridges the gap between WSL2’s performance and Vagrant’s standardized development workflow. ...

September 27, 2025 · 2 min · Zoltan Toma

Building Docker Support for Vagrant WSL2 Provider - A Development Journey

Introduction Over the past few days, I’ve been working on adding Docker support to the vagrant-wsl2-provider plugin. This turned out to be more challenging than expected, but the journey taught me a lot about WSL2’s internals, systemd initialization, and multi-distribution package management. In this post, I’ll walk through the development process, the challenges we faced, and how we solved them to get Docker running on 8 different Linux distributions in WSL2 through Vagrant. ...

October 5, 2025 · 6 min · Zoltan Toma

Snapshots and Testing: Building Real Tests for a Vagrant Provider

The Testing Problem Nobody Talks About After getting Docker support working, I wanted to add snapshot functionality to the vagrant-wsl2-provider. But there was a nagging problem I’d been avoiding: how do you actually test a Vagrant provider plugin? The “proper” way would be to write Ruby unit tests with RSpec, mock all of Vagrant’s internals, and test each component in isolation. But here’s the thing - Vagrant is a massive gem with heavy dependencies. Just getting the test environment set up requires pulling in the entire Vagrant gem, which then requires native extensions, specific Ruby versions, and a whole dependency chain that’s… painful. ...

October 5, 2025 · 6 min · Zoltan Toma

Building a Vagrant WSL2 Provider: Testing Journey and Unexpected Discoveries

The Final Push to v0.1.0 After testing the provider on my corporate machine, I discovered a bug related to the missing Windows HOME environment variable. The provider was trying to cache files on a NAS drive (mapped as U:) instead of the local user directory. After fixing this by switching to Vagrant.user_data_path, I felt confident that v0.1.0 was nearly ready. All that remained was a comprehensive test run across all available WSL distributions. ...

September 29, 2025 · 4 min · Zoltan Toma

Building a Vagrant WSL2 Provider: Clean Development Environments on Windows

Building a Vagrant WSL2 Provider: Clean Development Environments on Windows Working with development environments on Windows has always been a challenge. While VirtualBox and VMware provide excellent virtualization, they come with resource overhead and performance penalties. Windows Subsystem for Linux 2 (WSL2) offers a compelling alternative with near-native performance, but lacks the standardized workflow that Vagrant provides. This led me to an interesting project: building a custom Vagrant provider for WSL2 that combines the best of both worlds - the familiar Vagrant workflow with WSL2’s performance benefits. ...

September 27, 2025 · 6 min · Zoltan Toma