异常日志:

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

posted on 2022-06-13 12:00  y1j2x34  阅读(440)  评论(0编辑  收藏  举报