vmware workstation 12 使用open-vm-tools配置centos7共享文件夹

  • vmware 12下安装centos7后,按往常的惯例安装vmware-tools,安装时提示建议使用open-vm-tools,于是放弃vmware-tools的安装,尝试使用open-vm-tools

首先安装open-vm-tools

yum install -y open-vm-tools
yum install -y open-vm-tools-desktop

在vmware软件中设置共享目录,然后使用下面的命令查看目录是否可用

vmware-hgfsclient

进入/etc/systemd/system目录

cd /etc/systemd/system
vi ./mnt.hgfs.service

输入下面内容

[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

保存后,用systemctl命令使能这个service

systemctl enable mnt.hgfs.service

如果没有创建/mnt/hgfs文件夹,需要创建

mkdir -p /mnt/hgfs

重启后检查共享目录是否已经挂载到/mnt/hgfs目录下了

转载于:https://my.oschina.net/u/2377861/blog/871218

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值