Ubuntu: Unable to install VirtualBox in Windows Bash - Ubuntu (Windows 10)



Question:

I am trying to install VirtualBox inside Windows Bash (Beta) but I got following the persistent error message:

somasundaram@host:~/kernel34$ VBoxManage --version  WARNING: The character device /dev/vboxdrv does not exist.           Please install the virtualbox-dkms package and the appropriate           headers, most likely linux-headers-3.4.0+.             You will not be able to start VMs until this problem is fixed.    4.3.36_Ubuntur105129  

I also tried installing the linux headers for 3.4.1 and reconfigure with

somasundaram@host:~/kernel34$ sudo dpkg-reconfigure virtualbox-dkms  

but to no avail.


Solution:1

VirtualBox relies a lot on the hardware it is running on and it does not understand Bash on Windows. Running Vbox on BoW is never have been the intention of either Canonical, Microsoft or Oracle.

As explained by Microsoft:

This is a developer toolset to help you write and build all your code for all your scenarios and platforms.” It’s not a full Ubuntu virtual machine. You can’t use it to host servers, as you could on Linux.

It is a developer toolset; nothing more.

You will need changes on the hardware level to get this working. Probably from both Oracle and Microsoft.

With the current technology I say impossible.


By the way if you think you are capable enough to get hacking this together: the notice you posted are about 2 things

  • The character device /dev/vboxdrv does not exist. Please install the virtualbox-dkms package
  • and the appropriate headers, most likely linux-headers-3.4.0+.

You probably can install virtualbox-dkms with apt. Plus you need to check what headers you have. In general you install these with:

apt-get install linux-headers-`uname -r`  dpkg-reconfigure virtualbox-{numbers}  

if uname -r shows 3.4. Otherwise you need to insert the numbers yourself.

If you can get those 2 working you might be a long way into the direction you need to go. Though I doubt you can get the 2nd working (vBox does not install on system it was not meant for).


Solution:2

Windows Bash is not Linux. Windows Bash is basically an API emulation that lets you run some Linux binaries, provided that they don't do anything special. In other terms, Windows emulates the more commonly used parts of the Linux ABI, enough for simple things like opening a file, reading and writing stuff and doing network I/O to work. However, things like interacting with hardware (which is what VirtualBox normally does) or even interacting with some sort of framebuffer(needed for X and therefore for e.g. Unity, however you can get around this) are not emulated and will fail. VirtualBox wants to build a device driver - which is simply not possible using this emulation model, as there is no kernel you could build it for. Therefore the installation of kernel headers or dkms modules will fail.

TLDR: Windows Bash on Windows is to Linux as wine on Linux is to Windows.


Solution:3

Bash on Windows doesn't have a Linux Kernel, which is required by the Virtual Box. All it does is, it provides similar functionalities that bash like tools expect from a Linux Kernel.

More especially Bash on Windows just provide some GNU tools to be run on top of a Windows Subsystem emulating Linux Kernel.

Since there is no kernel, there will be no modules for Virtual Box. So, It'll fail, won't install.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »