A possible cause for this error is Hyper-V not setup correctly, for me the following actions solved the problem:
- Go to Control Panel-> Programs and Features -> Turn windows features on or off
- Uninstall Hyper-V & Windows-Subsystem for Linux
- Verify Hardware Compatibility by running systeminfo as outlined in the following link: https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements
- Reboot machine, press F2/DEL, setup virtualization in BIOS. Usually it is under "Advanced\CPU Configuration\SVM Mode" or similar
- Run systeminfo and it must show "Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed." at the end
- Install Hyper-V & Windows-Subsystem for Linux
- Run wsl --install ubuntu and the error should not appear anymore