4

The first thing I did, was enable WSL in the Windows Features dialog, then I installed Ubuntu 20.04 from the store. Befote doing anything else, I found an article WSL Kernel that said that I should install an update to the Linux kernal from here, this was an msi installer (wsl_update_x64.msi). I noticed there was an indication that the Virtual Machine Platform should have been enabled before installing Ubuntu, but it was too late by then. I then launched Unbuntu from the start menu link and a console window popped up with this error:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.

Press any key to continue...

The microsoft article Windows Subsystem for Linux Installation Guide for Windows 10 says this for error (0x80370102):

Installation failed with error 0x80070003 or error 0x80370102

    Please make sure that virtualization is enabled inside of your computer's BIOS. The instructions on how to do this will vary from computer to computer, and will most likely be under CPU related options.

but macs do not have a bios. So how do I ensure virtualisation is enabled on a Macbook PRO running windows 10 (2004) on bootcamp, without access to bios settings?

If I uninstall everything and disable WSL and Virtualisation and so this all over again in the right order, will this aleviate the issue or will I still need to change the bios setting which I have no access to.

2 Answers2

3

The answer to this problem comes in 2 parts. Most macs support virtualisation, but you need to find out how to check this. I found this issue on stackoverflow How to enable support of CPU virtualization on Macbook Pro?. From a macOS terminal, you need to run this command:

sysctl -a | grep machdep.cpu.features

This returns something like:

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C

If the string returned contains "VMX", then Virtualisation is supported.

Now, you need to ensure that virtualisation is enabled from the macOS side. Open up system settings then go to Start Up disk. Now just looking at the current setting may show that your windows partition is set as the start up disk. You need to explicitly go in and set it to windows, so unlock the padlock and click on your windows partition. The act of doing so activates other settings including enabling virtualisation. When I first encountered this issue, I could already see that my windows partition was visibile in the list of disks to selected as the startup disk and I probably thought no more of it, not realising you have to set it to windows explicitly.

After I did this then rebooted into windows, then open "Programs and Features" (run appwiz.cpl), then select "Turn windows features on or off", look at the options and ensure that "Hyper V" is not a disabled greyed out option. Select "Hyper V", then enable "Windows subsystem for linux". You should now be able to proceed with WSL2 without seeing errors pertaining to virtualisation not being enabled.

0

in my case, after enable virtualization in BIOS (F2 button push during starting the computer) and turn on windows subsystem linux in Window Feature, it still doesn't help and has the error 0x80370102. I reopen the Window Feature again, and check in the Virtual Machine Platform. then the error is fixed and the ubuntu is installed successfully in wsl environment in my computer. enter image description here

chau
  • 1