WSL2 caused Virtualbox to stop working

YmpkerYmpker OGContent Writer
edited May 2022 in Help

Hello everyone,
my main rig is a Windows 10 Pro install.
I have been running Virtualbox on it for quite some months (couple of ubuntu/zorinos vms) and today I decided to enable WSL2 for more convenient dev stuff.
That wasn't such a good idea . After installing WSL2 I first was really happy about how smoothly it implemented with Windows and tried some things. I then noticed that my Virtualbox wouldn't boot again and after googling encountered the GitHub Issue I linked above. It seems like installing WSL2 has triggered something that stopped my Virtualbox VMs from working. I then proceeded to uninstall WSL2 ( wsl --unregister Ubuntu, uninstalled Ubuntu from Apps, uninstalled WSL Service Updater and disabled WSL from Windows "features"), however Virtualbox still wouldn't work. Uninstalled Virtualbox and re-installed lates Virtualbox Version. Now VMs at least "boot" to start OS installation but just seem to freeze midway when trying to install Ubuntu/Zorin VM pretty much making Virtualbox unusable for me. I am not trying to recover any data but I'd really like to be able to use Virtualbox again. Am I missing anything? Do I need to (re-)enable Hyper-V or any other Windows features essential for Virtualbox in order to make it work again after uninstalling WSL?

Worst case would be to freshly install Windows (doesn't hurt to flush it ever so often), however I'd like to avoid that. Also got an Aomei System backup of the system drive, however it's from february which is kind of a setback (although, worst case it's not that much of a problem).

Appreciate any ideas :)

Comments

  • I tried to get VirtualBox working after I set up WSL2, but I just... couldn't. I was however able to boot VMs on VirtualBox with just one vCPU, so that I could easily copy the files I needed (instead of having to convert the disk image).

    In the end I ended up just using Hyper-V instead, which honestly seems to run better than VirtualBox ever did for me (granted I also switched from Xubuntu 18.04 to Kubuntu 20.04 in the meantime, so that likely affected the performance).

    Is there a specific reason as to why you wanna stick to VirtualBox if you're just setting up new VMs anyways? Can't you just use Hyper-V?

    Thanked by (1)Ympker

    Website: thomassen.sh

    Discord: Decicus#0001

  • YmpkerYmpker OGContent Writer

    @Decicus said:
    I tried to get VirtualBox working after I set up WSL2, but I just... couldn't. I was however able to boot VMs on VirtualBox with just one vCPU, so that I could easily copy the files I needed (instead of having to convert the disk image).

    In the end I ended up just using Hyper-V instead, which honestly seems to run better than VirtualBox ever did for me (granted I also switched from Xubuntu 18.04 to Kubuntu 20.04 in the meantime, so that likely affected the performance).

    Is there a specific reason as to why you wanna stick to VirtualBox if you're just setting up new VMs anyways? Can't you just use Hyper-V?

    Hey there. Thanks for chiming in :)
    I don't necessarily need to stick to Virtualbox. It's just what I have used so far (and it was quite straightforward). If any other free options are available that are worth giving a shot, I'm open for any suggestions. I mainly just need ZorinOS/Ubuntu VMs.

  • @Ympker said:

    @Decicus said:
    I tried to get VirtualBox working after I set up WSL2, but I just... couldn't. I was however able to boot VMs on VirtualBox with just one vCPU, so that I could easily copy the files I needed (instead of having to convert the disk image).

    In the end I ended up just using Hyper-V instead, which honestly seems to run better than VirtualBox ever did for me (granted I also switched from Xubuntu 18.04 to Kubuntu 20.04 in the meantime, so that likely affected the performance).

    Is there a specific reason as to why you wanna stick to VirtualBox if you're just setting up new VMs anyways? Can't you just use Hyper-V?

    Hey there. Thanks for chiming in :)
    I don't necessarily need to stick to Virtualbox. It's just what I have used so far (and it was quite straightforward). If any other free options are available that are worth giving a shot, I'm open for any suggestions. I mainly just need ZorinOS/Ubuntu VMs.

    I personally think Hyper-V works quite well.
    Granted my usage is simple (though it doesn't sound like your usage is all that complicated either). At the moment I run a Kubuntu 20.04 VM just fine without any issues (and I use it daily).

    Though Hyper-V is only available if you have Windows 10 Pro (or better) I believe. So if you're on Home, maybe take a look at VMware Workstation Player as an alternative?

    Thanked by (1)Ympker

    Website: thomassen.sh

    Discord: Decicus#0001

  • YmpkerYmpker OGContent Writer

    @Decicus said:

    @Ympker said:

    @Decicus said:
    I tried to get VirtualBox working after I set up WSL2, but I just... couldn't. I was however able to boot VMs on VirtualBox with just one vCPU, so that I could easily copy the files I needed (instead of having to convert the disk image).

    In the end I ended up just using Hyper-V instead, which honestly seems to run better than VirtualBox ever did for me (granted I also switched from Xubuntu 18.04 to Kubuntu 20.04 in the meantime, so that likely affected the performance).

    Is there a specific reason as to why you wanna stick to VirtualBox if you're just setting up new VMs anyways? Can't you just use Hyper-V?

    Hey there. Thanks for chiming in :)
    I don't necessarily need to stick to Virtualbox. It's just what I have used so far (and it was quite straightforward). If any other free options are available that are worth giving a shot, I'm open for any suggestions. I mainly just need ZorinOS/Ubuntu VMs.

    I personally think Hyper-V works quite well.
    Granted my usage is simple (though it doesn't sound like your usage is all that complicated either). At the moment I run a Kubuntu 20.04 VM just fine without any issues (and I use it daily).

    Though Hyper-V is only available if you have Windows 10 Pro (or better) I believe. So if you're on Home, maybe take a look at VMware Workstation Player as an alternative?

    I have Windows 10 Pro for Workstations. I guess that would work then?
    I guess I can give it a try, albeit the GUI from Virtualbox was really nice and easy to use. Will also look into VMWare Workstation.

    Thanked by (1)Decicus
  • You can only run one hypervisor at a time.
    Choose between HyperV (WSL2), VMware, KVM, VirtualBox, etc.
    As soon as one hypervisor is running, another cannot start.
    There's no way around it as it's a CPU limitation.

    If you really want both WSL2 and VirtualBox, the only solution is buying two computers.

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

  • Newer versions of VirtualBox and VMware has a HyperV compatibility mode. These allows them to be used along side HyperV although performance may be degraded.

    When running in compatibility mode, VMware & VirtualBox use the Windows Hypervisor Platform APIs instead to manage VMs. Their own hypervisors aren't used.

    Qemu on Windows also supports using HyperV via the -accel whpx flag.

    Further read:

  • YmpkerYmpker OGContent Writer

    @yoursunny said:
    You can only run one hypervisor at a time.
    Choose between HyperV (WSL2), VMware, KVM, VirtualBox, etc.
    As soon as one hypervisor is running, another cannot start.
    There's no way around it as it's a CPU limitation.

    If you really want both WSL2 and VirtualBox, the only solution is buying two computers.

    Yeah, however after disabling& uninstalling wsl I can't go back to using virtualbox it seems. It won't work as it did before even though wsl is enabled and it is the only running hypervisor.

  • YmpkerYmpker OGContent Writer

    @rattlecattle said:
    Newer versions of VirtualBox and VMware has a HyperV compatibility mode. These allows them to be used along side HyperV although performance may be degraded.

    When running in compatibility mode, VMware & VirtualBox use the Windows Hypervisor Platform APIs instead to manage VMs. Their own hypervisors aren't used.

    Qemu on Windows also supports using HyperV via the -accel whpx flag.

    Further read:

    Will try. Thanks!

  • Yeah also had issues with virtuabox. I have found memories of it years back but now its basically unusable for me. Can't even select an ISO file without it dying

    So mostly using hyperv manager now. Overall quite unhappy with the situation. If gaming & netflix wasn't as meh on linux I'd just switch

    Thanked by (1)Ympker
  • YmpkerYmpker OGContent Writer

    @havoc said:
    Yeah also had issues with virtuabox. I have found memories of it years back but now its basically unusable for me. Can't even select an ISO file without it dying

    So mostly using hyperv manager now. Overall quite unhappy with the situation. If gaming & netflix wasn't as meh on linux I'd just switch

    Yeah, I also have my Win 10 rig mostly for gaming.

  • YmpkerYmpker OGContent Writer

    Update: Virtualbox works again.

    Thanked by (1)Decicus
  • @Ympker said: Update: Virtualbox works again.

    What was the solution? :)

    "A single swap file or partition may be up to 128 MB in size. [...] [I]f you need 256 MB of swap, you can create two 128-MB swap partitions." (M. Welsh & L. Kaufman, Running Linux, 2e, 1996, p. 49)

  • Windows 10 user too... And I had to go back to 6.1.30 to have any kind of success!

    Thanked by (1)Ympker
  • YmpkerYmpker OGContent Writer
    edited May 2022

    @angstrom said:

    @Ympker said: Update: Virtualbox works again.

    What was the solution? :)

    Sunday, I followed this guide: https://windowscrazy.com/6078-how-to-uninstall-wsl2-on-windows-10-quickly-3-ways/#3

    Then I rebooted several times, however it still wouldn't work (on Sunday). Yesterday, Virtualbox started working again. Probably the guide was effective in the end (and after the 10th reboot).

    @TigersWay I am running latest Virtualbox release noe (6.1.34).

    Thanked by (1)angstrom
  • If all else fails, it's pretty easy to migrate back to WSL1. You just need to run wsl --set-version Ubuntu 1 (for example). However, note that Docker works best with WSL2.

    Why not just use Hyper-V though? In my experience it works better than VirtualBox.

    Thanked by (1)Ympker
  • YmpkerYmpker OGContent Writer

    @Daniel said:
    If all else fails, it's pretty easy to migrate back to WSL1. You just need to run wsl --set-version Ubuntu 1 (for example). However, note that Docker works best with WSL2.

    Why not just use Hyper-V though? In my experience it works better than VirtualBox.

    Yeah, trying WSL1 might be an option.

    There's no reason I haven't tried Hyper V yet. Just the habit of having used Virtualbox over the past years and the fact that I've been happy with it.

  • @Ympker said: Virtualbox

    I believe Virtual box have HyperV support because I use it before.

    Action and Reaction in history

  • @havoc said: So mostly using hyperv manager now. Overall quite unhappy with the situation. If gaming & netflix wasn't as meh on linux I'd just switch

    It is good to have two machine to separate work and games. I was recently looking at some ITX machines to complete separate my virtual needs through. laptop feels a bit inadequate.

    Thanked by (1)Ympker

    Action and Reaction in history

  • YmpkerYmpker OGContent Writer

    @elliotc said:

    @Ympker said: Virtualbox

    I believe Virtual box have HyperV support because I use it before.

    Yeah. For virtualization type I can select Hyper-V, Paravirtualising, KVM, none and default. Rn it is set to default (whatever that is).

  • @elliotc said:
    It is good to have two machine to separate work and games.

    Thankfully work provides laptop & cell so that part is already sorted.

    Just tired of windows BS frankly. e.g. Win11 not allowing taskbar on left/right.

  • @havoc said:

    Just tired of windows BS frankly. e.g. Win11 not allowing taskbar on left/right.

    I'm not a big fan of Windows either, but Windows 11 does left you set your taskbar to align left (like previous Windows versions). Default is still in the middle though.

    Thanked by (1)Ympker

    Website: thomassen.sh

    Discord: Decicus#0001

  • YmpkerYmpker OGContent Writer

    @Decicus said:

    @havoc said:

    Just tired of windows BS frankly. e.g. Win11 not allowing taskbar on left/right.

    I'm not a big fan of Windows either, but Windows 11 does left you set your taskbar to align left (like previous Windows versions). Default is still in the middle though.

    I'm still on Win 10 and don't really plan to upgrade any time soon. Am I missing out on anything Win11?

  • @Ympker said:

    @Decicus said:

    I'm not a big fan of Windows either, but Windows 11 does left you set your taskbar to align left (like previous Windows versions). Default is still in the middle though.

    I'm still on Win 10 and don't really plan to upgrade any time soon. Am I missing out on anything Win11?

    I've only been using Win11 on my work laptop, so I haven't really explored it much, but I'll say... probably not. The only thing I really wanted to mess around with was Windows Subsystem for Android, but I honestly haven't even looked at that yet.

    Thanked by (1)Ympker

    Website: thomassen.sh

    Discord: Decicus#0001

  • elliotcelliotc OG
    edited May 2022

    @havoc said:

    @elliotc said:
    It is good to have two machine to separate work and games.

    Thankfully work provides laptop & cell so that part is already sorted.

    Just tired of windows BS frankly. e.g. Win11 not allowing taskbar on left/right.

    My boss provide me a crapy laptop... gen7 intel with 16gb ram or something. That's why I use my own laptop and keyboard for work ,and I am seeking job already. Well, at least they fund me to buy a cheap monitor.

    Action and Reaction in history

  • @Decicus said:
    Windows 11 does left you set your taskbar to align left (like previous Windows versions).

    No not left align. I need left as in vertical. 3840×1080 res so losing pixels on left is much better than bottom. (Should have spent the extra 500 bucks for a 3840×1440 sigh)

    @elliotc said:
    My boss provide me a crapy laptop... gen7 intel with 16gb ram or something. That's why I use my own laptop and keyboard for work ,and I am seeking job already. Well, at least they fund me to buy a cheap monitor.

    Pretty sure my work one is a 8gb one...some MS surface thing. Alas can't use own gear...no chance IT allows that from security perspective.

  • @havoc said: Alas can't use own gear...no chance IT allows that from security perspective.

    We are in mixing mode. That's why they fund me a monitor. And the another reason is my company is pretty small, and I am one of the person that involve the audit process...

    Action and Reaction in history

Sign In or Register to comment.