参考:https://my.oschina.net/u/1158620/blog/712253
目标:vmware中可以访问windows的文件
环境:vmware:12.5.5,ubuntu:ubuntu-gnome-16.04.5-desktop-amd64
工具:open-vm-tools
1. 安装open-vm-tools。这里没有使用vmware-tools,因为在安装vmware-tools的时候提示安装open-vm-tools
sudo apt install open-vm*
2. 在/etc/systemd/system目录下新建一个文件:windows.ubuntu.share.service(名字自取)
cd /etc/systemd/system/
touch windows.ubuntu.share.service
3. 在上述文件中输入以下内容
[Unit]
Description=Load VMware shared folders
Requires=vmware-vmblock-fuse.service
After=vmware-vmblock-fuse.service
ConditionPathExists=.host:/
ConditionVirtualization=vmware
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=
ExecStart=/usr/bin/vmhgfs-fuse -o allow_other -o auto_unmount .host:/ /mnt/hgfs
[Install]
WantedBy=multi-user.target
4. 使用systemctl命令使能这个service
systemctl enable mnt.hgfs.service
5. 重启,然后查看/mnt/hgfs/目录下是否已经挂载windows文件。如果不存在hgfs目录,需要创建。