[英]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.