我想在主机与虚拟机之间共享文件夹,以在windows下使用source insight修改查看源码。通过最简单的VMware Tools方法,我发现在编译安装VMware Tools的时候,发生了许多编译错误,导致 share-file 功能缺失。经查看,是因为内核版本升级,导致虚拟机提供的VMware Tools源码中的一些结构体成员命名需变更,还有新版本内核不再使用一些存在于旧版中的库函数,由此编译失败。
通过网络这个强大的助手,我找到了解决方法,如下:
To run:
- Checkout the repository:
$ git clone https://github.com/rasa/vmware-tools-patches.git
- Copy your patch(es) into the appropriate directory in the
patches
directory. The file must end in.patch
, or.diff
. This step is optional. For example:$ cp great-new.patch vmware-tools-patches/patches/vmhgfs
- Copy a
VMwareTools-*.tar.gz
into thevmware-tools-patches
folder:$ cp VMwareTools-*.tar.gz vmware-tools-patches/
- Apply the patches, and then run the
vmware-install.pl
installer:$ cd vmware-tools-patches $ ./untar-and-patch-and-compile.sh
If apt-get
is installed on your system, the following packages will be installed prior to compilation:
- linux-headers-$(uname -r)
- build-essential
- dkms
- patch
- psmisc
详细链接为:
https://github.com/hokein/vmware-tools-patches