Skip to content

Instantly share code, notes, and snippets.

View brootware's full-sized avatar
🎯
Focusing

Oaker Min brootware

🎯
Focusing
View GitHub Profile
@brootware
brootware / Vagrant_setup.md
Last active August 21, 2023 12:01
Vagrant +Windows + WSL2 + Hyper-v

Vagrant With Windows, WSL2 and Hyper-V

To say getting this configuration working is a pain in the ass is an understatement. However, once it is working correctly you gain access to tools like Ansible and full performance VMs inside Windows. This guide covers the steps I followed to get things working correctly with this configuration. It is possible that something may not work for you however I have been able to reproduce this success on two Windows 11 Pro machines and expect this to work for others.

This guide assumes basic knowledge of Windows and Linux systems and how Vagrant operates. Due to the difficulty of setting this up you may need to do some additional troubleshooting

Requirements

  • Windows Professional - Hyper-V can only be installed on Windows Professional systems or higher
  • WSL2 - Due to the massive differences between WSL1 and WSL2 this guide will only cover support for WSL2
  • CPU Virtualization - While the vast majority of modern CPUs support virtualization you may need to enable it in