Page 1 of 1
linux VirtualBox in WSL2 in Windows 10?
Posted: 28. Nov 2020, 08:24
by Dan P
I have WSL2 running in Windows 10. In WSL2 is ubuntu 20.04 LTS. Tried to install Linux vrs of VirtualBox in ubuntu / WSL2. Used:
sudo -H apt install virtualbox
to install. It seemed to install OK. When I tried to run virtualbox, got these messages:
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-Microsoft.
You will not be able to start VMs until this problem is fixed.
/usr/lib/virtualbox/VirtualBox: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
I did
sudo -H apt update
sudo -H apt upgrade...
then reran virtualbox to start it. It didn't help.
Has anybody got this to work?
Re: linux VirtualBox in WSL2 in Windows 10?
Posted: 28. Nov 2020, 10:50
by mpack
WSL2 enables Hyper-v.
Read posts #2 and #3 of related
FAQ: I have a 64bit host, but can't install 64bit guests.
VirtualBox does not support being nested inside Hyper-v.
Also, I don't believe your question even relates to VirtualBox official. We don't support Linux repo forks here.
Re: linux VirtualBox in WSL2 in Windows 10?
Posted: 28. Nov 2020, 23:49
by Dan P
Well... Thanks for the reply.
Was just checking to see if anybody got this to work. Looks like WSL2 is not ready for prime time yet. Maybe WSL3 will be.

Re: linux VirtualBox in WSL2 in Windows 10?
Posted: 29. Nov 2020, 04:04
by scottgus1
Just in case you're wondering about this:
mpack wrote:We don't support Linux repo forks here.
and how on earth Mpack knew your host was running a fork of Virtualbox, well, we never ask the gurus...
But as a guess, it's probably this:
Dan P wrote:Please install the virtualbox-dkms package
Official Virtualbox from
https://www.virtualbox.org/wiki/Linux_Downloads does not use dkms (as best I understand) whereas the forks kept by Linux distros do.
Re: linux VirtualBox in WSL2 in Windows 10?
Posted: 29. Nov 2020, 05:49
by Dan P
Afternotes:
The pc used has Windows 10 Home... No Hyper-V available or set on. I am using regular Windows version of Virtualbox in this pc as we speak... with an ubuntu 20.04 guest. I was just trying to get the Linux version of VirtualBox to work in WSL2.
ubuntu 20.04 loaded / installed into WSL2 is from Canonical... from the MS Windows Store. The story is that Canonical worked with Microsoft to provide ubuntu. Microsoft did get ubuntu 20.04 to work, but not the GUI. It works in terminal / command line mode only. I was hoping that the Linux vrs of VirtualBox would work anyways.... Worth a shot.
According to Microsoft, getting a Linux distro GUI to work is "a work in progress". It looks like they are getting there anyways.
..
Re: linux VirtualBox in WSL2 in Windows 10?
Posted: 29. Nov 2020, 10:40
by mpack
The fact that Win10 Home has no support for Hyper-v manager does not mean that it doesn't have any of the infrastructure. WSL2 can't be installed without it.