【Kali】Kali Linux升级内核5.8.0后VMware Workstation无法启动

说明:
本文相关内容仅作为学习使用,请勿用于任何商业用途,更不能用于任何违法行为!
本文为原创,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接和本声明。
原文链接:https://www.cnblogs.com/4geek/p/13704833.html

问题描述

  上周比较闲升级了Kali内核从5.7.0升级到5.8.0,更新完又出现了VMware-workstation无法启动的情况!点击VMware图标后无任何响应无任何报错,本以为是之前更新造作系统导致vmmon-only无法启动造成。故直接运行之前写好的脚本,脚本内容和具体执行方法可参见上一篇博文:永久解决Linux更新后Vmware无法打开提示“kernel module updater”

排查过程

  首先运行了升级脚本,结果发现脚本中有报错信息:

⚡  ~  ./vmware-update.sh 
Cloning into 'vmware-host-modules'...
remote: Enumerating objects: 349, done.
remote: Counting objects: 100% (349/349), done.
remote: Compressing objects: 100% (239/239), done.
remote: Total 2333 (delta 217), reused 208 (delta 110), pack-reused 1984
Receiving objects: 100% (2333/2333), 1.21 MiB | 804.00 KiB/s, done.
Resolving deltas: 100% (1877/1877), done.
Branch 'workstation-15.5.1' set up to track remote branch 'workstation-15.5.1' from 'origin'.
Switched to a new branch 'workstation-15.5.1'
*-----------------------------------------------------------------------------
* Branch workstation-15.5.1 has been retired on 2020-08-20 and has not been
* receiving any updates since. Please switch to latest 15.5.x version
* available.
*
* Latest kernel version this branch is intended to work with is 5.7.
*-----------------------------------------------------------------------------

  从上面的信息可以看出,是因为我安装的VMware Workstion版本为15.5.1,并且在2020-8-20日就停止维护了。最下面一行也说明了15.5.x最后一次更新仅仅支持5.7的内核。得到这些信息就分析出了无法启动的原因,接下来就是如何最小变动的情况下升级VMware Workstion。

升级VMware Workstion

  首先前往VMware官网下载最新版本,官方下载地址

  下载下来的是bundle后缀安装文件,需要通过chmod +x赋予执行权限。然后直接在终端中执行即可,执行过程如下:

 ⚡  Soft-linux  ./VMware-Workstation-Full-16.0.0-16894299.x86_64.bundle 
Extracting VMware Installer...done.


[######################################################################] 100%
The system is up to date. 

  这种升级方式需要注意:旧版本的VMware无需卸载,直接安装新版本即可。这样可以保持VMware原有版本相关的配置不变,包括vmnet的配置也都会保留。更新完成之后如果直接打开会提示vmmon相关服务没有升级的提醒,这里忘了截图遇到这个问题只需要修改我们之前的脚本并运行即可。脚本只需要将其中的“VMWARE_VERSION=workstation-15.5.1”修改为”VMWARE_VERSION=workstation-16.0.0“。执行过程如下:

 ⚡  ~  vmware-installer -l
Product Name         Product Version     
==================== ====================
vmware-workstation   16.0.0.16894299 
 ⚡  ~  ./vmware-update.sh 
Cloning into 'vmware-host-modules'...
remote: Enumerating objects: 349, done.
remote: Counting objects: 100% (349/349), done.
remote: Compressing objects: 100% (239/239), done.
remote: Total 2333 (delta 217), reused 208 (delta 110), pack-reused 1984
Receiving objects: 100% (2333/2333), 1.21 MiB | 751.00 KiB/s, done.
Resolving deltas: 100% (1877/1877), done.
Branch 'workstation-16.0.0' set up to track remote branch 'workstation-16.0.0' from 'origin'.
Switched to a new branch 'workstation-16.0.0'
make -C vmmon-only 
make[1]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/5.8.0-kali1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-5.8.0-kali1-amd64'
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/driver.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/linux/hostif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/apic.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/comport.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/cpuid.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/crosspage.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/memtrack.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/phystrack.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/task.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/common/vmx86.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmcore/moduleloop.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.o
  MODPOST /tmp/patch-vmware/vmware-host-modules/vmmon-only/Module.symvers
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmmon-only/vmmon.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.8.0-kali1-amd64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make[1]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmmon-only'
make -C vmnet-only 
make[1]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
Using kernel build system.
make -C /lib/modules/5.8.0-kali1-amd64/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-5.8.0-kali1-amd64'
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/driver.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/hub.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/userif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/netif.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/bridge.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/procfs.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/smac_compat.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/smac.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vnetEvent.o
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vnetUserListener.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.o
  MODPOST /tmp/patch-vmware/vmware-host-modules/vmnet-only/Module.symvers
  CC [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/patch-vmware/vmware-host-modules/vmnet-only/vmnet.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.8.0-kali1-amd64'
make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[2]: Entering directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
make[2]: 'postbuild' is up to date.
make[2]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make[1]: Leaving directory '/tmp/patch-vmware/vmware-host-modules/vmnet-only'
install -D -t /lib/modules/5.8.0-kali1-amd64/misc vmmon-only/vmmon.ko vmnet-only/vmnet.ko
strip --strip-debug /lib/modules/5.8.0-kali1-amd64/misc/vmmon.ko /lib/modules/5.8.0-kali1-amd64/misc/vmnet.ko
if test -z ""; then /sbin/depmod -a 5.8.0-kali1-amd64; fi
rm: cannot remove '/usr/lib/vmware/lib/libz.so.1/libz.so.1': No such file or directory
./vmware-update.sh: line 15: /usr/lib/vmware/lib/libz.so.1/libz.so.1: No such file or directory
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Virtual ethernet                                                    done
   VMware Authentication Daemon                                        done

激活VMware

  上述过程都结束后,新版本的VMware便安装好了。这时点击VMware图标,根据提示选择同意相关license要求,最后输入许可证密钥即可完成新版本VMware激活。

posted @ 2020-09-21 12:14  为极客而生  阅读(1119)  评论(0编辑  收藏  举报