Ubuntu 22.04 上的 VMWare 站 17.0.0 出现“虚拟以太网失败”

Ubuntu 22.04 上的 VMWare 站 17.0.0 出现“虚拟以太网失败”

我在 Ubuntu 22.04 ( 5.19.0-38-generic) 上安装了 VMWare Workstation pro 17.0.0 (build-20800274)。但是,我无法从客户机访问互联网。我搜索了互联网并尝试了一些解决方案(例如https://communities.vmware.com/t5/VMware-Workstation-Pro/Virtual-ethernet-failed/td-p/2906720)。但它们似乎不起作用。例如,我尝试安装一些补丁并编译模块。

git clone https://github.com/mkubecek/vmware-host-modules
git checkout workstation-17.0.0
sudo make
sudo make install

然后我编译模块。

sudo vmware-modconfig --console --install-all  

然而,我收到了以下消息。

[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
make: Entering directory '/tmp/modconfig-KNOgx7/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/5.19.0-38-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-38-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/linux/driver.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/linux/driverLog.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/linux/hostif.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/apic.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/comport.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/cpuid.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/crosspage.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/memtrack.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/moduleloop.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/phystrack.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/sharedAreaVmmon.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/statVarsVmmon.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/task.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/common/vmx86.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/bootstrap/bootstrap.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-KNOgx7/vmmon-only/common/crosspage.o: warning: objtool: CrossPage_CodePage+0x207: 'naked' return found in RETHUNK build
/tmp/modconfig-KNOgx7/vmmon-only/common/crosspage.o: warning: objtool: CrossPage_CodePage+0x207: missing int3 after ret
/tmp/modconfig-KNOgx7/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-KNOgx7/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-KNOgx7/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
/tmp/modconfig-KNOgx7/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  LD [M]  /tmp/modconfig-KNOgx7/vmmon-only/vmmon.o
  MODPOST /tmp/modconfig-KNOgx7/vmmon-only/Module.symvers
  CC [M]  /tmp/modconfig-KNOgx7/vmmon-only/vmmon.mod.o
  LD [M]  /tmp/modconfig-KNOgx7/vmmon-only/vmmon.ko
  BTF [M] /tmp/modconfig-KNOgx7/vmmon-only/vmmon.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-38-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-KNOgx7/vmmon-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-KNOgx7/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory '/tmp/modconfig-KNOgx7/vmmon-only'
make: Entering directory '/tmp/modconfig-KNOgx7/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/5.19.0-38-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-38-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/driver.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/hub.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/userif.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/netif.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/bridge.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/procfs.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/smac_compat.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/smac.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/vnetUserListener.o
/tmp/modconfig-KNOgx7/vmnet-only/userif.o: warning: objtool: VNetCsumCopyDatagram+0x5e: call to csum_partial_copy_nocheck() with UACCESS enabled
  LD [M]  /tmp/modconfig-KNOgx7/vmnet-only/vmnet.o
  MODPOST /tmp/modconfig-KNOgx7/vmnet-only/Module.symvers
  CC [M]  /tmp/modconfig-KNOgx7/vmnet-only/vmnet.mod.o
  LD [M]  /tmp/modconfig-KNOgx7/vmnet-only/vmnet.ko
  BTF [M] /tmp/modconfig-KNOgx7/vmnet-only/vmnet.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-38-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-KNOgx7/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-KNOgx7/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-KNOgx7/vmnet-only'
Starting VMware services:
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Virtual ethernet                                                   failed
   VMware Authentication Daemon                                        done
Unable to start services

我多次重新安装了 VMware Workstation Pro 及其模块。但还是无法正常工作。


我的Ubuntu主机可以上网,尝试了一下命令sudo service vmware-networks restart,出现了如下错误。

Failed to restart vmware-networks.service: Unit vmware-networks.service not found.

我也运行了该命令ifconfig -a。没有类似vmnet1和 的内容vmnet8

答案1

我遇到了同样的问题,这真的让我很困扰。我vmnet8从虚拟网络(随 vmware 工作站包提供)中删除了它,并使用相同的规格重新创建了它。最后,它对我有用。

答案2

#问题陈述 我认为这与新版本的 vmware 17 或 17.5 vmware Workstation 没有加载影响虚拟接口连接的 vmnet 有关。

#solution(对我有用) 请点击此链接,但我已在下面进行了总结。请按照以下步骤操作。 https://communities.vmware.com/t5/VMware-Workstation-Pro/Virtual-ethernet-failed/td-p/2906720

##下载、提取并进入文件内部。

wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-17.0.0.tar.gz

tar -xzf workstation-17.0.0.tar.gz

##tar 这些文件来自 wget 文件,稍后将替换原始 vmware 文件

  tar -cf vmmon.tar vmmon-only
  tar -cf vmnet.tar vmnet-only

#将它们复制到原始 vmware 文件夹中

 sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/

##运行此命令来构建或编译 vmware 文件或服务。

sudo vmware-modconfig --console --install-all

##如果出现错误,请禁用 vmware 服务。

sudo systemctl disable vmware-USBArbitrator.service
sudo systemctl disable vmware.service

##重新启动计算机并运行相同的命令,没有任何错误

sudo vmware-modconfig --console --install-all

再次启用相同的服务并测试 vmnet 配置

#debug 命令,用它来查看确切的错误。

sudo dmesg | grep vmnet

相关内容