I am trying to setup a Windows 10 (guest) VM on Ubuntu 20.04 (host) and I am stuck with the following problem when trying to launch it.
The virtual machine 'Windows 10 Pro' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing '/sbin/vboxconfig' as root.
If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.**
In the terminal :
$ virtualbox WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (5.13.0-051300-generic) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed.
When I type the given command :
$ sudo /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: linux-headers-generic linux-headers-5.13.0-051300-generic This system is currently not set up to build kernel modules. Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. The distribution packages containing the headers are probably: linux-headers-generic linux-headers-5.13.0-051300-generic There were problems setting up VirtualBox. To re-start the set-up process, run /sbin/vboxconfig as root. If your system is using EFI Secure Boot you may need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.
The weird thing is that when I try to install the package, I have the following result :
$ sudo apt-get install linux-headers-$(uname -r) Reading package lists... Done Building dependency tree Reading state information... Done Package linux-headers-5.13.0-051300-generic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'linux-headers-5.13.0-051300-generic' has no installation candidate
$ apt list | grep linux-headers-5.13 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. linux-headers-5.13.0-051300/now 5.13.0-051300.202106272333 all [installed,local]
I get that there are 2 problems there :
- Missing linux headers
- Kernel modules are no signed
Are these 2 problems linked ? Any idea why I can not found the required linux-headers and how to find them ?
What I tried :
- Reinstall virtualbox using command line
$ sudo apt install virtualbox
$ sudo apt install --reinstall virtualbox-dkms && sudo apt install libelf-dev
- Reinstall virtualbox from https://www.virtualbox.org/wiki/Linux_Downloads
- Sign kernel modules : How to sign a kernel module Ubuntu 18.04
PS : I do not wish to deactivate Secure Boot
Thanks for your help