0

I'm using Windows 11 on VirtualBox 6.1.30, inside Windows 11 on a Core m3-6Y30 CPU @ 0.90GHz.

I downloaded Ubuntu 20.04 from the Microsoft Store. When I started it, a message appeared that the option called Windows Subsystem for Linux should be enabled in the Control Panel in Windows Features.

I turned on that feature, restarted the computer, and attempted to start WSL Ubuntu again. This time there was a message to update to WSL2.

So in PowerShell with admin privileges I entered the command:

dism.exe / online / enable-feature / featurename command: VirtualMachinePlatform / all / norestart

... then restarted the computer and downloaded the kernel update package mentioned here.

Finally, in PowerShell with admin rights I ran the recommended command:

wsl --set-default-version 2

After that, I restarted my computer and started Ubuntu on WSL and got the "Error 0x80370102" mentioned in this question.

It only worked after I ran wsl --set-default-version 1 .

What can it be? Something wrong with hardware virtualization?

Everything else works on VirtualBox.

I started with the command wsl --set-default-version 1, then I checked the bcdedit / set hypervisorlaunchtype auto, but it didn't work.

Only after that did wsl --set-default-version 1 work.

NotTheDr01ds
  • 22,082
P.Bak
  • 53

1 Answers1

2

Given what we've discussed in the comments, my personal recommendation would be to stick with WSL1. It covers most of the use-cases of WSL2 by creating a "translation layer" between calls to the Linux kernel API and that of the Windows kernel. WSL2 does go (at least) one step further with virtualization, but that only works well on supported hardware.

As for WSL2, it's possible that you may have more than one problem, but at least one possibility is that you need to enable "Nested Virtualization" in VirtualBox.

WSL2 uses features of the Windows Hyper-V hypervisor to create a virtual machine. Since you are already running Windows 11 in a VirtualBox VM, that means you are "running a VM inside a VM" -- That's "nested virtualization".

Support for this feature was, I believe, added starting with VirtualBox 6.1.4, but you do have to enable it. See this doc page for full details, but to summarize:

  • If you are using the VirtualBox Manager GUI, go to the Processor tab and turn on Enable Nested VT-x/AMD-V. Note, as we learned in the comments, that option is grayed out on your VM since your CPU (Core m3-6Y30) doesn't support hardware-based virtualization.

  • As an alternative, you should be able to set the option from the command-line using VBoxManage modifyvm vm-name --nested-hw-virt on. This will reportedly "force" virtualization even on unsupported hardware (but I cannot confirm). Note that, from a comment on this answer, "performance is expected to be abysmal" if your CPU does not support the necessary features.

NotTheDr01ds
  • 22,082