ある日、Vagrantを起動しようとすると以下のエラーが表示されました。
エラー
The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system.
The reason is shown below:VirtualBox is complaining that the kernel module is not loaded.
Please run VBoxManage --version or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error.
VirtualBoxのVMを直接起動しようとすると今度はアラートががが。
ドライバに問題があるらしい。
とりあえず書いてあるとおりにコマンドを実行みることに。
$ sudo /etc/init.d/vboxdrv setup Stopping VirtualBox kernel modules ...done. Recompiling VirtualBox kernel modules ...done. Starting VirtualBox kernel modules ...done.
大体1分くらいかかりました。上記の操作により無事起動できるようになりました。
おそらく、仮想マシンをシャットダウンせずにPCの電源を切ってしまったのが原因です。 割とよく忘れるんですよね、なんかいい方法ないかなー。
内容としては記事にするほどのことでもないですが、一応メモとして。