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