异常日志:
2022-06-13T03:49:56.019Z In(05) host-29676 In file included from /tmp/modconfig-XR2GVI/vmmon-only/./include/x86desc.h:33,
2022-06-13T03:49:56.019Z In(05) host-29676 from /tmp/modconfig-XR2GVI/vmmon-only/./include/modulecall.h:34,
2022-06-13T03:49:56.019Z In(05) host-29676 from /tmp/modconfig-XR2GVI/vmmon-only/common/task.c:60:
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/common/task.c: In function ‘TaskRestoreHostGDTTRLDT’:
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_asm_x86.h:67:44: error: expression in static assertion is not constant
2022-06-13T03:49:56.019Z In(05) host-29676 67 | ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 68 | ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 69 | sizeof(expr) <= 2))
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_assert.h:372:22: note: in definition of macro ‘ASSERT_ON_COMPILE’
2022-06-13T03:49:56.019Z In(05) host-29676 372 | _Static_assert(e, #e); \
2022-06-13T03:49:56.019Z In(05) host-29676 | ^
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_asm_x86.h:263:7: note: in expansion of macro ‘ASSERT_ON_COMPILE_SELECTOR_SIZE’
2022-06-13T03:49:56.019Z In(05) host-29676 263 | ASSERT_ON_COMPILE_SELECTOR_SIZE(expr); \
2022-06-13T03:49:56.019Z In(05) host-29676 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/common/task.c:726:7: note: in expansion of macro ‘SET_TR’
2022-06-13T03:49:56.019Z In(05) host-29676 726 | SET_TR(tr);
2022-06-13T03:49:56.019Z In(05) host-29676 | ^~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_asm_x86.h:67:44: error: expression in static assertion is not constant
2022-06-13T03:49:56.019Z In(05) host-29676 67 | ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 68 | ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 69 | sizeof(expr) <= 2))
2022-06-13T03:49:56.019Z In(05) host-29676 | ~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_assert.h:372:22: note: in definition of macro ‘ASSERT_ON_COMPILE’
2022-06-13T03:49:56.019Z In(05) host-29676 372 | _Static_assert(e, #e); \
2022-06-13T03:49:56.019Z In(05) host-29676 | ^
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_asm_x86.h:129:7: note: in expansion of macro ‘ASSERT_ON_COMPILE_SELECTOR_SIZE’
2022-06-13T03:49:56.019Z In(05) host-29676 129 | ASSERT_ON_COMPILE_SELECTOR_SIZE(expr); \
2022-06-13T03:49:56.019Z In(05) host-29676 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/common/task.c:728:7: note: in expansion of macro ‘SET_LDT’
2022-06-13T03:49:56.019Z In(05) host-29676 728 | SET_LDT(ldt);
2022-06-13T03:49:56.019Z In(05) host-29676 | ^~~~~~~
2022-06-13T03:49:56.019Z In(05) host-29676 /tmp/modconfig-XR2GVI/vmmon-only/./include/vm_asm_x86.h:67:44: error: expression in static assertion is not constant
略.......
手动编译 vmnet 和 vmmon 解决
cd /usr/lib/vmware/modules/source
git clone https://github.com/mkubecek/vmware-host-modules
cd vmware-host-modules
git checkout workstation-16.2.3
make
tar -cf vmnet.tar vmnet-only
tar -cf vmmon.tar vmmon-only
mv vmnet.tar /usr/lib/vmware/modules/source/
mv vmmon.tar /usr/lib/vmware/modules/source/
vmware-modconfig --console --install-all
启动虚拟机时提示:
Could not open /dev/vmmon: No such file or directory.
Please make sure that the kernel module `vmmon' is loaded.
解决: BIOS 中禁用 UEFI with Secure Boot
标签:
问题记录
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· AI Agent开发,如何调用三方的API Function,是通过提示词来发起调用的吗