系统相关
首页 > 系统相关> > Ubuntu 22.04 上安装VMware

Ubuntu 22.04 上安装VMware

作者:互联网

Ubuntu 22.04 上安装VMware16.2.3 build-19376536

参考文章链接

一、官网免登陆下载安装包

  1. vmware linux版最新版下载链接,截至2022.06.06仍然有效

  2. 历史版本下载

    访问vmware workstation pro 的随便一个版本页面,点击 GO TO DOWNLOADS

    image-20220606205009679

    选择版本后,点击Read More展开版本详细信息,如下图,复制要下载的软件包名称,与https://download3.vmware.com/software/wkst/file/ 进行拼接

    所以16.0.0的下载连接应该为:https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-16.0.0-16894299.x86_64.bundle

    image-20220606204556361

二、安装VMware

sudo apt-get update
sudo apt-get install -y  build-essential libaio1
sudo apt-get install linux-headers-$(u)
init 6
sudo chmod +x VMware-Workstation-Full-*.bundle
sudo ./VMware-Workstation-Full-*.bundle

许可证

VMware Workstation Pro 16.x Serials

YA7RA-F6Y46-H889Z-LZMXZ-WF8UA
ZV7HR-4YX17-M80EP-JDMQG-PF0RF
UC3XK-8DD1J-089NP-MYPXT-QGU80
GV100-84W16-M85JP-WXZ7E-ZP2R6
YF5X2-8MW91-4888Y-DNWGC-W68TF
AY1XK-0NG5P-0855Y-K6ZXG-YK0T4

VMware Workstation Player 16.x Serials

FC3D0-FTFE5-H81WQ-RNWZX-PV894
AU3TA-8VFDP-08DUZ-VMM7X-YK8GF
ZF3XK-22F5K-M88AQ-ZMWQV-QCRGAhoose Enroll MOK
FF718-6JDEK-M8DRQ-FNWEX-QG2X4
ZA3DA-43Z9J-089TQ-36N5V-NLHEF
YY19A-6TX94-H88KQ-4NNXG-XAUF6

三、解决Bug

  1. 终端使用vmware报错I/O warning : failed to load external entity "/etc/vmware/hostd/proxy.xml",如下:

    解决方案参考 ,这个问题可以不用理睬,具体原因是linux永久性移除了hostd这个模块,但是vmware暂时没有从它的配置中移除这项检查,如果想要解决可以使用如下命令在检查的路径处创建相同名称的空文件,而且经实践,完成vmware的启动向导后,该错误将不会报出。

    mkdir -p /etc/vmware/hostd
    touch /etc/vmware/hostd/proxy.xml
    

    image-20220606210743920

  2. 首次启动VMware报错,VMware Kernel Module Updater,需要安装vmmon vmnet 两个模块,按照向导安装会失败。

    image-20220606212415560

    image-20220606212527674

    image-20220606212658400

    解决办法:

    sudo apt-get update
    sudo apt install -y build-essential git
    VMWARE_VERSION=workstation-16.2.3
    TMP_FOLDER=/tmp/patch-vmware
    rm -fdr $TMP_FOLDER
    mkdir -p $TMP_FOLDER
    cd $TMP_FOLDER
    git clone https://github.com/mkubecek/vmware-host-modules.git
    cd $TMP_FOLDER/vmware-host-modules
    git checkout $VMWARE_VERSION
    git fetch
    make
    sudo make install
    sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
    sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/vmware/lib/libz.so.1/libz.so.1
    
  3. 正常启动VMware之后,安装系统时会出现Could not open /dev/vmmon:No such file or directory.一系列错误

  4. On EFI secure boot systems, you will need to sign VMware modules (vmmon and vmnet) for VMware Workstation. For signing the modules, you will need to have a machine owner key (MOK) that is trusted by EFI firmware.

    image-20220606212335415

    原因:在EFI secure boot systems上,需要对VMware modules (vmmon and vmnet)进行签名

    解决办法:

    1. 生成MOK(Machine Owner Key)

      sudo apt install -y openssl
      sudo mkdir -p /misc/sign-vmware-modules
      sudo chmod 777 /misc/sign-vmware-modules
      cd /misc/sign-vmware-modules
      openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=MSI/"
      chmod 600 MOK.priv
      
    2. 导入MOK到系统中

      sudo mokutil --import MOK.der
      

      这一步会要求设置一个密码,该密码在第四步的时候会用到

    3. 使用vim signingscript创建脚本,批量给VMware modules签名

      #!/bin/bash
        
      for modfile in $(modinfo -n vmmon vmnet); 
        do
          echo "Signing $modfile"
          /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 /misc/sign-vmware-modules/MOK.priv /misc/sign-vmware-modules/MOK.der "$modfile"
        done
      

      执行脚本

      chmod 700 ./signingscript
      sudo ./signingscript
      init 6
      
    4. 重启后按任意键进入MOK 管理实用程序

      1. Choose Enroll MOK

      2. Choose View Key 0 to check the Machine Owner Key. If the key is OK, press enter and then select Continue

      3. Choose Yes to enroll the key(s) and then enter the password you supplied during the import

      4. Finally, choose Reboot to reboot the system

标签:sudo,modules,sign,MOK,22.04,VMware,Ubuntu,vmware
来源: https://www.cnblogs.com/wthuskyblog/p/16349940.html