WSL and Hyper-V suddenly stopped working

I’m running Windows 11 21H2 22000.613. I use both WSL 2 (Windows Subsystem for Linux) and Hyper-V on a regular basis. One day they both suddenly stopped working.

When I run Hyper-V, it doesn’t display its usual interface, only an option to “Connect to Server”. When I tell it to connect to the local server, it says:

“An error occurred while attempting to connect to server [my computer name]. Check that the Virtual Machine Management service is running and that you are authorized to connect to the server.”

I checked and that service is indeed running. Stopping and restarting it doesn’t help. Also, I don’t know why I wouldn’t be authorized to connect to my own server on my local computer.

When I run WSL it just doesn’t do anything, no error messages, just nothing happens. This most likely happens because WSL uses Hyper-V for virtualization, so if Hyper-V doesn’t work, WSL doesn’t work either.

I looked up “Hyper-V not working” both on this site and elsewhere, and did literally everything that was suggested in the first page of results, including:

  • Removing Hyper-V and reinstalling it
  • Checking that virtualization is enabled in BIOS
  • Updating the BIOS
  • Removing recent Windows updates
  • Installing optional Windows updates (there weren’t any available)
  • Installing Windows update KB5010795 which supposedly fixes a bug that prevented Hyper-V from working back in January (I downloaded it and it says “The update is not applicable to your computer”)
  • Running the command bcdedit /set hypervisorlaunchtype auto
  • Running the command bcdedit /store c:BootBCD /set hypervisorlaunchtype auto (I get the error “The boot configuration data store could not be opened. The system cannot find the file specified.”)
  • Running the command dism /online /enable-feature /featurename:Microsoft-Hyper-V -All

Nothing worked. Eventually I tried reinstalling Windows 11, but without formatting first, since I don’t want to have to reinstall and configure everything from scratch. So I just installed it on top of the existing installation, hoping this will repair the issue. However, that also didn’t work.

My last resort will be to format and do a clean install, but I’m hoping someone here can suggest a solution that will allow me to avoid having to do that. Any suggestions?

Thanks!