VMware虚拟机设置了共享文件夹却找不到

今天重启虚拟机上的时候发现前一天设置的共享文件夹无法打开了,查了一番资料最后处理好了,但着实费了点劲,记录一下,以免下次忘记。

场景:系统deepin15.11 + 虚拟机VMware Workstation 15 Pro
问题:设置完共享文件夹后,查看 /mnt/hgfs/ 下面发现不显示设置的共享文件夹,重启、重新设置都没用

解决方法:
重新安装VMware tools。
关闭虚拟机的情况下,点击VMware选项栏中的虚拟机,选择安装VMware Tools重装完就好了。

但如果你和我一样,这里是灰色不能选的,那就继续往下看。


重装VMware tools
  1. 首先找到位于你VMware安装目录下的linux.iso,我的安装地址在 F:\Program Files (x86)\VMware\VMware Workstation,所以镜像文件就在 F:\Program Files (x86)\VMware\VMware Workstation\linux.iso

TIPS:找不到的小伙伴,可以编辑虚拟机配置,然后选CD/DVD,在右边的连接选项中选择,使用物理驱动器,自动检测。然后重新打开设置,就能看到了镜像地址了,复制地址以后还原即可。

查找镜像地址
  1. 打开虚拟机,把linux.iso直接拖到桌面上,解压,进入解压目录,执行 sudo ./vmware-install.pl,安装完即可发现共享文件夹

TIPS:一定要覆盖安装
说明:由于 VMware tools 安装过程需要很多步确认,在选择是否覆盖的步骤时,默认是不覆盖的,这样你安装完成后还是不能解决根本问题。本来查到的很多文章都说要重装VMware tools,但就是因为一直按enter键默认安装,导致安装了好几次都没有解决问题!
所以,亲测所有确认项目要都输入 yes

具体安装过程:共需要13步确认,其中 11 和 12 步必须输入yes,不能使用默认

[root@bogon vmware-tools-distrib]#  ./vmware-install.pl 
The installer has detected an existing installation of open-vm-tools packages 
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 packages and use VMware Tools, you must uninstall the 
open-vm-tools packages and re-run this installer.
The packages that need to be removed are:
open-vm-tools
The installer will next check if there are any missing kernel drivers. Type yes if you want to do this, otherwise type no [yes] yes      1.输入 yes

INPUT: [yes]

Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools. In which directory do you want to install the binary files? 2.这里回车默认
[/usr/bin] 

INPUT: [/usr/bin]  default What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 3.回车默认
[/etc/rc.d] 

INPUT: [/etc/rc.d]  default What is the directory that contains the init scripts? 4.回车默认
[/etc/rc.d/init.d] 

INPUT: [/etc/rc.d/init.d]  default

In which directory do you want to install the daemon files? 5.回车默认
[/usr/sbin] 

INPUT: [/usr/sbin]  default

In which directory do you want to install the library files? 6.回车默认
[/usr/lib/vmware-tools] 

INPUT: [/usr/lib/vmware-tools]  default The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want? 7.输入 yes [yes] yes

INPUT: [yes] In which directory do you want to install the documentation files? 8.回车默认
[/usr/share/doc/vmware-tools] 

INPUT: [/usr/share/doc/vmware-tools]  default The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] yes                                9.输入 yes             

INPUT: [yes]

The installation of VMware Tools 10.3.21 build-14772444 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] yes         10.输入 yes

INPUT: [yes]

You have chosen to install VMware Tools on top of an open-vm-tools package.  
You will now be given the option to replace some commands provided by 
open-vm-tools.  Please note that if you replace any commands at this time and 
later remove VMware Tools, it may be necessary to re-install the open-vm-tools.

The file /usr/bin/vmware-hgfsclient that this program was about to install 
already exists.  Overwrite? [no] yes   **11.!!!!!注意:这里必须输入 yes**

INPUT: [yes]

The file /usr/bin/vmhgfs-fuse that this program was about to install already 
exists.  Overwrite? [no] yes       **12.!!!!!!注意:这里必须输入 yes**

INPUT: [yes]

Initializing...

Making sure services for VMware Tools are stopped.

Stopping vmware-tools (via systemctl):  [  OK  ]

The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

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? [yes] yes   13.输入 yes

INPUT: [yes]

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

Skipping configuring automatic kernel modules as no drivers were installed by 
this installer.

Skipping rebuilding initrd boot image for kernel as no drivers to be included in boot image were installed by this installer.

The configuration of VMware Tools 10.3.21 build-14772444 for Linux for this 
running kernel completed successfully.

Found VMware Tools CDROM mounted at /run/media/tys/VMware Tools. Ejecting 
device /dev/sr0 ...
Enjoy, --the VMware team
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 215,463评论 6 497
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,868评论 3 391
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 161,213评论 0 351
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,666评论 1 290
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,759评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,725评论 1 294
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,716评论 3 415
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,484评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,928评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,233评论 2 331
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,393评论 1 345
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,073评论 5 340
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,718评论 3 324
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,308评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,538评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,338评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,260评论 2 352

推荐阅读更多精彩内容