Mount shared folder on a Linux VM


by Antoine - categories : OS Virtualization

Prerequisites

Install Open VM tools on guest

Install Open VM tools from VMware using your package manager.

I'm using dnf package manager (former yum) from Fedora is this example.

$ sudo dnf install open-vm-tools open-vm-tools-desktop

Mounting shared folders

Assuming you want to the shared folders to be mounted on /home/user/VM_shares folder, create it.

$ mkdir /home/user/VM_shares

Mount the host's shared folders using Fuse's VM host guest file system (VM HGFS), allowing every local user to use the moint point.

$ vmhgfs-fuse .host:/ /home/tda/lol -o subtype=vmhgfs-fuse,allow_other

Configure FSTAB for persistent mounting points

You can configure the system FSTAB to the mountpoint to be persistent/automatically mounted across system's reboots.

$ sudo nano /etc/fstab

Add the following line to the FSTAB.

vmhgfs-fuse /home/user/VM_shares    fuse    defaults,allow_other    0   0

Reload systemd manager configuration to take modifications into account.

$ sudo systemctl daemon-reload

Be the first to comment 🡮

0