microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
16.91k stars 798 forks source link

The vboxdrv kernel module is not loaded. Error While Attemping To Run VBox on WSL2 #11267

Open Windows98SE-dev opened 3 months ago

Windows98SE-dev commented 3 months ago

Windows Version

Microsoft Windows [version 10.0.22631.3235]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04.4 LTS

Other Software

No response

Repro Steps

I just try to run VBox and it says that it can't find the kernel modules

Expected Behavior

No errors and being able to install the extension pack and run VMs

Actual Behavior

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (5.15.146.1-microsoft-standard-WSL2+) 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.

Qt WARNING: QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700

I tried running the command but then it gave me this :

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. 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.

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.

Diagnostic Logs

No response

github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

sirredbeard commented 3 months ago

WSL does support nested virtualization, but I would not recommend a type 2 hypervisor like VirtualBox.

I would instead recommend using a type 1 hypervisor inside WSL, specifically KVM.

You could use qemu-kvm, gnome-boxes, virt-manager, or Cockpit on WSL to drive a KVM VM.

There is also a fork of VirtualBox that supports KVM as the hypervisor backend, but you have to compile it from source.

Windows98SE-dev commented 3 months ago

Ok, I'll try that !

Windows98SE-dev commented 3 months ago

Thanks