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