-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for use with nested virtualization in WSL2 #12328
base: main
Are you sure you want to change the base?
Conversation
any word on this? I was able to build a wsl2 kernel that could run virtualbox it required some combination of
config_module_sig kept getting set to y so I manually removed the if check so module_sig_check would always return 0 in kernel/module.c:2786 then after building the kernel i had to ensure i ran
and once that was done just updated %userprofile%.wslconfig to use the new kernel image, installed virtualbox-6.1, and was done |
This would be a fantastic addition. |
+1. Please do this. I would like to think something like this would have been done merged long ago if @mitchellh was still at the helm! Since it's quite a chore to compile vagrant every now and then, I've decided to just do a custom compile of my WSL kernel to not include the substring "microsoft". See this excellent blog post for more information: https://blog.sampath.dev/building-the-wsl2-linux-kernel-yourself |
Any chance for this to be merged? I really need this for my use case within the company. Thank you! |
this applies to windows 11 and i think windows 10 21H1. Regardless it's harmless to push this feature out now.
by setting the
VAGRANT_WSL_NESTED_VIRTUALIZATION
environment variable, users can set up vagrant as if they were running vagrant on a standard linux box. With the latest kernel for WSL2 in windows insiders edition, nested virtualization (and even native GUI support) are available. This allows users to use libvirt/kvm. Therefore this environment variable will allow people to set up vagrant to pretend it's not on WSL.I wrote an article here on running virtualbox inside of WSL2 using nested virtualization, and using this patch to bypass the wsl checks. https://askalice97.medium.com/running-virtualbox-inside-of-wsl2-with-nested-virtualization-bde85046fe8d