问题:
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;
如果还不行,那得重新尝试百度的各种方法了;