Virtualbox is not working after installing WSL, check out these steps to fix the issue.
There was a time when budding users were using Oracle VirtualBox to get familiar with Linux distributions, but times have changed since 2016, when Microsoft introduced WSL, and now you don’t need to download any extra software to use virtual technology.
You just need to enable “Window Subsystem for Linux”, and after that, you can download the distribution file from the Microsoft Store and get the experience of Linux on Windows technology.
To get started with WSL2, check out this post: How to Install WSL2 on Windows 10 where we have explained the installation process of WSL2.
Once you installed WSL2 just make sure to follow the below step, which will allow VirtualBox machines to get boot properly without throwing any error on your screen, which can save a few hours or minutes to fixing up the issue.
So let’s start with the process.
Fix VirtualBox Machine Not Booting Up
If you are also facing some kind of issue, like the VirtualBox machine not starting after the installation of WSL2, then you can follow the below method, which will fix the error.
Personally, in my case, the system was not able to boot my virtual machine. I thought it may be something I had tinkered with the machine, but when I checked the message, it said something like “init is conflicting”.
So, I stopped the WSL instance and turned off the WSLfeature from optional features, which made the VirtualBox run again.
Well, now I have identified the problem, so let’s fix this problem.
While fixing this issue, my search result took me to the StackOverflow post, where I found a command that resolves this issue, so you also just need to run the below command as an administrator in the command prompt or PowerShell, which will fix the VirtualBox startup issue after installing WSL.
> bcdedit /set hypervisorlaunchtype off
After invoking the command, you need to restart your system to see the changes. Still, if the problem persists, then you need to uncheck the following options from optional features: Hyper-V and window sandbox.
And to revert these changes, you can run the below command:
> bcdedit /set hypervisorlaunchtype auto
That’s all there is to fix when VirtualBox is not working after installing WSL.
Apart from that, if you are using Docker, then make sure you have selected the recommended option “Use WSL2 instead of Hyper-V” to avoid any further compatibility issues.
If you find any other way to fix this issue, then do let me know in the comment section.
A man with a tech effusive who has explored some of the amazing technology stuff and is exploring more. While moving towards, I had a chance to work on Android development, Linux, AWS, and DevOps with several open-source tools.