1. 程式人生 > 實用技巧 >virtualbox虛擬機器無法啟動

virtualbox虛擬機器無法啟動

錯誤資訊如下

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

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

大概就是你使用虛擬機器需要載入xxx模組什麼的,然後可以執行/sbin/vboxconfig命令載入。所以就直接sudo執行這個命令嘍。然後如果報錯No DKMS packages installed: not changing Secure Boot validation state.的話,那麼就搜尋一個叫做dkms的包並安裝。然後發現還是有問題

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
  vboxdrv vboxnetflt vboxnetadp
See the documenatation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
No DKMS packages installed: not changing Secure Boot validation state.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

大意就是開啟了EFI Secure Boot的話,還需要重新註冊核心,因為我之前安裝Debian一直都不是EFI引導,所以沒有遇到這個問題

How to sign a kernel module Ubuntu 18.04

其中解決方法倒是寫的很清楚了。