LoginSignup
18
18

More than 5 years have passed since last update.

VirtualBoxで"Kernel driver not installed"

Last updated at Posted at 2014-03-12

VirtualBoxでゲストOS(今回はWindowsXPでした)を起動しようとしたら以下のエラーが。

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. if it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

何が起こったの

  • VirtualBoxインストール後にカーネルのバージョンが変わった時
  • カーネルモジュールがうまく組み込まれなかった

どうすればいいの

  • スーパーユーザ権限で以下のコマンドを実行
# /etc/init.d/vboxdrv setup
  • サイトによってはsetupした後にstartさせたりとかあるけど取り敢えず我が家の環境ではsetupだけでエラー吐かなくなりました

カーネルアップデートするたびにこれやんのめんどい

  • そんなあなたにdkms?(調査不足)
  • 上述のメッセージを適当翻訳するよ

if it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

もし君が使ってるディストリビューションで利用可能なら、DKMSパッケージをまず初めにインストールすべきだよ。
DKMSはLinux kernelの変化を追跡して、必要に応じてvboxdrvカーネルモジュールをリコンパイルしてくれるよ。
  • つまりカーネルのバージョンの変化を追いかけて自動で組み込んでくれる…!?
  • と思ったけどggってたら違う感じしてきた
  • まぁでも今手元で問題なくゲストOSが動いているし次トラブった時に試してみます。

ちなみに

  • 以下のどちらかのコマンドを叩けばモジュールが組み込まれているか(loadedかどうか)教えてもらえます
# service vboxdrv status
# /etc/init.d/vboxdrv status
  • 出力はこんな感じ(loaded)
VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.
18
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
18