Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Vagrant in WSL2 #327

Closed
anderpups opened this issue Sep 29, 2021 · 2 comments
Closed

Vagrant in WSL2 #327

anderpups opened this issue Sep 29, 2021 · 2 comments

Comments

@anderpups
Copy link
Contributor

These boxes do not run in WSL2 due to the below customization. It tries to add alsa sound, but for WSL it needs to be dsound since Virtualbox is actually running on Windows. Could you possibly remove override from the config? I believe this would allow us to use our own Vagrantfile override.Thank you!

 elsif RUBY_PLATFORM =~ /linux/
      virtualbox.customize ["modifyvm", :id, '--audio', 'alsa']
@ruzickap
Copy link
Owner

ruzickap commented Oct 4, 2021

I'm not sure how to handle this issue.
WSL is "linux emulated in windows" where environment (including the Ruby) should look like in real Linux.

If I remove the RUBY_PLATFORM =~ /linux/ it will break the compatibility for other users and can cause problems.

Is there any chance for you to use Vagrant "outside" of WSL?

@anderpups
Copy link
Contributor Author

I am unable to since I am using it as part of my Ansible/Molecule setup, but I am typically able to override box/provider settings with my own. I believe the issue here is the Vagrantfile for these boxes use an override statement. After some testing, this is what is not allowing me to set my own sound_type. The override setting may have been there to fix something else, but if it looks good to you a submitted a pull request with the changes.

I also want to add, thank you for these boxes. They have helped me out tremendously!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants