安装VMWare tools,以及解决安装后/mnt中有hgfs但没共享文件的方法

一、首先是安装VMWare tools
 
 
安装成功后,可看的如下信息:
#########################
The configuration of VMware Tools 9.6.2 build-1688356 for Linux for this
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team
############################



 
 
 
 
 
二、解决安装VMWare tools后/mnt中有hgfs但没共享文件

前提:在虚拟机软件中设置了共享目录

此时在linux中进入 /mnt/hgfs 文件夹,但发现共享的文件没有显示

使用以下办法解决(root权限):

1.  vmware-hgfsclient 命令查看当前有哪些共享的目录,这里我只使用了shared文件夹

2.  使用 mount  -t vmhgfs .host:/shared /mnt/hgfs  命令挂载该共享文件夹(注意:带.号的哦),其中.host:/Documents是共享名,只需把Documents换成
使用vmware-hgfsclient 命令得到的目录,/mnt/hgfs是挂载点

3. 到此为止是可以使用该共享文件夹了,但每次都得重复mount一次,所以需要设置为随机启动后自动挂载
    编辑 /etc/fstab,添加下面一行
    .host:/shared     /mnt/hgfs       vmhgfs     defaults  0  0 (按需写)


补充:
如果显示
Error: cannot mount filesystem: No such device
ubuntu则先执行  sudo apt-get install open-vm-dkms
然后再执行3
  • 13
    点赞
  • 51
    收藏
    觉得还不错? 一键收藏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值