Linux ->> VMWARE Linux虚拟机与Windows主机共享目录

之前讲过Oracle的VirtualBox Linux虚拟机与Windows主机共享目录,这里讲下VMWARE Linux虚拟机与Windows主机共享目录。

VMWare官网已经有专门的文章讲怎么安装了。

https://kb.vmware.com/s/article/1018414

 

1、安装VMware tools,挂载一下VMware tools的iso镜像

 

 

 

 

2、挂载一下cdrom,再解压压缩包文件到home目录下,找到.pl文件直接安装

先mount /dev/cdrom /media/cdrom挂载,然后进到/media/cdrom,tar -zxvf VMwareTools-10.0.5-3228253.tar.gz -C /home 解压到home目录。

[root@gpslave1 cdrom]# cd /home
[root@gpslave1 home]# ll
总用量 12
drwxr-xr-x. 2 root    root      6 9月   1 23:14 cdrom
-rwxrwxrwx. 1 root    root     33 9月   2 17:45 cmd
drwx------. 2 gpadmin gpadmin  62 9月  28 23:29 gpadmin
drwxr-xr-x. 2 root    root     76 9月   4 00:55 gz_test
-rw-r--r--. 1 root    root    112 9月   4 00:43 gz_test.tar.gz
-rwxrwxrwx. 1 root    root    113 9月   3 16:37 tar_test.tar
-rwxrwxrwx. 1 root    root      0 9月   2 17:44 test.txt
drwxr-xr-x. 3 root    root     34 9月   1 23:32 VMTools
drwxr-xr-x. 9 root    root    175 11月 11 2015 vmware-tools-distrib
[root@gpslave1 home]# cd vmware-tools-distrib/
[root@gpslave1 vmware-tools-distrib]# ll
总用量 496
drwxr-xr-x.  2 root root     87 11月 11 2015 bin
drwxr-xr-x.  5 root root     39 11月 11 2015 caf
drwxr-xr-x.  2 root root     67 11月 11 2015 doc
drwxr-xr-x.  5 root root   4096 11月 11 2015 etc
-rw-r--r--.  1 root root 283608 11月 11 2015 FILES
-rw-r--r--.  1 root root   2538 11月 11 2015 INSTALL
drwxr-xr-x.  2 root root    137 11月 11 2015 installer
drwxr-xr-x. 15 root root    202 11月 11 2015 lib
drwxr-xr-x.  3 root root     21 11月 11 2015 vgauth
-rwxr-xr-x.  1 root root    243 11月 11 2015 vmware-install.pl
-rwxr-xr-x.  1 root root 205572 11月 11 2015 vmware-install.real.pl
[root@gpslave1 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 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] y

 

3、 设置windows本地主机的共享目录路径,然后shutdown -r now重启linux虚拟机

 

此时去到/mnt路径下就会出现hgfs目录,就可以看到主机的目录了

 

posted @ 2021-10-08 17:44  Jerry_Chen  阅读(294)  评论(0编辑  收藏  举报