【トラブルシューティング】linuxホストのvirtual boxで仮想マシンを起動できない

ホスト fedoraのvirtual boxにwin10をインストールしたいのだけれども、
そもそも作った仮想マシンを起動できない。

起動しようとすると
「仮想マシン"win10(自分で設定した名)"のセッションを開けませんでした。」
って出て来て、
「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

'/sbin/vboxconfig'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

と出てきます。

つまり管理者権限で/sbin/vboxconfigを実行しろということらしいです。

言われた通りにターミナルで
$ 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:
    kernel-devel kernel-devel-4.18.16-300.fc29.x86_64
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:
    kernel-devel kernel-devel-4.18.16-300.fc29.x86_64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

って言われました。
つまり、kernel-devel kernel-devel-4.18.16-300.fc29.x86_64 
が無くて無理ということらしいです。

だから
$ sudo yum install kernel-devel kernel-devel-4.18.16-300.fc29.x86_64
で足りないと言われた2つのパッケージをインストールしました。

もう一回
$ sudo /sbin/vboxconfig
ってしたら

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

と言われました。
つまり、/var/log/vbox-setup.log を確認しろということらしいです。

言われたログファイルの中には

Building the main VirtualBox module.
Error building the module:
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/4.18.16-300.fc29.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j4 modules
make[1]: 警告: 副次 make で -jN を強制指定しました: jobserver モードを無効にします.
Makefile:946: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel".  中止.
make: *** [/tmp/vbox.0/Makefile.include.footer:106: vboxdrv] エラー 2

とありました。
今度は libelf-dev か libelf-devel か elfutils-libelf-devel を
インストールしろということらしいです。

$ sudo yum install elfutils-libelf-devel
(ほかの2つはライブラリ?に見つからなかったらしい。)

してもう一回
$ sudo /sbin/vboxconfig
したところ

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

うまくいきました。

Virtual boxを起動しなおして完了。

コメント

このブログの人気の投稿

TypeError: ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

overleafで画像が表示されない!

エラー: ""C:\U" で始まる文字列の中で 8 進文字なしに '\U' が使われています