markdown 一个让VMware / VMware Player在Linux上再次出色的脚本。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 一个让VMware / VMware Player在Linux上再次出色的脚本。相关的知识,希望对你有一定的参考价值。

#!/bin/bash
set -e

KERNEL_MODDIR="/lib/modules/$(uname -r)"

if [ ! -f "$KERNEL_MODDIR/misc/vmmon.o" ]; then
echo "Compiling required modules..."
cd /usr/lib/vmware/modules/source
sudo make -BC vmmon-only
sudo make -BC vmnet-only
sudo mkdir -p "$KERNEL_MODDIR/misc"
sudo cp *.o "$KERNEL_MODDIR/misc"
cd -
fi

sudo insmod "$KERNEL_MODDIR/misc/vmmon.o" && true
sudo insmod "$KERNEL_MODDIR/misc/vmnet.o" && true

(sudo vmware-networks --status > /dev/null) || (sudo vmware-networks --start);

# NOTE: You may need to change these lines
echo "Success. Launching vmplayer..."
/usr/lib/vmware/bin/vmplayer
This script is going to solve the following problem on VMware / VMware Player. If you encounter the following message:

```
/usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
```

Then you should apply a patch. The solution is from [https://askubuntu.com/a/968429/719742](https://askubuntu.com/a/968429/719742). After applying the patch you still need to **launch the executable directly** to bypass the doomed gcc version checking to launch VMware / VMware Player (I don't know why QQ). This is a tedious process, and the kernel modules are needed to be re-inserted after each reboot, though. So I wrote this script to automate this process.

以上是关于markdown 一个让VMware / VMware Player在Linux上再次出色的脚本。的主要内容,如果未能解决你的问题,请参考以下文章

VMware下载与安装教程(详细)

vmware + visual studio 2013内核调试

烂泥:VMWare Workation双网卡配置IP地址

烂泥:VMWare Workation双网卡配置IP地址

虚拟机VMware怎么完全卸载干净

虚拟机设置自适应屏幕大小