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;

 

如果還不行,那得重新嘗試百度的各種方法了;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章