eryph
by
On this page
guides

Using Vagrant with Hyper-V

Choose the right Vagrant provider for your Windows development workflow

By eryph Team
2025-09-23
7 min read

When developers need isolated environments on Windows, Vagrant with Hyper-V offers powerful virtualization capabilities. Two approaches serve different development scenarios: the standard Hyper-V provider for direct VM management, and the eryph plugin for cloud-native workflows. Understanding each approach helps teams choose the right fit for their specific needs.

Why Developers Choose Vagrant + Hyper-V

Windows dominates developer workstations. Stack Overflow's 2025 survey shows Windows leading with 56.7% personal usage and 49.5% professional usage among developers - significantly ahead of macOS (32.7% personal, 32.9% professional) and Linux distributions. Despite platform debates, most development happens on Windows machines.

For Windows developers needing isolated environments, Hyper-V becomes the natural virtualization choice. Unlike third-party hypervisors, Hyper-V integrates seamlessly with the host OS, handles enterprise workloads, and often comes pre-installed on Windows Pro editions. No additional licensing, no driver conflicts, no performance overhead from competing virtualization layers.

Vagrant brings consistency to this setup. The same Vagrantfile creates identical environments across team members' laptops, CI systems, and staging servers. Whether debugging locally or deploying to production, developers work with known configurations instead of "works on my machine" surprises.

This combination excels for complex development scenarios: multi-service architectures with databases and message queues, cross-platform testing across different Linux distributions, legacy application maintenance, or ensuring identical toolchains across diverse development teams. While containers increasingly handle simpler local development tasks, full VM isolation remains essential for these demanding scenarios - though traditional single-machine limitations present new challenges we'll explore below.

Built-in Hyper-V provider

Vagrant's built-in Hyper-V provider provides direct access to Hyper-V's virtualization capabilities. This approach works well for teams comfortable with Windows-centric workflows and manual infrastructure management.

Standard Vagrant + Hyper-V
# Basic Vagrantfile with Hyper-V
Vagrant.configure("2") do |config|
  config.vm.box = "generic/ubuntu2204"
  config.vm.provider "hyperv" do |h|
    h.memory = 2048
    h.cpus = 2
  end
end

vagrant up --provider=hyperv  # Requires admin shell

This approach excels in environments where teams have established Windows infrastructure practices and prefer direct control over virtualization resources.

How the Hyper-V Provider Works

Direct Hyper-V Integration

Operations require elevated processes, following standard Windows administration patterns. Development workflows involve UAC prompts and administrator shells for VM management.

Manual Network Configuration

Network setup happens through Hyper-V Manager and PowerShell scripts. Teams maintain virtual switches and networking configuration outside of Vagrant's declarative model.

Traditional Box Management

Uses standard Vagrant box format with manual provisioning workflows. Teams often create custom boxes tailored to their specific infrastructure requirements.

Windows-Focused Tooling

Management happens primarily through Windows-based tools. Cross-platform management requires workarounds, though Vagrant Go development aims to address this in future releases.

Single-Machine Architecture

Each developer manages VMs locally on their own hardware. This traditional model faces pressure from container-based workflows and shared infrastructure needs. While HashiCorp addresses evolution with container support and client-server architecture in Vagrant's roadmap, how these changes apply to Hyper-V scenarios remains unclear.

eryph Vagrant Plugin Approach

The eryph Vagrant plugin provides a different architectural approach. Rather than direct Hyper-V integration, it uses eryph's client-server design to bring cloud-native development patterns to local infrastructure.

eryph Vagrant Plugin
# Install eryph plugin
vagrant plugin install vagrant-eryph

# Enhanced Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.provider :eryph do |eryph|
    eryph.parent = "dbosoft/ubuntu-22.04/starter"
    eryph.memory = 2048
    eryph.cpus = 2
    eryph.project = "my-app-dev"
  end
end

vagrant up --provider=eryph  # No admin required

This approach serves teams seeking cloud-like development experiences with infrastructure-as-code practices on local hardware.

How the eryph Plugin Works

API-Driven Management

eryph's agent handles Hyper-V operations through its service architecture. Developers work through standard interfaces while the system manages system-level operations.

Automated Networking

Software-defined networking provides project-based isolation automatically. VMs within projects connect through managed network configurations.

Platform-Independent Interface

The client-server architecture enables management from different operating systems. Teams can work across Windows, WSL, and other platforms through unified APIs.

Gene-Based Provisioning

Eliminates custom Vagrant box creation entirely. Instead of building and maintaining custom boxes, teams use genes to customize standard base images through inheritance and configuration layering.

Project Organization

Resources group automatically by project context. Multi-service architectures coordinate through declarative project definitions.

Shared Infrastructure Support

The client-server architecture enables teams to use shared development hosts rather than local VM management. This addresses the single-machine limitations of traditional Vagrant workflows while maintaining the familiar Vagrantfile interface.

Development Workflow Examples

Multi-Service Application Scenarios

Modern applications often require multiple interconnected services - databases, message queues, caches, and microservices. Each approach handles multi-service coordination differently.

The standard approach follows traditional Windows infrastructure patterns with manual coordination steps.

eryph Plugin Workflow
# Project-based environment definition
Vagrant.configure("2") do |config|
  config.vm.define "web" do |web|
    web.vm.provider :eryph do |eryph|
      eryph.parent = "dbosoft/ubuntu-22.04/starter"
      eryph.project = "webapp-stack"
      eryph.memory = 2048
    end
  end

  config.vm.define "db" do |db|
    db.vm.provider :eryph do |eryph|
      eryph.parent = "dbosoft/ubuntu-22.04/starter"
      eryph.project = "webapp-stack"  # Project-based networking
      eryph.memory = 4096
    end
  end
end

vagrant up  # Deploys complete project environment

The eryph approach uses project-based organization for automatic resource coordination. The "webapp-stack" project creates a software-defined network where services connect through managed infrastructure.

Team Collaboration Patterns

Development teams often work across different platforms - macOS for front-end development, Linux for backend work, while infrastructure runs on Windows Hyper-V.

Standard provider workflow: Management happens through Windows-based tools and elevated processes. Team members working on other platforms coordinate through documentation, shared procedures, or delegate infrastructure tasks to Windows-equipped colleagues.

eryph plugin workflow: The client-server architecture enables infrastructure management from multiple platforms. Team members use consistent interfaces regardless of their development environment, with the eryph service handling platform-specific operations.

Next Steps

Ready to try Vagrant with Hyper-V? Start with eryph's cloud-native approach:

For standard Vagrant Hyper-V setup, consult the official Vagrant documentation.


Development teams choose Vagrant for consistency and reproducibility across environments. Both the standard provider and eryph plugin serve this goal through different architectural approaches - direct hypervisor integration versus API-driven infrastructure management.