openSUSE 笔记本安装 VirtualBox 后新建的虚拟机无法启动

使用 zypper 安装了 vbox,新建虚拟机后点击启动按钮报错,无法启动。

我的华硕笔记本型号如图


:安装了 opensuse15.5leap,GNOME41.8 桌面。 VirtualBox 图形用户界面 版本 7.0.18_SUSE r162988
© 2004-2024 Oracle and/or its affiliates (Qt5.15.8)
Copyright © 2024 Oracle and/or its affiliates.

按照提示执行了 * $ /usr/sbin/vboxconfig
Sources for building host modules are not present,
Use ‘sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel’ to install them. Quitting …

显示要我执行下面的命令安装这些东西。

  • $ sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel

安装完重启后依然无法启动虚拟机,再次执行显示:

  • $ /usr/sbin/vboxconfig
    Building kernel modules…

Build of VirtualBox host kernel modules failed.
Look at /var/log/virtualbox.log to find reasons.
切换 root 执行显示:
bash: /var/log/virtualbox.log: 权限不够

然而此时依然无法启动新建的虚拟机,弹出来的提示和最上面的那个一样 (内容都一样,这里放个文本版)

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

‘/usr/sbin/vboxconfig’

as root.

If your system has EFI Secure Boot enabled you may also 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.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

之前使用自带的 win10 安装运行 vbox 可以正常启动虚拟机,想问下各位大佬这是什么原因,这台笔记本还能装虚拟机吗?如果上面的信息不够回复我,我接着补充。

参考 第三方内核模块签名小工具

很早就有现成的答案了,直接粘贴过来的行了

二、在 openSUSE-Leap-15.5-DVD-x86_64 中安装 VirtualBox-7.0.8
应用程序——工具——终端
ruhong@localhost:~> su -
密码:
localhost:~ #
由普通用户 ruhong 切换到 root 用户
localhost:~ # zypper search VirtualBox
localhost:~ # zypper install VirtualBox virtualbox-guest-desktop-icons virtualbox-kmp-default virtualbox-host-source virtualbox-guest-source virtualbox-guest-tools virtualbox-vnc
localhost:~ # usermod -a -G vboxusers ruhong
重启 opensuse15.5

我把每一步敲了但不知为何还是无法启动,和原来同样的报错。

一 * # zypper se VirtualBox

Retrieving repository 'Update repository with updates from SUSE Linux Enterpr[|] Retrieving repository 'Update repository with updates from SUSE Linux Enterpr[/] Retrieving repository 'Update repository with updates from SUSE Linux Ent[error]
Repository ‘Update repository with updates from SUSE Linux Enterprise 15’ is invalid.
[repo-sle-update|/update/leap/15.5/sle - openSUSE Download] Valid metadata not found at specified URL
History:

Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository ‘Update repository with updates from SUSE Linux Enterprise 15’ because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data…
Reading installed packages…

S | Name | Summary | Type
—±-------------------------------±------------------------------±----------
| python3-VirtualBox | Python bindings for virtual-> | package
i+ | VirtualBox | VirtualBox is an Emulator | package
略…

二 * # zypper install VirtualBox virtualbox-guest-desktop-icons virtualbox-kmp-default virtualbox-host-source virtualbox-guest-source virtualbox-guest-tools virtualbox-vnc

Retrieving repository 'Update repository with updates from SUSE Linux Ent[error]
Repository ‘Update repository with updates from SUSE Linux Enterprise 15’ is invalid.
[repo-sle-update|/update/leap/15.5/sle - openSUSE Download] Valid metadata not found at specified URL
History:

Please check if the URIs defined for this repository are pointing to a valid repository.
Warning: Skipping repository ‘Update repository with updates from SUSE Linux Enterprise 15’ because of the above error.
Some of the repositories have not been refreshed because of an error.
Loading repository data…
Reading installed packages…
‘virtualbox-guest-desktop-icons’ is already installed.
No update candidate for ‘virtualbox-guest-desktop-icons-7.0.18-lp155.2.24.1.noarch’. The highest available version is already installed.
‘virtualbox-guest-source’ is already installed.
No update candidate for ‘virtualbox-guest-source-7.0.18-lp155.2.24.1.noarch’. The highest available version is already installed.
‘virtualbox-guest-tools’ is already installed.
No update candidate for ‘virtualbox-guest-tools-7.0.18-lp155.2.24.1.x86_64’. The highest available version is already installed.
‘virtualbox-host-source’ is already installed.
No update candidate for ‘virtualbox-host-source-7.0.18-lp155.2.24.1.noarch’. The highest available version is already installed.
‘virtualbox-kmp-default’ is already installed.
No update candidate for ‘virtualbox-kmp-default-7.0.18_k5.14.21_150500.55.59-lp155.2.24.1.x86_64’. The highest available version is already installed.
‘virtualbox-vnc’ is already installed.
No update candidate for ‘virtualbox-vnc-7.0.18-lp155.2.24.1.x86_64’. The highest available version is already installed.
‘VirtualBox’ not found in package names. Trying capabilities.
No provider of ‘VirtualBox’ found.

  • Did you mean virtualbox?
    Resolving package dependencies…
    Nothing to do.

三 groups

users vboxusers