无法在 Linux 上的 Virtualbox 中启动虚拟机

无法在 Linux 上的 Virtualbox 中启动虚拟机

尝试在 Virtualbox 中启动虚拟机(任何虚拟机)会导致以下错误:

VirtualBox Linux 内核驱动程序未加载或设置不正确。请尝试通过以 root 身份执行“/sbin/vboxconfig”来重新设置它。如果您的系统启用了 EFI 安全启动,您可能还需要对内核模块(vboxdrv、vboxnetflt、vboxnetadp、vboxpci)进行签名,然后才能加载它们。请参阅您的 Linux 系统文档以获取更多信息。其中:suplibOsInit 内容:3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - 未安装支持驱动程序。在 Linux 上,open 返回 ENOENT。

以 root 身份运行 /sbin/vboxconfix:

root@tmine-linux:/home/terri# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
depmod: WARNING: could not open modules.order at /lib/modules/5.15.64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/5.15.64: No such file or directory
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
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.

dmesg 显示:

root@tmine-linux:/home/terri# dmesg
[ 3003.255927] module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 1, loc 000000002850af1d, val ffffffffc182e617

名称-r:

root@tmine-linux:/home/terri# uname -r
5.15.0-53-generic

BIOS 中禁用了安全启动 根据 /usr/src/linux-headers-5.15.0-53-generic 目录中的“make menuconfig”,不需要对模块进行签名。

│ │    -*-   Module signature verification                              │ │  
│ │    [ ]     Require modules to be validly signed                     │ │  
│ │    [*]     Automatically sign all modules                           │ │

我能找到的所有信息都表明问题是启用了安全启动,但我已经三重检查了它,但事实并非如此。我已经删除并重新安装了内核头文件和 VirtualBox。

更多信息:

root@tmine-linux:/usr/src/linux-headers-5.15.0-53-generic# lsmod
Module                  Size  Used by
ccm                    20480  6
rfcomm                 81920  19
cmac                   16384  3
algif_hash             16384  1
algif_skcipher         16384  1
af_alg                 32768  6 algif_hash,algif_skcipher
bnep                   28672  2
snd_sof_pci_intel_cnl    16384  0
sunrpc                585728  1
snd_sof_intel_hda_common   102400  1 snd_sof_pci_intel_cnl
soundwire_intel        40960  1 snd_sof_intel_hda_common
soundwire_generic_allocation    16384  1 soundwire_intel
soundwire_cadence      36864  1 soundwire_intel
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_pci            20480  2 snd_sof_intel_hda_common,snd_sof_pci_intel_cnl
snd_sof_xtensa_dsp     16384  1 snd_sof_intel_hda_common
binfmt_misc            24576  1
snd_sof               147456  2 snd_sof_pci,snd_sof_intel_hda_common
snd_hda_codec_hdmi     77824  1
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_hda_ext_core       32768  3 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    61440  2 snd_sof_intel_hda_common,snd_sof_pci_intel_cnl
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common
soundwire_bus          94208  3 soundwire_intel,soundwire_generic_allocation,soundwire_cadence
snd_soc_core          339968  4 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda
snd_hda_codec_realtek   159744  1
snd_compress           24576  1 snd_soc_core
snd_hda_codec_generic   102400  1 snd_hda_codec_realtek
ac97_bus               16384  1 snd_soc_core
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_sof
intel_tcc_cooling      16384  0
snd_pcm_dmaengine      16384  1 snd_soc_core
x86_pkg_temp_thermal    20480  0
snd_hda_intel          53248  3
snd_intel_dspcfg       28672  2 snd_hda_intel,snd_sof_intel_hda_common
snd_intel_sdw_acpi     20480  2 snd_sof_intel_hda_common,snd_intel_dspcfg
mei_hdcp               24576  0
snd_hda_codec         163840  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
intel_powerclamp       20480  0
coretemp               24576  0
intel_rapl_msr         20480  0
snd_hda_core          110592  9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
kvm_intel             368640  0
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               143360  10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_compress,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
kvm                  1028096  1 kvm_intel
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            49152  1 snd_seq_midi
iwlmvm                569344  0
snd_seq                77824  2 snd_seq_midi,snd_seq_midi_event
rapl                   20480  0
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
input_leds             16384  0
intel_cstate           20480  0
snd_timer              40960  2 snd_seq,snd_pcm
serio_raw              20480  0
mac80211             1249280  1 iwlmvm
btusb                  61440  0
uvcvideo              106496  0
snd                   106496  19 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
btrtl                  24576  1 btusb
btbcm                  24576  1 btusb
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_memops       20480  1 videobuf2_vmalloc
hid_sensor_accel_3d    20480  1
btintel                40960  1 btusb
processor_thermal_device_pci_legacy    16384  0
libarc4                16384  1 mac80211
wmi_bmof               16384  0
intel_wmi_thunderbolt    20480  0
soundcore              16384  1 snd
videobuf2_v4l2         32768  1 uvcvideo
hid_sensor_trigger     20480  2 hid_sensor_accel_3d
bluetooth             704512  53 btrtl,btintel,btbcm,bnep,btusb,rfcomm
videobuf2_common       77824  4 videobuf2_vmalloc,videobuf2_v4l2,uvcvideo,videobuf2_memops
processor_thermal_device    20480  1 processor_thermal_device_pci_legacy
industrialio_triggered_buffer    16384  1 hid_sensor_trigger
iwlwifi               450560  1 iwlmvm
videodev              258048  3 videobuf2_v4l2,uvcvideo,videobuf2_common
ecdh_generic           16384  2 bluetooth
processor_thermal_rfim    24576  1 processor_thermal_device
kfifo_buf              16384  1 industrialio_triggered_buffer
mc                     65536  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
ecc                    36864  1 ecdh_generic
processor_thermal_mbox    16384  2 processor_thermal_rfim,processor_thermal_device
hid_multitouch         32768  0
hid_sensor_iio_common    20480  2 hid_sensor_trigger,hid_sensor_accel_3d
mei_me                 40960  1
processor_thermal_rapl    20480  1 processor_thermal_device
industrialio           94208  5 industrialio_triggered_buffer,hid_sensor_trigger,kfifo_buf,hid_sensor_accel_3d
joydev                 32768  0
mei                   135168  3 mei_hdcp,mei_me
intel_rapl_common      40960  2 intel_rapl_msr,processor_thermal_rapl
ideapad_laptop         24576  0
cfg80211              974848  3 iwlmvm,iwlwifi,mac80211
intel_soc_dts_iosf     20480  1 processor_thermal_device_pci_legacy
intel_pch_thermal      20480  0
sparse_keymap          16384  1 ideapad_laptop
platform_profile       16384  1 ideapad_laptop
int3403_thermal        20480  0
int340x_thermal_zone    20480  2 int3403_thermal,processor_thermal_device
mac_hid                16384  0
int3400_thermal        20480  0
acpi_pad              184320  0
soc_button_array       20480  0
acpi_thermal_rel       16384  1 int3400_thermal
sch_fq_codel           20480  1
msr                    16384  0
parport_pc             49152  0
ppdev                  24576  0
lp                     28672  0
pstore_blk             16384  0
ramoops                32768  0
parport                69632  3 parport_pc,lp,ppdev
reed_solomon           28672  1 ramoops
pstore_zone            32768  1 pstore_blk
efi_pstore             16384  0
ip_tables              32768  0
x_tables               53248  1 ip_tables
autofs4                49152  2
btrfs                1556480  0
blake2b_generic        20480  0
xor                    24576  1 btrfs
zstd_compress         229376  1 btrfs
raid6_pq              122880  1 btrfs
libcrc32c              16384  1 btrfs
dm_mirror              24576  0
dm_region_hash         24576  1 dm_mirror
dm_log                 20480  2 dm_region_hash,dm_mirror
i915                 3104768  39
i2c_algo_bit           16384  1 i915
ttm                    86016  1 i915
drm_kms_helper        311296  1 i915
wacom                 131072  0
syscopyarea            16384  1 drm_kms_helper
hid_sensor_custom      28672  0
sysfillrect            20480  1 drm_kms_helper
usbhid                 65536  1 wacom
sysimgblt              16384  1 drm_kms_helper
hid_sensor_hub         24576  4 hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_accel_3d,hid_sensor_custom
hid_generic            16384  0
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
aesni_intel           376832  8
crypto_simd            16384  1 aesni_intel
nvme                   49152  1
rtsx_pci_sdmmc         32768  0
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel
fb_sys_fops            16384  1 drm_kms_helper
i2c_i801               36864  0
nvme_core             135168  2 nvme
cec                    61440  2 drm_kms_helper,i915
i2c_smbus              20480  1 i2c_i801
rc_core                65536  1 cec
i2c_hid_acpi           16384  0
drm                   622592  12 drm_kms_helper,i915,ttm
intel_lpss_pci         24576  0
i2c_hid                36864  1 i2c_hid_acpi
xhci_pci               24576  0
ahci                   45056  1
rtsx_pci              106496  1 rtsx_pci_sdmmc
intel_lpss             16384  1 intel_lpss_pci
libahci                45056  1 ahci
idma64                 20480  0
xhci_pci_renesas       20480  1 xhci_pci
hid                   151552  6 i2c_hid,wacom,usbhid,hid_multitouch,hid_sensor_hub,hid_generic
wmi                    32768  3 intel_wmi_thunderbolt,wmi_bmof,ideapad_laptop
video                  61440  2 ideapad_laptop,i915
pinctrl_cannonlake     36864  0
root@tmine-linux:/usr/src/linux-headers-5.15.0-53-generic# lsmod | grep vbox
root@tmine-linux:/usr/src/linux-headers-5.15.0-53-generic#
root@tmine-linux:/usr/src/linux-headers-5.15.0-53-generic# dkms status
evdi/5.2.14: added
virtualbox/6.1.38, 5.15.0-53-generic, x86_64: installed
root@tmine-linux:/usr/src/linux-headers-5.15.0-53-generic# modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Exec format error

有什么帮助可以解决这些错误,以便我可以实际启动虚拟机吗?

请求的信息:

root@tmine-linux:/home/terri# uname -a
Linux tmine-linux 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@tmine-linux:/home/terri# dmesg | grep vbox
[   16.590798] vboxdrv: loading out-of-tree module taints kernel.
[   16.591021] vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
root@tmine-linux:/home/terri# mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode

Linux 头文件已经安装:

root@tmine-linux:/home/terri# sudo apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-headers-5.15.0-53-generic is already the newest version (5.15.0-53.59).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.

相关内容