It is common that we need to transfer files to a virtual machine guest OS. VMware allows us to mount shared folder to the guest OS using VMware tools. Mounting VMware shared folder in a Linux guest require additional step compared to mounting shared folder in a Windows guest.
VMware Fusion with a Linux Guest installed (This post is using VMware Fusion 12 with CentOS 8 as the Linux Guest)
Setup Shared Folder in VMware Fusion
- In Virtual Machine Library window right-click on the virtual machine and click Settings…
- Click Sharing menu under System Settings
- Click on the Enable Shared Folders checkbox and click the + icon under the table
- Select a folder to share and click Add
- Go back to the Virtual Machine Library window and Start Up the virtual machine
Mounting Shared Folder to Linux Guest
- Login and open a Terminal window and create a folder which will be the mount point for the shared folder
sudo mkdir /mnt/shared
- Mount the shared folder to the mount point
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/shared -o subtype=vmhgfs-fuse,allow_other
If the above command doesn’t work, then you can try to use this command.
sudo mount -t vmhgfs .host:/ /mnt/shared
Now if you go to /mnt/shared, then you will see the shared folder is already mounted.