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

VirtualBox does not support hardware-supported virtualization. #639

Closed
CompeyDev opened this issue Jan 17, 2023 · 6 comments
Closed

VirtualBox does not support hardware-supported virtualization. #639

CompeyDev opened this issue Jan 17, 2023 · 6 comments
Assignees
Labels
question Not necessarily an issue with the script won't fix This will not be worked on

Comments

@CompeyDev
Copy link

CompeyDev commented Jan 17, 2023

When running the script, the following is returned at a stage:

Checking that VirtualBox uses hardware-supported virtualization.

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.
Exiting.

Is there any way to use the script without disabling WSL2/Memory integrity? I really do not want to have to disable and delete all my WSL Distributions as they store a bunch of required files that I use on a daily basis.

@myspaghetti
Copy link
Owner

Is there any way to use the script without disabling WSL2/Memory integrity?

Nope, sorry. Well, technically, you could run VirtualBox inside WSLg, but it's slower by an order of magnitude at least.

If you want to run macOS in WSL2 I recommend using QEMU/KVM on WSLg, there are lots of scripts for macOS on KVM. Works faster and better than VirtualBox on Windows, and if you're running Windows 10 or 11 with the lastest WSL2 you already support WSLg and nested virtualization.

@myspaghetti myspaghetti self-assigned this Jan 17, 2023
@myspaghetti myspaghetti added question Not necessarily an issue with the script won't fix This will not be worked on labels Jan 17, 2023
@CompeyDev
Copy link
Author

I'm not planning to run VBox inside WSL, because that would produce horrible performance (I've tried QEMU and it does not really have the best performance in WSL). I just wanted to be able to run on VirtualBox without compromising on features that I already have.

I was able to make QEMU run on WSL right before trying this script but I ended up not using that as WSL could barely handle itself alone.

@myspaghetti
Copy link
Owner

With the little I've tested, macOS on QEMU/KVM on WLSg performs better than macOS on VirtualBox on Windows on bare metal. If you're expecting better performance for VBox-on-Windows over KVM-on-WSLg you might be disappointed.

@CompeyDev
Copy link
Author

Are you sure? My device currently only has 6 GB of memory, meaning I allocate 4 GB to WSL and 2 GB from that to the macOS instance... Running it on bare VBox gives me 4 GB of RAM, which I assume to be more fluid and performant than the 2 GB within WSL.

@myspaghetti
Copy link
Owner

If you allocate 4GB for WSLg and 3GB to macOS on KVM you should see better performance than 4GB for macOS on VirtualBox, but in either case I can't fathom how Windows survives running a VM with a modern OS with 6GB of RAM total.

You don't have to delete WSL2 or its VMs, you can disable the hypervisor by running this command and rebooting twice:

bcdedit /set hypervisorlaunchtype off 

@CompeyDev
Copy link
Author

Ah, if disabling the hypervisor does not wipe VMs, that's all good.

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 won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants