环境:
Win10
VMware Workstation 12
虚拟机:Xubuntu 14.04 (内核4.4)
问题:
之前虚拟机中安装过VMware-tools,可能没有安装完整导致现在开启共享文件夹设置后在虚拟机中无法显示(没有hgfs/目录)。
检查虚拟机发现:
/usr/lib/vmware-tools目录没有;
vmware-config-tools.pl和vmware-uninstall-tools.pl脚本指令也都没有;
但命令行下运行vmware-hgfsclient
命令能输出我自己设置的共享文件夹名称。
解决方法
首先,打开虚拟机后点击VMware工具的“重新安装VMware Tools(T)…”,
然后在虚拟机中su - root
进入到root用户, 再进入VMware-tools解压缩后的vmware-tools-distrib目录,运行./vmware-install.pl
。
安装过程中以下三个选项更改了默认选项:
For kernels >= 4.0.0, open-vm-tools need to be of version 10.0.0 or higher for VMware Host Guest Filessystem (vmhgfs) to function with VMware Tools. Please upgrade open-vm-tools and rerun this installer, or uninstall open-vm-tools. Alternatively, you can disable using the vmhgfs when VMware Tools are configured.
Enter yes to proceed. [no] yes
这一步选择了yes
The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [no] yes
这一步选择了yes
Would you like to enable VMware automatic kernel modules? [no] yes
这一步选择了yes //该项在Ubuntu16.04中选择no也是能成功的。
具体选项与执行信息如下:
root@ubuntu:/home/jeremy/disk2/xx/vmware-tools-distrib# ./vmware-install.pl
The installer has detected an existing installation of open-vm-tools on this
system and will not attempt to remove and replace these user-space
applications. It is recommended to use the open-vm-tools packages provided by
the operating system. If you do not want to use the existing installation of
open-vm-tools and attempt to install VMware Tools, you must uninsta