Nixpkgs: VirtualBox "Kernel driver not accessible"

Created on 20 Dec 2019  Â·  5Comments  Â·  Source: NixOS/nixpkgs

Describe the bug
I have the same problem as here
https://github.com/NixOS/nixpkgs/issues/75808
But I don't have virtualbox in my user environment

type VirtualBox
VirtualBox /run/current-system/sw/bin/VirtualBox

To Reproduce
Steps to reproduce the behavior:

  1. Install virtual box. My cfg is it attach.

  2. Try to run VirtualBox and start VM in non root user

if run VBox from root user it works fine.

configuration.txt

Expected behavior
Start VM

Additional context
type VirtualBox
VirtualBox /run/current-system/sw/bin/VirtualBox

groups
users wheel networkmanager libvirtd vboxusers kvm

id
uid=1000(user) gid=100(users) группы=100(users),1(wheel),57(networkmanager),67(libvirtd),72(vboxusers),302(kvm)

ls -l /dev/vbox*
crw-rw---- 1 root vboxusers 10, 58 дек 20 19:59 /dev/vboxdrv
crw-rw-rw- 1 root root 10, 57 дек 20 19:59 /dev/vboxdrvu
crw-rw---- 1 root vboxusers 10, 56 дек 20 19:59 /dev/vboxnetctl

/dev/vboxusb:
итого 0
drwxr-x--- 2 root vboxusers 100 дек 20 19:59 002
drwxr-x--- 2 root vboxusers 60 дек 20 19:59 003

Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.

  • system: "x86_64-linux"
  • host os: Linux 4.19.90, NixOS, 19.09.1629.ce54d9601ea (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3
  • channels(root): "nixos-19.09.1629.ce54d9601ea"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: nixpkgs.virtualbox
# a list of nixos modules affected by the problem
module: virtualisation/virtualbox-host
bug stale kernel nixos

Most helpful comment

I found out an interesting thing VirtualBoxVM (not VirtualBox) works fine.

whereis VirtualBox
VirtualBox: /nix/store/3a2v194b1izyvyrv827k3nd1ll2lrynf-system-path/bin/VirtualBox

whereis VirtualBoxVM
VirtualBoxVM: /run/wrappers/wrappers.CdINDHDJKF/VirtualBoxVM.real /run/wrappers/wrappers.CdINDHDJKF/VirtualBoxVM

All 5 comments

I found out an interesting thing VirtualBoxVM (not VirtualBox) works fine.

whereis VirtualBox
VirtualBox: /nix/store/3a2v194b1izyvyrv827k3nd1ll2lrynf-system-path/bin/VirtualBox

whereis VirtualBoxVM
VirtualBoxVM: /run/wrappers/wrappers.CdINDHDJKF/VirtualBoxVM.real /run/wrappers/wrappers.CdINDHDJKF/VirtualBoxVM

I have the same issue.

I upgraded the channel.

  • system: "x86_64-linux"
  • host os: Linux 4.19.87, NixOS, 19.09.2008.ea553d8c67c (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.2
  • channels(root): "nixos-19.09.2008.ea553d8c67c"
  • channels(brodul): "nixpkgs-20.03pre202090.93e8c34e2e4"
  • nixpkgs: /home/brodul/.nix-defexpr/channels/nixpkgs

Removed the virtualbox.host.enable = true switched then added it back and switched.
Started working.
@iterprise try updating the channel and rebuild. :rocket:

I had this issue as well and was able to solve it. It seems that it was caused by having virtualbox under environment.systemPackages as well as virtualisation.virtualbox.host.enable = true. I removed it from systemPackages and it now it works.

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

Was this page helpful?
0 / 5 - 0 ratings