VirtualBox

4 年 前 建立

4 年 前 結束

#20198 closed defect (fixed)

Virtualbox Linux vboxnetflt driver cannot be built with 5.11 kernel => fixed in svn/6.1.x x>18

回報者: cloudsw 負責人: paulson
元件: host support 版本: VirtualBox 6.1.18
關鍵字: 5.11 kernel 副本:
Guest type: other Host type: Linux

描述 (由 paulson 作最後更新)

Failed to rebuild drivers after installing 5.11 kernel:

$sudo vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

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.

vbox-setup.log is attached

/tmp/vbox.0/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltNeedsLinkState’:
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1761:47: error: dereferencing pointer to incomplete type ‘const struct ethtool_ops’
 1761 |     if (pDev->ethtool_ops && pDev->ethtool_ops->get_drvinfo)
      |                                               ^~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1763:32: error: storage size of ‘Info’ isn’t known
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1766:20: error: ‘ETHTOOL_GDRVINFO’ undeclared (first use in this function)
 1766 |         Info.cmd = ETHTOOL_GDRVINFO;
      |                    ^~~~~~~~~~~~~~~~
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1766:20: note: each undeclared identifier is reported only once for each function it appears in
/tmp/vbox.0/linux/VBoxNetFlt-linux.c:1763:32: warning: unused variable ‘Info’ [-Wunused-variable]
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
make[2]: *** [scripts/Makefile.build:279: /tmp/vbox.0/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [Makefile:1800: /tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile-footer.gmk:117: vboxnetflt] Error 2

附加檔案 (2)

vbox-setup.log (12.8 KB ) - 4 年 前, 由 cloudsw 新增
make.log (11.0 KB ) - 4 年 前, 由 David C Rankin 新增
Linux 5.11 Kernel Module Fail to Build (make.log)

下載所有附檔: .zip

更動歷史 (11)

4 年 前cloudsw 編輯

附檔: 新增 vbox-setup.log

comment:1 4 年 前cloudsw 編輯

Adding the following line in /usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c fixed the problem.

#include <linux/ethtool.h>

comment:2 4 年 前paulson 編輯

摘要: Virtualbox Linux drivers cannot be built with 5.11 kernelVirtualbox Linux vboxnetflt driver cannot be built with 5.11 kernel
狀態: newassigned
負責人: 指定為 paulson

This has been addressed in revision r142841 of the development branch of VirtualBox and the fix has also been backported to the 6.1 branch of VirtualBox as of revision r142842. Any Testbuilds containing these revisions will include the fix. As mentioned here, a quick workaround in the interim is to edit VBoxNetFlt-linux.c to include <linux/ethtool.h>. The fix will also be part of the next maintenance release of VirtualBox 6.1.x.

4 年 前David C Rankin 編輯

附檔: 新增 make.log

Linux 5.11 Kernel Module Fail to Build (make.log)

comment:3 4 年 前David C Rankin 編輯

I can confirm this bug on Archlinux with 6.1.18 and Linux 5.11. make.log attached.

comment:4 4 年 前paulson 編輯

The VirtualBox 6.1.x Testbuilds contain the fix for this issue now so apart from editing VBoxNetFlt-linux.c as an interim fix you can download the updated VirtualBox package from here until the next maintenance release of VirtualBox is available.

comment:5 4 年 前paulson 編輯

描述: 修改 (差異)

comment:6 4 年 前Virgil 編輯

Same problem: same Linux kernel version:5.11,same virtualbox version:6.1.18

回覆:  4 comment:7 4 年 前estibordo 編輯

Replying to paulson:

The VirtualBox 6.1.x Testbuilds contain the fix for this issue now so apart from editing VBoxNetFlt-linux.c as an interim fix you can download the updated VirtualBox package from here until the next maintenance release of VirtualBox is available.

I was running 6.1.18 r142142. Removing it and installing the 6.1.19 Testbuild solve the problem with Kernel 5.11.13.

I was able to add the previous extpack (from ver 6.18) on this new version.

Now all virtualbox modules are built and working.

Thank you!

comment:8 4 年 前Soulsurfer 編輯

The proposed include line mentioned by cloudsw above works on my machine.

Running VirtualBox 6.1.18 now on Kernel 5.11.15.

comment:9 4 年 前paulson 編輯

摘要: Virtualbox Linux vboxnetflt driver cannot be built with 5.11 kernelVirtualbox Linux vboxnetflt driver cannot be built with 5.11 kernel => fixed in svn/6.1.x x>18
狀態: assignedclosed
處理結果: fixed
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette