Arch-Linux

Arch Linux 客戶機(Virtualbox):vboxdrv.service 在啟動時失敗

  • April 7, 2020

我將 Windows 10 作為 Virtualbox 主機執行,並將 Arch Linux 作為訪客執行。

在啟動過程中,vboxdrv.service失敗。tty 啟動良好,我可以在其中完成所有操作。但是,startx導致我認為是正常的標準輸出,但在那之後,什麼也沒有發生,我沒有圖形界面,我的 i3wm 沒有啟動。

我的猜測是這種行為與vboxdrv.service啟動失敗有關。

相關資訊可能是:

systemctl status vboxdrv.service:

vboxdrv.service - VirtualBox Linux kernel module
    Loaded: loaded (/opt/VirtualBox/vboxdrv.sh; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Sun 2020-04-05 11:25:10 CEST, 11 min ago
   Process: 359 ExecStart=/opt/VirtualBox/vboxdrv.sh start (code=exited, status=1/FAILURE)

Apr 05 11:25:08 archlinux-vm systemd[1]: Starting VirtualBox Linux kernel module...
Apr 05 11:25:10 archlinux-vm vboxdrv.sh[359]: vboxdrv.sh: Starting VirtualBox services.
Apr 05 11:25:10 archlinux-vm vboxdrv.sh[398]: Starting VirtualBox services.
Apr 05 11:25:10 archlinux-vm vboxdrv.sh[359]: vboxdrv.sh: failed: modprobe vboxpci failed. Please use 'dmesg' to find out why.
Apr 05 11:25:10 archlinux-vm systemd[1]: vboxdrv.service: Control process exited, code=exited, status=1/FAILURE
Apr 05 11:25:10 archlinux-vm systemd[1]: vboxdrv.service: Failed with result 'exit-code'
Apr 05 11:25:10 archlinux-vm systemd[1]: Failed to start VirtualBox Linux kernel module.

dmesg | grep vboxpci一無所獲。

dmesg | grep vboxdrv:

[    7.200636] vboxdrv: loading out-of-tree module taints kernel.
[    7.200840] vboxdrv: module verification failed: signature and/or required key missing - taintig kernel
[    7.209208] vboxcrv: Found 1 processor cores
[    7.246471] vboxdrv: TSC mode is Invariant, tentative frequency 2711995959 Hz
[    7.246472] vboxdrv: Successfully loaded version 6.1.4 (interface 0x002d0001)

startx:

X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux archlinux-vm 5.5.13-arch2-1 # SMP PREEMPT Mon, 30 Mar 2020 20:42:41 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=894e6e02-38f6-4798-b936-431c8287803a rw quiet
Build Date: 30 March 2020 05:05:45AM

Current version of pixman: 0.38.4
       Before reporting problems, check http://wiki.x.org
       to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
       (++) from command line, (!!) notice, (II) informational, 
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/[username]/.local/share/xorg/Xorg.0.log", Time: Sun Apr  5 11:25:30 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
_

並阻止 tty。

pacman -Qs virtualbox:

local/virtualbox-guest-modules-arch 6.1.4-12
   Virtualbox guest kernel modules for Arch Kernel
local/virtualbox-guest-utils 6.1.4-5
   VirtualBox Guest userspace utilities
local/virtualbox-host-modules-arch 6.1.4-12
   Virtualbox host kernel modules for Arch Kernel

編輯:我再次更新了機器(它問我是否想用 linux 替換 virtualbox-guest-modules,我很高興地同意希望通過更新解決問題,但行為保持不變),新pacman -Qs virtualbox

local/linux 5.6.2.arch1-2
   The Linux kernel and modules
local/virtualbox-guest-utils 6.1.4-5
   VirtualBox Guest userspace utilities
local/virtualbox-host-modules-arch 6.1.4-15
   Virtualbox host kernel modules for Arch Kernel

這已經發生了大約兩週,可能是在更新我的機器之後。之前,一切都很好。

我能做些什麼?

virtualbox-host-modules-arch首先,當您執行客人時,您不需要該軟體包。如果您不想解除安裝它,也可以簡單地禁用 vboxdrv,使用systemctl disable vboxdrv

然後你需要啟用vboxservicewith systemctl enable --now vboxservice,它應該返回沒有錯誤。

最後,Arch 包裝似乎有一個錯誤,因此您需要安裝xf86-video-vmware以便 X 可以正確檢測 VirtualBox 主機暴露的卡。

引用自:https://unix.stackexchange.com/questions/578052