繁体   English   中英

在 PopOS 20.04 上设置 VMWare 工作站

[英]Setup VMWare Workstation on PopOS 20.04

在 PopOS 时,更新 System76 上的 kernel。 VMWare 工作站 16.2.1 将无法加载 vmmon 和 vmnet kernel 模块,在启动时,弹出窗口将尝试安装它们。 但它会失败。

运行sudo vmware-modconfig --console --install-all将显示以下错误:

[AppLoader] GLib does not have GSettings support.
Stopping VMware services:
   VMware Authentication Daemon                                        done
   Virtual machine monitor                                             done
Starting VMware services:
   Virtual machine monitor                                            failed
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Virtual ethernet                                                   failed
   VMware Authentication Daemon                                        done
Unable to start services

运行sudo systemctl status vmware也会显示错误。

运行sudo /etc/init.d/vmware status将显示 vmmon 和 vmnet 未加载

Module vmmon not loaded
Module vmnet not loaded

修复方法是从 shell 执行以下步骤:

# Install kernel headers
apt update && apt -y install linux-headers-$(uname -r)

# Download patch
wget https://github.com/mkubecek/vmware-host-modules/archive/workstation-16.2.1.tar.gz
tar -xzf workstation-16.2.1.tar.gz
cd vmware-host-modules-workstation-16.2.1
tar -cf vmmon.tar vmmon-only
tar -cf vmnet.tar vmnet-only
cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/

# Make kernel modules
cd /usr/lib/vmware/modules/source/
sudo tar xvf vmmon.tar
cd vmmon-only/include/

# Comment out lines 65-70 and 72. Do not comment outline 71. Comment = // in front of line
sudo vim vm_asm_x86.h

您的修改应如下所示:

65 //#ifndef USE_UBSAN
66 //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) \
67 // ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \
68 // ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \
69 // sizeof(expr) <= 2))
70 //#else
71 #define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr)     <<<---- DO NOT COMMENT OUT this line
72 //#endif

完成编译、移动和加载 vmmon 和 vmnet 后:

cd ..
sudo make
cd ..
sudo tar xvf vmnet.tar
cd vmnet-only
sudo make
cd ..

# You should be in /usr/lib/vmware/modules/source
sudo cp vmmon.o /lib/modules/`uname -r`/kernel/drivers/misc/vmmon.ko
sudo cp vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko
sudo depmod -a
sudo systemctl restart vmware.service

完毕。 现在单击 VMware 按钮,它应该可以正确加载。 对于未来的每个 kernel 升级,都必须执行此操作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM