背景
VMWare使用中经常需要开启共享文件夹,而在 Centos 环境下该共享操作通常存在配置不生效的情况。
根据提示查询服务状态时,通常返回 vmhgfs-fuse: command not found
命令不存在提示,推测为当前镜像或环境未安装相关软件或依赖。
本文将通过安装一个 github 开源依赖解决该问题。
安装步骤
-
下载 github 开源项目,项目地址
https://github.com/rasa/vmware-tools-patches
-
解压并执行安装
# 切换root用户 # 假设项目下载路径为 /root/ $ cd /root $ tar -xvf vmware-tools-patches.tar.gz $ cd vmware-tools-patches $ chmod +x *.sh $ ./download-tools.sh latest $ ./untar-and-patch.sh $ ./compile.sh
-
安装完成后,通过 vmware 进行“共享文件夹”配置和开启即可
-
重启虚拟机,进入控制台查看共享文件夹状态
$ cd /mnt $ ls -lth