您尚未登录。

#1 2023-08-19 12:04:46

玉璞境大白鹅
会员
注册时间: 2023-01-16
帖子: 24

升级内核导致vm无法启动

最近的几次内核更新中会导致vmware报错,小于等于6.4.9.arch1则没有问题

crany@Security:~/Downloads/vmware-host-modules(master○) » uname -r
6.4.11-arch1-1
crany@Security:~/Downloads/vmware-host-modules(master○) » sudo pacman -Qs linux-headers
local/linux-headers 6.4.11.arch1-1
    Headers and scripts for building modules for the Linux kernel

以下是启动虚拟机时的报错内容

Could not open /dev/vmmon: ?????????.
Please make sure that the kernel module `vmmon' is loaded.

接着我运行

crany@Security ~ » sudo vmware-modconfig --console --install-all 
[sudo] crany 的密码:[AppLoader] GLib does not have GSettings support.
Failed to stop vmware.service: Unit vmware.service not loaded.
Unable to stop services

值得一提的是升级内核过程中有提到一个日志文件,以下是日志文件的全部内容

crany at Security in /var/lib/dkms/vmware-workstation/17.0.1_21139696/build
○ cat make.log
DKMS make.log for vmware-workstation-17.0.1_21139696 for kernel 6.4.11-arch1-1 (x86_64)
2023年 08月 19日 星期六 11:19:53 CST
cp -r /usr/src/vmware-workstation-17.0.1_21139696/vmmon-only vmmon-only
cp -r /usr/src/vmware-workstation-17.0.1_21139696/vmnet-only vmnet-only
make KVERSION=6.4.11-arch1-1 VM_KBUILD=yes -C vmnet-only
make KVERSION=6.4.11-arch1-1 VM_KBUILD=yes -C vmmon-only
make[1]: 进入目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only”
Using kernel build system.
make[1]: 进入目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only”
Using kernel build system.
make -C /lib/modules/6.4.11-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make -C /lib/modules/6.4.11-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/driver.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/driverLog.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/hostif.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/apic.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/comport.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/cpuid.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/crosspage.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/driver.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/hub.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/userif.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/memtrack.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/moduleloop.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/phystrack.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/sharedAreaVmmon.o
In file included from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/cpu_types.h:29,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/modulecall.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/hostif.c:58:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/vm_basic_defs.h:779: 警告:“DO_ONCE”重定义  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/prandom.h:12,
                 from ./include/linux/random.h:153,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:23,
                 from ./include/linux/binfmts.h:5,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/hostif.c:31:
./include/linux/once.h:46: 附注:这是先前定义的位置   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/cpu_types.h:29,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/modulecall.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./common/vmx86.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/driver.h:32,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/driver.c:47:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/vm_basic_defs.h:779: 警告:“DO_ONCE”重定义  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/prandom.h:12,
                 from ./include/linux/random.h:153,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/list_lru.h:12,
                 from ./include/linux/fs.h:13,
                 from ./include/linux/highmem.h:5,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/linux/driver.c:25:
./include/linux/once.h:46: 附注:这是先前定义的位置   46 | #define DO_ONCE(func, ...)                                                   \
      | 
In file included from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/cpu_types.h:29,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/modulecall.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/moduleloop.c:33:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/vm_basic_defs.h:779: 警告:“DO_ONCE”重定义  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/prandom.h:12,
                 from ./include/linux/random.h:153,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:23,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/moduleloop.c:31:
./include/linux/once.h:46: 附注:这是先前定义的位置   46 | #define DO_ONCE(func, ...)                                                   \
      | 
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/statVarsVmmon.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/task.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/vmx86.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/netif.o
In file included from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/cpu_types.h:29,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/modulecall.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/vmx86.h:33,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/vmx86.c:38:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/vm_basic_defs.h:779: 警告:“DO_ONCE”重定义  779 | #define DO_ONCE(code)                                                   \
      | 
In file included from ./include/linux/prandom.h:12,
                 from ./include/linux/random.h:153,
                 from ./include/linux/nodemask.h:97,
                 from ./include/linux/sched.h:23,
                 from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/common/vmx86.c:31:
./include/linux/once.h:46: 附注:这是先前定义的位置   46 | #define DO_ONCE(func, ...)                                                   \
      | 
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/monLoader.o
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/monLoader.c: 在函数‘MonLoader_Process’中:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/monLoader.c:794:24: 警告:the comparison will always evaluate as ‘false’ for the address of ‘entries’ will never be NULL [-Waddress]
  794 |    if (header->entries == 0 || header->count == 0) {
      |                        ^~
In file included from /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/monLoader.c:57:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/./include/monLoader.h:239:19: 附注:‘entries’在此声明  239 |    MonLoaderEntry entries[];
      |                   ^~~~~~~
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/bridge.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/procfs.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/smac_compat.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/smac.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/bootstrap/vmmblob.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/vnetEvent.o
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/vnetUserListener.o
  LD [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.o
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.o: warning: objtool: CrossPage_CodePage+0x207: 'naked' return found in RETHUNK build
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.o: warning: objtool: CrossPage_CodePage+0x207: missing int3 after ret
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/bridge.c: 在函数‘VNetBridgeSendLargePacket’中:
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/bridge.c:1413:11: 错误:implicit declaration of function ‘skb_gso_segment’; did you mean ‘tcp_gso_segment’? [-Werror=implicit-function-declaration]
 1413 |    segs = skb_gso_segment(skb, 0);
      |           ^~~~~~~~~~~~~~~
      |           tcp_gso_segment
/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/bridge.c:1413:9: 警告:assignment to ‘struct sk_buff *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 1413 |    segs = skb_gso_segment(skb, 0);
      |         ^
  MODPOST /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/Module.symvers
  CC [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.mod.o
cc1:有些警告被当作是错误make[3]: *** [scripts/Makefile.build:252:/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only/bridge.o] 错误 1
make[3]: *** 正在等待未完成的任务....
make[2]: *** [Makefile:2032:/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only] 错误 2
make[1]: *** [Makefile:121:vmnet.ko] 错误 2
make[1]: 离开目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmnet-only”
make: *** [Makefile:10:vmnet.ko] 错误 2
make: *** 正在等待未完成的任务....
  LD [M]  /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.ko
  BTF [M] /var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only/vmmon.ko
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: 进入目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only”
make[2]: “postbuild”已是最新。make[2]: 离开目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only”
cp -f vmmon.ko ./../vmmon.o
make[1]: 离开目录“/var/lib/dkms/vmware-workstation/17.0.1_21139696/build/vmmon-only”

最近编辑记录 玉璞境大白鹅 (2023-08-19 12:09:36)

离线

#2 2023-08-19 13:36:28

zhuangzhuang
会员
注册时间: 2022-08-14
帖子: 164
个人网站

Re: 升级内核导致vm无法启动

正常,建议用linux-lts,vmware这种专有软件不会跟随最新内核版本


上学中

离线

#3 2023-08-19 14:28:06

玉璞境大白鹅
会员
注册时间: 2023-01-16
帖子: 24

Re: 升级内核导致vm无法启动

zhuangzhuang 说:

正常,建议用linux-lts,vmware这种专有软件不会跟随最新内核版本

菜鸡不敢换内核,之前我换内核就出了一些幺蛾子后面就没换了

离线

#4 2023-08-19 16:03:20

zhuangzhuang
会员
注册时间: 2022-08-14
帖子: 164
个人网站

Re: 升级内核导致vm无法启动

玉璞境大白鹅 说:
zhuangzhuang 说:

正常,建议用linux-lts,vmware这种专有软件不会跟随最新内核版本

菜鸡不敢换内核,之前我换内核就出了一些幺蛾子后面就没换了

linux-lts应该不怎么会出问题吧(除非你是最新的硬件或n卡)


上学中

离线

#5 2023-08-21 17:38:04

chrisivanovic
会员
注册时间: 2023-06-13
帖子: 59

Re: 升级内核导致vm无法启动

sudo pacman -S linux-lts linux-lts-headers
sudo pacman -R linux linux-headers
sudo grub-mkconfig -o /boot/grub/grub.cfg
grub目录改成你自己的
然后重启就行了吧,有啥危险

最近编辑记录 chrisivanovic (2023-08-22 08:35:51)

离线

#6 2023-08-22 08:31:08

zhuangzhuang
会员
注册时间: 2022-08-14
帖子: 164
个人网站

Re: 升级内核导致vm无法启动

chrisivanovic 说:

sudo pacman -S linux-lts linux-lts-headers
sudo pacman -R linux linux-headers
然后重启就行了吧,有啥危险

不用更新grub吗


上学中

离线

#7 2023-08-22 08:33:19

chrisivanovic
会员
注册时间: 2023-06-13
帖子: 59

Re: 升级内核导致vm无法启动

zhuangzhuang 说:
chrisivanovic 说:

sudo pacman -S linux-lts linux-lts-headers
sudo pacman -R linux linux-headers
然后重启就行了吧,有啥危险

不用更新grub吗

需要,我忘了写了,感谢补充

离线

#8 2023-08-22 13:06:06

Bryan2333
会员
注册时间: 2023-01-19
帖子: 109

Re: 升级内核导致vm无法启动

不清楚你用的那个版本的vmware workstation,AUR上的vmware 17 已经添加了对6.4.10以及以后版本的内核的支持 https://aur.archlinux.org/cgit/aur.git/ … 444dbbc7ff

最近编辑记录 Bryan2333 (2023-08-22 13:06:29)

离线

页脚