15%

Save 15% on All Hosting Services

Test your skills and get Discount on any hosting plan

Use code:

Skills
Get Started
08.10.2024

How to Create a VMware Shared Folder: Complete Technical Guide for Windows and Linux Guests

A VMware shared folder is a host-side directory exposed to a guest virtual machine through the HGFS (Host-Guest File System) protocol, implemented via VMware Tools kernel modules. It functions as a pseudo-filesystem mount that bypasses the virtual disk entirely, enabling direct file exchange between the host OS and the guest OS without network configuration, FTP, or SCP transfers.

This guide covers the full setup process for VMware Workstation, VMware Player, and VMware Fusion β€” including VMware Tools installation, shared folder configuration, guest-side access on both Windows and Linux, persistent HGFS mounting via `/etc/fstab`, and resolution of the most common failure modes that documentation typically omits.

Prerequisites and Architecture Overview

Before touching any settings, confirm the following are in place:

  • VMware Workstation Pro/Player (v16+), VMware Fusion (macOS host), or VMware Workstation Pro 17 is installed on the host.
  • A functional virtual machine exists and can boot successfully.
  • VMware Tools is installed inside the guest OS β€” this is non-negotiable. The shared folder feature is entirely dependent on the `vmhgfs` kernel module (Linux) or the VMCI/HGFS driver (Windows) that VMware Tools installs.
  • The host folder you intend to share exists and has appropriate filesystem permissions for the user account running the VMware process.

Why HGFS matters: Unlike a network share (SMB/NFS), HGFS operates through the VMware backdoor communication channel. There is no TCP/IP stack involved, no firewall rules to configure, and no DNS resolution required. This makes it significantly faster for small file transfers and completely isolated from guest network configuration.

Step 1: Install VMware Tools on the Guest OS

VMware Tools is the prerequisite that most failed setups trace back to. Open-VM-Tools, the open-source equivalent maintained by the Linux community, is fully supported and preferred on modern Linux distributions.

Installing VMware Tools on a Windows Guest

  1. With the VM powered on, navigate to VM > Install VMware Tools in the VMware menu bar. If the option reads "Reinstall VMware Tools," select it β€” it performs the same operation.
  2. VMware mounts a virtual ISO (`windows.iso`) as a CD-ROM drive inside the guest.
  3. Open File Explorer, navigate to the mounted drive (typically `D:`), and run `setup.exe`.
  4. Select Typical installation unless you have a specific reason to customize components.
  5. Reboot the guest when prompted.

Installing VMware Tools on a Linux Guest

Modern distributions should use open-vm-tools from their native package manager rather than the legacy Perl-based installer:

“`bash

Debian / Ubuntu

sudo apt update && sudo apt install open-vm-tools open-vm-tools-desktop

RHEL / CentOS / AlmaLinux / Rocky Linux

sudo dnf install open-vm-tools

Arch Linux

sudo pacman -S open-vm-tools

“`

After installation, enable and start the service:

“`bash

sudo systemctl enable vmtoolsd

sudo systemctl start vmtoolsd

“`

Critical note for headless/server Linux guests: Install only `open-vm-tools` (without the `-desktop` suffix) if the guest has no graphical environment. The `-desktop` package adds X11 integration that is irrelevant and potentially problematic on servers.

If you are using the legacy VMware Tools ISO method on Linux:

“`bash

Mount the CD if not auto-mounted

sudo mount /dev/cdrom /mnt/cdrom

Copy and extract the tarball

cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp/

cd /tmp && tar -xzf VMwareTools-*.tar.gz

Run the installer

cd vmware-tools-distrib

sudo ./vmware-install.pl

“`

Accept all defaults unless you have a specific configuration requirement. Reboot after completion.

Step 2: Enable Shared Folders in VMware Settings

This step is performed on the host machine through the VMware interface. The VM does not need to be powered on for initial configuration, though you can also adjust settings while the VM is running in some VMware versions.

  1. In VMware Workstation/Player, select your target virtual machine from the library panel.
  2. Click Edit virtual machine settings (or press `Ctrl+D`).
  3. Navigate to the Options tab (not the Hardware tab).
  4. Select Shared Folders from the left-hand list.
  5. Under the "Folder sharing" section, choose one of the following:
SettingBehaviorRecommended Use Case
**Disabled**No shared folders activeDefault state, no sharing needed
**Always enabled**Persists across all power cyclesDevelopment environments, regular file exchange
**Enabled until next power off or suspend**Temporary, resets on shutdownOne-time transfers, testing scenarios

Select Always enabled for a persistent development or operations workflow.

  1. Click Add to launch the Shared Folder Wizard.

Step 3: Configure the Shared Folder via the Wizard

The wizard is straightforward but contains one option that frequently causes confusion:

  1. Click Next on the wizard welcome screen.
  2. Click Browse to select the host-side directory you want to expose to the guest. You can also type the path directly. Important: The path must be accessible to the OS user account under which VMware is running. If VMware runs as your user account, the folder must be readable (and writable, if needed) by that account.
  3. Name the shared folder. This name becomes the mount point identifier inside the guest β€” it does not need to match the actual folder name on the host. Use short, alphanumeric names without spaces to avoid path-escaping issues in Linux terminals.
  4. Check Enable this share to activate it immediately.
  5. Optionally check Read-only if the guest should have no write access to the host folder. This is a strong security practice when sharing source code or configuration files with untrusted or experimental VMs.
  6. Click Finish, then OK.

Step 4: Access the Shared Folder Inside the Guest OS

Accessing Shared Folders on a Windows Guest

  1. Boot the VM and log in.
  2. Open File Explorer.
  3. In the left navigation pane, click Network. You will see a host named `vmware-host`.
  4. Expand `vmware-host` > Shared Folders β€” your configured folder appears here.
  5. You can map this as a persistent network drive: right-click the folder, select Map network drive, and assign a drive letter (e.g., `Z:`).

Alternatively, access it directly via UNC path in the Run dialog (`Win+R`):

“`

\vmware-hostShared Foldersyour_folder_name

“`

Accessing Shared Folders on a Linux Guest

By default, VMware Tools mounts shared folders under `/mnt/hgfs/`. Verify this immediately after booting:

“`bash

ls /mnt/hgfs/

“`

If your shared folder name appears, navigate into it:

“`bash

cd /mnt/hgfs/your_folder_name

ls -la

“`

If `/mnt/hgfs/` is empty or the directory does not exist, the HGFS filesystem has not been auto-mounted. This is a common issue with newer kernels and open-vm-tools. Use the following manual mount command:

“`bash

sudo mkdir -p /mnt/hgfs

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o subtype=vmhgfs-fuse,allow_other

“`

The `vmhgfs-fuse` binary (part of open-vm-tools) replaces the legacy kernel module approach used in older VMware Tools versions. The `.host:/` syntax mounts all shared folders under `/mnt/hgfs/` simultaneously.

Making the HGFS Mount Persistent Across Reboots (Linux)

Add an entry to `/etc/fstab` so the shared folders mount automatically at boot:

“`bash

sudo nano /etc/fstab

“`

Append the following line:

“`

.host:/ /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other,uid=1000,gid=1000 0 0

“`

Replace `uid=1000` and `gid=1000` with the actual UID/GID of your user account (check with `id yourusername`). Setting these values ensures the mounted files are owned by your user rather than root, which prevents permission errors when editing files from within the guest.

Test the fstab entry without rebooting:

“`bash

sudo mount -a

“`

Step 5: Troubleshooting Common Shared Folder Failures

The following issues represent the most frequent failure patterns, including edge cases that standard documentation does not address.

Shared Folder Not Visible in Linux Guest

Symptom: `/mnt/hgfs/` exists but is empty after enabling shared folders in VMware settings.

Cause 1 β€” vmhgfs module not loaded:

“`bash

lsmod | grep vmhgfs

“`

If no output appears, the module failed to load. Check `dmesg` for errors:

“`bash

dmesg | grep -i vmhgfs

“`

Cause 2 β€” Kernel version mismatch: After a kernel update, open-vm-tools kernel modules may not recompile automatically. Reinstall:

“`bash

sudo apt reinstall open-vm-tools # Debian/Ubuntu

sudo dnf reinstall open-vm-tools # RHEL-based

“`

Cause 3 β€” vmtoolsd not running:

“`bash

sudo systemctl status vmtoolsd

sudo systemctl restart vmtoolsd

“`

Permission Denied Errors on Mounted HGFS Folder

Symptom: Files are visible but cannot be edited or created inside the shared folder from the guest.

Root cause: The HGFS mount defaults to root ownership. The `allow_other` and `uid`/`gid` FUSE options resolve this. If using the legacy kernel module (not FUSE), add the user to the `vmware` group or adjust the host folder's ACL.

Shared Folders Greyed Out in VMware Settings

Symptom: The Shared Folders option is present but not configurable.

Cause: This occurs with VMware Player (free version) on certain host OS configurations, or when the VM is configured in a restricted/encrypted mode. VMware Workstation Pro is required for full shared folder management in enterprise deployments.

Shared Folder Not Accessible After Host Sleep/Hibernate

Symptom: The HGFS mount becomes stale after the host resumes from sleep.

Fix: Remount manually or add a systemd service that remounts on resume:

“`bash

sudo systemctl restart vmtoolsd

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o subtype=vmhgfs-fuse,allow_other

“`

Slow File Transfer Performance Through Shared Folders

Root cause: HGFS is not optimized for large binary transfers. For transferring files over 500 MB, consider using SCP, rsync over SSH to a host-only network adapter, or simply attaching an additional virtual disk. Shared folders excel at small configuration files, scripts, and source code β€” not bulk data movement.

Step 6: Managing and Removing Shared Folders

Shared folder management is non-destructive β€” removing a shared folder from VMware settings does not delete the host-side directory. It only removes the HGFS mapping.

  1. Power off the VM (or adjust settings live if VMware version supports hot-add).
  2. Open Edit virtual machine settings > Options > Shared Folders.
  3. Select the target folder entry.
  4. Click Remove to delete the mapping, or Properties to modify the name, path, or read-only flag.
  5. Power the VM back on. The mount point in the guest will be empty or absent on next boot.

To remove a stale `/etc/fstab` entry on Linux after removing the shared folder, edit the file and delete the corresponding `.host:/` line, then run `sudo mount -a` to verify no errors.

VMware Shared Folders vs. Alternative File Transfer Methods

Understanding when to use shared folders versus other mechanisms is critical for production and development environments alike.

MethodProtocolNetwork RequiredPerformancePersistentBest Use Case
**VMware Shared Folders (HGFS)**HGFS (backdoor)NoMediumYes (with fstab)Dev files, configs, scripts
**SMB/CIFS Network Share**SMBYes (host-only/NAT)HighYesCross-platform file servers
**NFS Mount**NFSYesHighYesLinux-to-Linux large transfers
**SCP / SFTP**SSHYesMedium-HighNoSecure one-time transfers
**Drag-and-Drop (VMware Tools)**HGFSNoLowNoSingle small files
**Shared Virtual Disk**SCSI/SATANoVery HighYesLarge binary/database files
**rsync over SSH**SSHYesHighScriptableIncremental sync, backups

For teams running virtualized infrastructure at scale, the limitations of HGFS become apparent quickly. Production workloads that require consistent, high-throughput file access between host and guest are better served by dedicated storage solutions. If you are running multiple VMs for development, testing, or CI/CD pipelines, a VPS Hosting environment with properly provisioned storage volumes eliminates the host-guest boundary entirely.

Security Considerations for VMware Shared Folders

Shared folders introduce a direct filesystem bridge between the host and guest. This has meaningful security implications:

  • VM escape risk: A compromised guest with write access to a shared folder can modify host-side files. Always use read-only mode when sharing folders with VMs running untrusted software or public-facing services.
  • Principle of least privilege: Share only the specific subdirectory needed, never the entire home directory or system root.
  • Malware propagation: Ransomware executing inside a guest VM can encrypt files in a writable shared folder on the host. Treat shared folders as an attack surface.
  • Snapshot consistency: Files modified through HGFS are not captured in VM snapshots. If rollback consistency matters, copy files into the virtual disk before snapshotting.

For environments where isolation is paramount β€” such as security research, malware analysis, or multi-tenant hosting β€” consider using a Dedicated Server with hardware-level isolation rather than shared-folder-based workflows.

Integrating VMware Shared Folders into Development Workflows

Shared folders are most powerful when integrated into automated workflows:

Syncing web project files: Mount a shared folder pointing to your host-side project directory, then configure the guest's web server (Apache/Nginx) to serve directly from `/mnt/hgfs/project/`. Edits made in your host IDE reflect instantly in the guest without any sync step.

Shared configuration management: Store Ansible playbooks, Terraform state files, or Docker Compose definitions on the host and execute them from the guest. This keeps version-controlled files on the host while leveraging guest-side tooling.

Build artifact collection: Configure CI scripts inside the guest to write compiled binaries or test reports to the HGFS-mounted directory, making them immediately available on the host without SSH or file copy steps.

For teams managing multiple virtual environments with control panel access, VPS with cPanel provides a managed alternative where file management, user permissions, and deployment pipelines are handled through a unified interface without manual HGFS configuration.

If your workflow involves deploying web applications from development VMs to production, pairing your local VMware setup with Shared Web Hosting for staging environments allows you to test file structures and permissions before pushing to production servers.

For SSL-secured deployments where certificates need to be distributed across environments, SSL Certificates from AlexHost can be provisioned and then distributed to guest VMs via shared folders during automated setup scripts.

Technical Decision Checklist

Use this checklist before configuring VMware shared folders in any environment:

  • [ ] VMware Tools or open-vm-tools is installed and `vmtoolsd` service is running
  • [ ] The host-side folder path contains no spaces or special characters (avoids FUSE path-escaping bugs)
  • [ ] Appropriate read/write permissions are set on the host folder for the VMware process user
  • [ ] For Linux guests: `vmhgfs-fuse` binary is available (`which vmhgfs-fuse`)
  • [ ] For persistent mounts: `/etc/fstab` entry includes `uid`/`gid` and `allow_other` options
  • [ ] Read-only mode is enabled for any VM running untrusted or externally-facing workloads
  • [ ] Large file transfers (>500 MB) are routed through SCP/rsync rather than HGFS
  • [ ] Snapshots are taken of the virtual disk state, not relied upon for HGFS-side file history
  • [ ] After kernel updates on Linux guests, open-vm-tools modules are verified or reinstalled
  • [ ] Stale `/etc/fstab` entries are removed when shared folders are deleted from VMware settings

FAQ

Why is `/mnt/hgfs/` empty even though shared folders are enabled in VMware?

The most common cause is that the `vmhgfs-fuse` daemon is not running or the HGFS kernel module failed to load after a kernel update. Run `sudo systemctl restart vmtoolsd` and then manually mount with `sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o subtype=vmhgfs-fuse,allow_other`. If that fails, check `dmesg | grep vmhgfs` for module load errors and reinstall open-vm-tools.

Can I use VMware shared folders without VMware Tools installed?

No. The HGFS protocol is implemented entirely within VMware Tools. Without it, the guest OS has no driver capable of communicating with the VMware hypervisor's file-sharing subsystem. There is no workaround β€” VMware Tools installation is mandatory.

What is the difference between `vmhgfs` and `vmhgfs-fuse`?

`vmhgfs` is the legacy in-kernel module used by older VMware Tools versions. `vmhgfs-fuse` is the userspace FUSE-based replacement introduced in open-vm-tools 10.x, which does not require kernel module compilation and works across kernel versions without recompilation. Modern Linux distributions use `vmhgfs-fuse` exclusively.

Does enabling shared folders affect VM performance?

The HGFS channel adds negligible CPU overhead during idle periods. Under heavy I/O β€” such as compiling large codebases directly from the HGFS mount β€” you will observe latency increases compared to native virtual disk I/O. For I/O-intensive operations, copy files to the guest's local virtual disk first, perform the operation, then copy results back to the shared folder.

Are VMware shared folders supported in VMware ESXi or vSphere?

No. Shared folders via HGFS are a feature of VMware Workstation, Player, and Fusion only β€” the desktop hypervisor products. VMware ESXi and vSphere do not support HGFS-based shared folders. In those environments, file sharing between host and guest is handled through NFS datastores, vSAN, or network-based protocols (SMB/NFS) configured at the guest OS level.

15%

Save 15% on All Hosting Services

Test your skills and get Discount on any hosting plan

Use code:

Skills
Get Started