VirtualBox 内核不工作

VirtualBox 内核不工作

每当我尝试加载 VirtualBox 内核模块时,都会发生这种情况:

$ sudo /etc/init.d/virtualbox start
* Loading VirtualBox kernel modules...
* modprobe vboxdrv failed. Please use 'dmesg' to find out why
[fail]

相关dmesg输出:[10890.689331] Chromium OS LSM:init_module returned module="/lib/modules/3.8.11/updates/dkms/vboxdrv.ko" pid=28313 cmdline="modprobe vboxdrv"

编辑*

我已经过去了

    * modprobe vboxdrv failed. Please use 'dmesg' to find out why

现在我明白了

     * Loading VirtualBox kernel modules...
     * No suitable module for running kernel found

所以我做了 uname -r 来看看我是否安装了标头并得到了

     (cloudyjr)volt@localhost:~$ uname -r
     3.8.11

编辑*

因此,在我解决了这个问题之后,我遇到了另一个问题,我在命令行中启动了 virtualbox,然后我得到了

    (cloudyjr)volt@localhost:~/Downloads$ virtualbox
    WARNING: The vboxdrv kernel module is not loaded. 
    Either there is no module available for the current kernel (3.8.11)
    or it failed to load.
    Please recompile the kernel module and install it by


    (cloudyjr)volt@localhost:~/Downloads$ virtualbox

警告:未加载 vboxdrv 内核模块。当前内核 (3.8.11) 没有可用的模块,或者加载失败。请重新编译内核模块并安装它

       sudo /sbin/vboxconfig

     You will not be able to start VMs until this problem is fixed.


    You will not be able to start VMs until this problem is fixed.

所以我服从主终端并运行命令

   (cloudyjr)volt@localhost:~/Downloads$ sudo /sbin/vboxconfig
   Running in chroot, ignoring request.
   Running in chroot, ignoring request.
   Running in chroot, ignoring request.
   Running in chroot, ignoring request.
   vboxdrv.sh: Building VirtualBox kernel modules.
   vboxdrv.sh: Starting VirtualBox services.
   vboxdrv.sh: Building VirtualBox kernel modules.
   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

作为根。在 chroot 中运行,忽略请求。在 chroot 中运行,忽略请求。在 chroot 中运行,忽略请求。在 chroot 中运行,忽略请求。

所以现在我使用 dmesg 来检查错误

    [ 1353.252260] Chromium OS LSM: init_module locking-ignored
    module="/lib/modules/3.8.11/misc/vboxdrv.ko" pid=32049
    cmdline="/sbin/modprobe vboxdrv"
    [ 1353.280366] vboxdrv: Found 2 processor cores
    [ 1353.287097] supdrvGipCreate: failed to allocate the GIP page. rc=-26

天啊虚拟机

答案1

模块锁定

如果您熟悉编译自己的内核,则需要查看 Chromium 文档。

从:https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/kernel-faq

从根文件系统外部加载内核模块

如果需要从根文件系统以外的位置加载内核模块,则必须禁用模块锁定。可以使用内核命令行选项:

lsm.module_locking=0

如果您不想花时间进行研究,可以使用一些脚本。

从:https://github.com/divx118/crouton-packages/blob/master/README.md

为了能够从 chromeos 加载 /lib/modules 外部的模块,我们需要禁用 module_locking。这可以通过更改内核标志来完成。

编辑后编辑:我为你做了一些快速的谷歌搜索。以下是在 Chrome 操作系统中设置 Virtualbox 的指南:https://techblog.jeppson.org/2015/11/install-virtualbox-on-a-chromebook/

相关内容