CentOS7 set up and use open-vm-tools to share folders

CentOS7 set up and use open-vm-tools to share folders


1. Install open-vm-tools:

yum install open-vm-tools

After the installation is complete, shut down the server init 0and set up a shared folder.

insert image description here

The default configuration is sufficient when using the Add Shared Folder Wizard.
insert image description here
insert image description here
insert image description here

If you set the shared folder in the virtual machine settings in advance, you can directly enter the command to restart after installing open-vm-tools . Enter the server, enter:reboot

vmware-hgfsclient

insert image description here
As shown in the figure, if the previously set shared file name appears, it means that it can be mounted. (The name of the shared folder I created before is share )

Create a mount directory and mount:

mkdir /mnt/hgfs
vmhgfs-fuse .host:/ /mnt/hgfs

insert image description here

Points to note:
1. Root user authority is required to mount.
2. Need to remount (execute vmhgfs-fuse .host:/ /mnt/hgfs) every time you boot

Reference: https://www.jianshu.com/p/c7e965bfce8b

Guess you like

Origin blog.csdn.net/problemRecord/article/details/112369886