Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Unable to install in WSL2 #258

Closed
cameronbroe opened this issue Jul 3, 2020 · 6 comments
Closed

Unable to install in WSL2 #258

cameronbroe opened this issue Jul 3, 2020 · 6 comments
Assignees
Labels
question Not necessarily an issue with the script

Comments

@cameronbroe
Copy link

When trying to use the script with default arguments, I get this message:

Virtualbox is not using hardware-supported virtualization features.
Check that software such as Hyper-V, Windows Sandbox, WSL2, memory integrity
protection, and other Windows features that lock virtualization are turned off.

The README mentions that the Windows Subsystem for Linux should work. Is it only supposed to work in WSL1 and not WSL2? I have VirtualBox 6.1.10 installed.

@myspaghetti myspaghetti self-assigned this Jul 3, 2020
@myspaghetti myspaghetti added the question Not necessarily an issue with the script label Jul 3, 2020
@myspaghetti
Copy link
Owner

Yes, WSL2 blocks VirtualBox from using hardware-supported virtualization, better known as VT-x and AMD-V. Oracle has discussed this issue with Microsoft and Microsoft does not plan to change this behavior. You can convert your WSL2 distro to WSL1 and vice-versa, or you can use Cygwin, or you can use some fancy CPU configuration to use nested virtualization inside WSL2 and run VirtualBox with VT-x inside WSL2, which is pretty cool but complicated.

@cameronbroe
Copy link
Author

Cool. Thanks for the quick answer. Yeah, I know Hyper-V takes exclusive control over VT-x. VirtualBox does have support for running VMs through Hyper-V though, with a performance hit. Is that something that could be used? Also, would you be opposed to a PR adding a note in the documentation specifying support for WSL1, but not WSL2?

@myspaghetti
Copy link
Owner

VirtualBox does have support for running VMs through Hyper-V

True but the macOS installer fails when it is used.

Added the error message to the readme and documentation.

@pwr22
Copy link

pwr22 commented Jul 23, 2020

Huh, this is a pain. Is there a technical reason why Windows blocks VirtualBox from enabling VT-x? I'm assuming they've made virtualbox work by changing it to use hyper-v as a backend?

@pwr22
Copy link

pwr22 commented Jul 23, 2020

And another question, could I make the VM on a machine without Hyper-V, go through the installer, and then import and use it on a machine without VT-x?

@myspaghetti
Copy link
Owner

@pwr22 regarding the first question: Microsoft is "working closely" with third-party VM vendors about the issue.

Regarding the second question, macOS crashes on VirtualBox with NEM. However, you can run macOS on QEMU on WSL2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Not necessarily an issue with the script
Projects
None yet
Development

No branches or pull requests

3 participants