vmware12+centos7+win7 无法共享文件 /mnt/hgfs 问题

问题:

win7 操作系统 ,vmware12 重新安装,centos7 从其他电脑拷贝过来;

1. vmtool 安装失败:

/tmp/modconfig-oAfYr7/vmhgfs-only/page.c:1649:23: warning: passing argument 3 of ‘wait_on_bit’ makes integer from pointer without a cast [enabled by default]
                       TASK_UNINTERRUPTIBLE);
                       ^
In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:5,
                 from include/linux/mm.h:9,
                 from include/linux/pagemap.h:7,
                 from /tmp/modconfig-oAfYr7/vmhgfs-only/page.c:28:
include/linux/wait.h:1044:1: note: expected ‘unsigned int’ but argument is of type ‘int (*)(void *)’
 wait_on_bit(void *word, int bit, unsigned mode)
 ^
/tmp/modconfig-oAfYr7/vmhgfs-only/page.c:1649:23: error: too many arguments to function ‘wait_on_bit’
                       TASK_UNINTERRUPTIBLE);
                       ^
In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:5,
                 from include/linux/mm.h:9,
                 from include/linux/pagemap.h:7,
                 from /tmp/modconfig-oAfYr7/vmhgfs-only/page.c:28:
include/linux/wait.h:1044:1: note: declared here
 wait_on_bit(void *word, int bit, unsigned mode)

解决:

把vmtool 压缩包里面的 lib/modules/source/vmhgfs.tar 拷贝到临时目录,解压,然后修改里面的 page.c 文件如下:

 //#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)

把修改后的文件打包成 vmhgfs.tar ,然后覆盖lib/modules/source/vmhgfs.tar

重新执行vmtool 脚本;

 

2. 成功安装了vmtool 后,/mnt/hgfs 下仍然空空如是,试了网上一些方法,ls /mnt/hgfs, 更加糟糕,显示如下:

cannot access ‘hgfs’: Protocol error

解决办法:

1) VMWARE 中把centos7 关闭;

2) 重新设置需要的共享文件夹;

3) VMWARE 中启动centos7;

 

如果还不行,那得重新尝试百度的各种方法了;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值