VirtualBox不能為虛擬電腦開啟一個新任務——The VirtualBox kernel modules do not match this version of VirtualBox
一、問題產生的環境
物理機作業系統:Ubuntu 17.10
(Ubuntu版本檢視命令: cat /etc/issue
)
二、問題產生的背景
我目前使用的主力作業系統是Ubuntu,原來安裝的VirtualBox是在Ubuntu的軟體中心裡下載的,但是無法安裝 VirtualBox 5.2.8 Oracle VM VirtualBox Extension Pack 這個擴充套件,所以也無法在虛擬機器中使用U盤。為了解決這個問題,我在這裡下載了 Ubuntu 17.04 (“Zesty”) / 17.10 (“Artful”) 的AMD64位版本並進行了安裝(安裝之前只是關閉了本機正在執行的VirtualBox並沒有解除安裝原來的VirtualBox
三、報錯內容
VirtualBox - Error In supR3HardenedMainInitRuntime
RTR3InitEx failed with rc=-1912 (rc=-1912)
The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing
'/sbin/vboxconfig'
may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.
where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.
不能為虛擬電腦 CentOS2_DHCP1 開啟一個新任務.
The virtual machine 'CentOS2_DHCP1' has terminated unexpectedly during startup with exit code 1 (0x1).
返回 程式碼: NS_ERROR_FAILURE (0x80004005)
元件: MachineWrap
介面: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}
四、報錯分析
根據上述報錯資訊我們知道,有可能是安裝新的VirtualBox之前沒有解除安裝原來的VirtualBox導致了VirtualBox核心版本的不匹配。此時,最簡單直接的解決辦法就是將本機上現有的VirtualBox以及相關擴充套件和依賴關係都清除,然後重新安裝。(我之前在Windows上使用VirtualBox時也遇到過“VirtualBox不能為虛擬電腦開啟一個新任務”的報錯,但是當時的報錯是因為我打開了虛擬機器的USB控制器,卻沒有安裝相應的擴充套件。關於當時的報錯內容和解決辦法可以點選這裡)
五、解決步驟
1 關閉VirtualBox.
2 解除安裝VirtualBox:
sudo apt-get autoremove virtualbox-5.2
注:上述操作將自動解除安裝VirtualBox及其相關依賴。
3 更新系統:
sudo apt-get update
sudo apt-get upgrade
4 安裝VirtualBox
通過下載的.deb安裝包重新安裝VirtualBox
5 安裝USB控制器擴充套件
關於USB控制器擴充套件VirtualBox 5.2.8 Oracle VM VirtualBox Extension Pack的作用和安裝方法,可以檢視我的這篇文章Click Here.
之後再次啟動虛擬系統,沒有出現報錯,問題解決。