-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VirtualBox - Cannot access kernel driver #321
Comments
I get a similar error, but with the text "Kernel module is unavailable". However, it only occurs of the "VirtualBox" GUI is not open. If I have the GUI running, it works fine. As a workaround, does opening the GUI help you? |
did you try |
|
I had both
|
Same for me. /dev/vboxdrv is present and has group vboxusers, permissions are ok, I am in group vboxusers - all fine. But when I run nixops deploy -d mystuff I get a "Kernel driver not accessible" pop up. Funnily it works when I run it as root and even more interesting: Running VirtualBox by my self works without problems. |
Are you running libvirtd or something else with qemu? |
It's been a long time since I looked at this, but I'm pretty sure I wasn't running libvirtd or qemu when it failed for me. |
I can name one more possible reason for this error. If you didn't reboot an instance for a long time, and regularly update channel, you can end up with booted kernel != nixpkgs kernel. If you install virtualbox then, with NixOS option, you won't get vbox drivers, because kernel versions do not match. Doing a reboot is sufficient, I think, didn't try rebooting. |
I can confirm @danbst. Rebooting my host machine solved that (and I indeed did some channel updates after which I haven't rebooted). |
I got the issue by running
|
Using the `virtualbox` package in conjunction with the `virtualization.virtualbox.host.enable = true` flag causes the Kernel access denied problem. Solved by following instructions on NixOS/nixops#321
No luck for me - virtualbox seems broken either from VirtualBox app or from nixops, sudo or not. vboxdrv error as seen here. Hopefully ec2 will work better! Edit: just had to add this to configuration.nix: virtualisation.virtualbox.host.enable = true; |
Can this be closed? |
I think so, please re-open if there are more issues. |
Funny that I should ask to reopen this, but here goes: I've been having this problem with the In other words, the scenario outlined by @danbst is practically guaranteed to happen for most people, right? Or did I misunderstand, and EDIT: Turns out I was wrong. The issue will always present itself, but only on DO and the unreleased Hetzner Cloud backend (which also uses |
I think modules are searched for in So if you want to do this for a running system without a reboot (such as in my case), you have to either trick nixos into believing the module exists in the booted-system, or convince modprobe to use Doing this on a running system shouldn't be a problem for minor releases. However, playing around with kernel modules that could be abi incompatible may cause your system to crash. |
@jappeace How would you go about doing that? |
@asymmetric well I bit the bullet in rebooted, but if you really want to hack, you can replace the symlink, or try to bypass modprobe (insmod seems like fun). I'd prefer bypassing though, who knows what that symlink does. File system seems to be write-able so that totally invites these hacks. Both commands still seem to attach version numbers so you'd need to create a symlink in the directory above that too with God speed. |
Placing the answer here for my future self: |
I just recently stumbled across the same error when I added Note: In #370, the presented solution is to not have VirtualBox in your user environment (which I never did). |
I confirm what @dpaetzel has said. One must ONLY have |
Having the exact same problem on my Manjaro system. When I do |
Following the nixops tutorial in the manual I came across this error.
I am not running a headless setup.
Even installing the most recent rev of nixops the error persists. (4b53c3d)
I get a popup saying:
The text was updated successfully, but these errors were encountered: