1、先下载 VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle
2、执行安装:
chmod +x VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle ./VMware-Workstation-Full-17.6.2-24409262.x86_64.bundle
3、切换到图形界面运行 VMWare,得到无法安装 driver 的错误信息。
2025-01-01T08:12:28.531Z In(05) host-177399 Using kernel build system.
2025-01-01T08:12:28.531Z In(05) host-177399 Using kernel build system.
2025-01-01T08:12:28.531Z In(05) host-177399 /tmp/modconfig-RMCiau/vmnet-only/userif.c: In function 'VNetCsumCopyDatagram':
2025-01-01T08:12:28.531Z In(05) host-177399 /tmp/modconfig-RMCiau/vmnet-only/userif.c:88:39: error: 'skb_frag_t {aka const struct bio_vec}' has no member named 'page_offset'; did you mean 'bv_offset'?
2025-01-01T08:12:28.531Z In(05) host-177399 # define skb_frag_off(frag) (frag)->page_offset
2025-01-01T08:12:28.531Z In(05) host-177399 ^
2025-01-01T08:12:28.531Z In(05) host-177399 /tmp/modconfig-RMCiau/vmnet-only/userif.c:623:50: note: in expansion of macro 'skb_frag_off'
2025-01-01T08:12:28.531Z In(05) host-177399 tmpCsum = VNetCsumAndCopyToUser(vaddr + skb_frag_off(frag),
2025-01-01T08:12:28.531Z In(05) host-177399 ^~~~~~~~~~~~
2025-01-01T08:12:28.531Z In(05) host-177399 make[2]: *** [scripts/Makefile.build:303: /tmp/modconfig-RMCiau/vmnet-only/userif.o] Error 1
2025-01-01T08:12:28.531Z In(05) host-177399 make[2]: *** Waiting for unfinished jobs....
2025-01-01T08:12:28.531Z In(05) host-177399 make[1]: *** [Makefile:1598: _module_/tmp/modconfig-RMCiau/vmnet-only] Error 2
2025-01-01T08:12:28.531Z In(05) host-177399 make: *** [Makefile:117: vmnet.ko] Error 2
2025-01-01T08:12:28.531Z In(05) host-177399 Unable to install all modules. See log for details.
4、需要修改 vmware 的驱动源文件。
cd /usr/lib/vmware/modules/source tar xf vmnet.tar mv vmnet.tar vmnet-backup.tar
修改 vmnet-only/userif.c 文件,第 88 行修改为:
//# define skb_frag_off(frag) (frag)->page_offset
# define skb_frag_off(frag) (frag)->bv_offset
打包文件:
cd /usr/lib/vmware/modules/source
tar cf vmnet.tar vmnet-only
5、重新执行安装驱动程序界面。
1397






