我正在尝试从 12.04 升级后,从 Ubuntu 14.04 重新启动装有 Windows 操作系统的虚拟机 (Oracle VM VirtualBox)。
每当我尝试启动 VM 会话时,都会出现两个错误对话框:
(1)
结果代码:NS_ERROR_FAILURE (0x80004005) 组件:机器接口:IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}
(2)
内核驱动程序未安装(rc=-1908)
VirtualBox Linux 内核驱动程序 (vboxdrv) 未加载,或者 /dev/vboxdrv 存在权限问题。请通过执行以下命令重新安装内核模块
‘/etc/init.d/vboxdrv 设置’
以 root 身份运行。如果您的发行版中提供 DKMS 包,则应首先安装它。此包会跟踪 Linux 内核更改,并在必要时重新编译 vboxdrv 内核模块。
根据错误框 2 的建议,我运行以下命令:
user@user][user] sudo /etc/init.d/vboxdrv setup [..]
[sudo] password for user]:
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS Error! Bad return status for module build on kernel: 3.13.0-40-generic (x86_64)
Consult /var/lib/dkms/vboxhost/4.1.18/build/make.log for more information.
* Failed, trying without DKMS
* Recompiling VirtualBox kernel modules
* Look at /var/log/vbox-install.log to find out what went wrong
我曾尝试通过安装 dkms、bbswitch-dkms、open-vm-dkms 和 open-vm-tools-dkms 包来解决这个问题,但没有效果。
编辑:响应以下评论的日志文件指出:
DKMS make.log for vboxhost-4.1.18 for kernel 3.13.0-40-generic
(x86_64) Wed Dec 3 21:14:39 GMT 2014 make: Entering directory
`/usr/src/linux-headers-3.13.0-40-generic' LD
/var/lib/dkms/vboxhost/4.1.18/build/built-in.o LD
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/built-in.o CC [M]
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.o
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c: In
function ‘vboxdrvLinuxUid’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:226:5:
error: incompatible types when returning type ‘kuid_t’ but ‘RTUID’ was
expected
return current->cred->uid;
^ /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c: In
function ‘vboxdrvLinuxGid’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:235:5:
error: incompatible types when returning type ‘kgid_t’ but ‘RTGID’ was
expected
return current->cred->gid;
^ /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c: In
function ‘vboxdrvLinuxEuid’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:244:5:
error: incompatible types when returning type ‘kuid_t’ but ‘RTUID’ was
expected
return current->cred->euid;
^ /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:248:1:
warning: control reaches end of non-void function [-Wreturn-type] }
^ /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c: In
function ‘vboxdrvLinuxUid’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:230:1:
warning: control reaches end of non-void function [-Wreturn-type] }
^ /var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c: In
function ‘vboxdrvLinuxGid’:
/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.c:239:1:
warning: control reaches end of non-void function [-Wreturn-type] }
^ make[2]: ***
[/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv/linux/SUPDrv-linux.o]
Error 1 make[1]: *** [/var/lib/dkms/vboxhost/4.1.18/build/vboxdrv]
Error 2 make: *** [_module_/var/lib/dkms/vboxhost/4.1.18/build] Error
2 make: Leaving directory `/usr/src/linux-headers-3.13.0-40-generic'
答案1
这是内核/驱动程序问题。在 xen 和 xcp 下也存在同样的问题,因此不限于 virtualbox。blktap 驱动程序无法在 3.13 内核上编译。
这可能会有用:
dpkg -i blktap-dkms_2.0.93-0ubuntu4_amd64.deb
(Reading database ... 115884 files and directories currently installed.)
Preparing to replace blktap-dkms 2.0.91-1ubuntu1
(using blktap-dkms_2.0.93-0ubuntu4_amd64.deb) ...
------------------------------
Deleting module version: 2.0.91
completely from the DKMS tree.
------------------------------
Done.
Unpacking replacement blktap-dkms ...
Setting up blktap-dkms (2.0.93-0ubuntu4) ...
Loading new blktap-2.0.93 DKMS files...
Building only for 3.13.0-40-generic
Building initial module for 3.13.0-40-generic
Done.
blktap:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.13.0-40-generic/updates/dkms/
depmod.......
DKMS: install completed.
你基本上只需要使用 trusty tahr 附带的版本