vmware shared folder - 共享目录设置

vmWare虚拟机在Windows上与Linux共享目录。

设置共享目录

安装 VMware Tools

安装vm工具

[root@node1 ~]# yum install open-vm-tools

执行共享目录脚本

[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
mount: /dev/sr0 is write-protected, mounting read-only

[root@node1 cdrom]# cp /mnt/cdrom/VMwareTools-10.3.10-13959562.tar.gz ~
[root@node1 cdrom]# cd ~

[root@node1 ~]# tar -zxvf VMwareTools-10.3.10-13959562.tar.gz
[root@node1 ~]# ./vmware-tools-distrib/vmware-install.pl

一路回车执行默认值,若出现如下提示:

[root@localhost vmware-tools-distrib]# ./vmware-install.pl
-bash: ./vmware-install.pl: /usr/bin/perl: bad interpreter: No such file or directory

安装perl即可:

[root@localhost vmware-tools-distrib]# yum install perl

查看主机目录

[root@node1 ~]# vmware-hgfsclient
vmshare

查看vm共享目录

目录一般位于/mnt/hgfs/下

[root@node1 ~]# ls /mnt/hgfs/
vmshare