IMD SolutionComputing LibraryShop main store

Troubleshooting

Mounting a VMware shared folder in a Linux automation VM

Remote access and virtualization Published 5 min read

Short answer

The error means the guest has no vmhgfs kernel filesystem — the share is not missing, because vmware-hgfsclient already proves discovery works. On a guest using packaged open-vm-tools, run sudo vmhgfs-fuse .host:/ /mnt/hgfs instead. If /usr/bin/vmhgfs-fuse does not exist, repair open-vm-tools first and change no network settings.

On this page
  1. Why the share is listed but the mount fails
  2. Check what the guest actually has
  3. Working the case: share listed, vmhgfs mount refused with No such device
  4. Make the mount persistent and readable
  5. What not to chase
  6. Questions asked

Error: cannot mount filesystem: No such device from sudo mount -t vmhgfs .host:/ /mnt/hgfs/ means the guest has no vmhgfs filesystem implementation available to serve the mount. It does not mean the share is missing: vmware-hgfsclient printing the share name already proves that host-to-guest discovery works. On a Linux guest running open-vm-tools installed from distribution packages, the supported mount goes through the userspace helper — sudo vmhgfs-fuse .host:/ /mnt/hgfs. If /usr/bin/vmhgfs-fuse is absent, repair open-vm-tools before anything else, and leave the virtual network alone: HGFS shared folders travel over the hypervisor channel, not the guest's network adapter.

Why the share is listed but the mount fails #

Discovery and mounting are two independent functions. vmware-hgfsclient enumerates the shares configured in the VM's settings through the guest-tools channel, so its output proves only that the channel and the host-side configuration are good. mount -t vmhgfs then asks the kernel for the vmhgfs filesystem type, and No such device is the answer that no implementation of that type is available in this guest.

What is available depends on how the tools were built. The open-vm-tools project ships services and kernel modules, but the distribution's package set decides what actually lands in the guest, and VMware's guidance for enabling HGFS in open-vm-tools installed from packages routes shared folders through the FUSE helper. The kernel vmhgfs module exists only where it was compiled for the running kernel, which is exactly what mount -t vmhgfs depends on.

That splits the decision into three outcomes:

  • /usr/bin/vmhgfs-fuse exists — mount through FUSE. That is the fix on packaged open-vm-tools, and it needs no reboot.
  • The helper is absent and open-vm-tools is not installed — install it from the distribution's packages, then re-check the helper path.
  • You specifically need mount -t vmhgfs — the vmhgfs kernel module must be present for the running kernel. Where it is not, the FUSE mount is the supported configuration, not a workaround.

Check what the guest actually has #

Run these four checks before changing anything:

  • vmware-hgfsclient prints every share name configured for the VM. If your share is not in the list, the fault is host-side: enable shared folders in the VM settings, confirm the host directory is added, and confirm that directory still exists on the host.
  • ls -l /usr/bin/vmhgfs-fuse checks the helper's documented location. Present means the FUSE route is open; absent means the tools installation is incomplete.
  • Check the installed tools package. open-vm-tools from the distribution's repository is the supported configuration on systemd guests. Do not install a second tools stack over an existing one: mixed helpers and services from different releases create failures of their own.
  • sudo mkdir -p /mnt/hgfs creates the destination if it is missing. A missing destination produces a mount-point error, a different failure from No such device — the destination path is never the cause of this error.

Working the case: share listed, vmhgfs mount refused with No such device #

Inputs, each from the failing deployment:

  • Attempted command: sudo mount -t vmhgfs .host:/ /mnt/hgfs/
  • Error string returned: Error: cannot mount filesystem: No such device
  • vmware-hgfsclient prints one line: VM_Shared, the name configured in the VM's shared-folder settings
  • Guest: an Ubuntu-based automation image with open-vm-tools from packages

The rule in words: discovery is proven, so the only component that can be failing is the filesystem implementation. If the FUSE helper is present, mount the host namespace .host:/ through it, and every configured share appears as a subdirectory under the mount point.

The sequence, with what each step must return:

  1. vmware-hgfsclient — prints VM_Shared. Discovery confirmed.
  2. ls -l /usr/bin/vmhgfs-fuse — the file is listed. Implementation confirmed.
  3. sudo mkdir -p /mnt/hgfs — destination exists.
  4. sudo vmhgfs-fuse .host:/ /mnt/hgfs — returns silently, with no error.
  5. Proof: ls /mnt/hgfs prints VM_Shared, and ls /mnt/hgfs/VM_Shared lists the host folder's contents — the same name step 1 printed, now as a directory.

Decision: the helper exists at step 2, so this sequence is the complete fix — no reboot, no network change, no reinstall. If step 2 had failed, the stopping point is the open-vm-tools installation: repair it from the distribution's packages and repeat step 2 before touching anything else.

Make the mount persistent and readable #

A FUSE mount belongs to the account that created it, so one made with sudo reads back as root-owned and other accounts cannot traverse it by default. Two settings change that:

  • At mount time: sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other opens the tree to other guest accounts.
  • At boot: an /etc/fstab stanza mounts it automatically:
.host:/    /mnt/hgfs    fuse.vmhgfs-fuse    allow_other,uid=1000    0    0

uid=1000 is the illustrative value — set it to the id -u output of the account that must own the files. With the stanza in place, sudo mount /mnt/hgfs brings the share up without typing the full command, and the next boot does the same. Copy /etc/fstab somewhere safe before editing it, because a malformed line can stall the boot sequence. After a reboot, ls /mnt/hgfs printing the share name is the same proof it was in the worked example.

What not to chase #

  • The virtual network. Share discovery already works, and HGFS does not use the guest's network adapter — no adapter, IP or Windows-sharing setting will move this error.
  • mount: unknown filesystem type: smbfs. That error came from attempting a Windows network share, a different transport with its own client support. It says nothing about the VMware shared folder.
  • Group-membership fixes from another hypervisor's guest additions, such as adding the user to a vboxsf group. Those configure a different product's shared folders and have no effect in a VMware guest.
  • A different destination directory. /mnt/hgfs/ and a path under /home fail identically when the filesystem implementation is missing; swapping destinations cannot supply it.

Guest tools answer for more than folders, and most VMware guest faults are fixed inside the guest the same way — among them a VMware VM stuck with a multi-monitor layout. Performance is the exception worth separating early: fixing slow automation VMs on a Windows 11 host is a host-side investigation, not a guest-tools one.

Questions asked

Can I mount a single share instead of the whole host namespace?

Yes. Name the share after the namespace: sudo vmhgfs-fuse .host:/VM_Shared /mnt/vmshared mounts only that share, using the exact name vmware-hgfsclient prints. Everything else works the same way, including allow_other and an fstab stanza with the share name in the source field.

Root can read the mounted share but the application account cannot. What is wrong?

The mount was made under sudo, and a FUSE mount defaults to the account that created it. Run sudo umount /mnt/hgfs, then remount with -o allow_other and uid= set to the application account's id -u value, or put both options in the fstab stanza so every boot mounts it correctly.

Does open-vm-tools include the vmhgfs kernel module?

The project ships kernel modules, but what reaches the guest depends on the package build. Distributions that package open-vm-tools expose shared folders through the vmhgfs-fuse helper, and the kernel module must be compiled for the running kernel for mount -t vmhgfs to work at all. That is why the FUSE command is the dependable path.

Does mounting over /mnt/hgfs delete files already in that directory?

No. A mount overlays the directory: anything placed there before mounting stays on the guest disk, hidden until you unmount, and reappears afterwards. That is why the mount point should be an empty directory you created for the share, not a working folder that already holds files.

Keep reading

  • Troubleshooting

    Fixing a VMware VM stuck with a multi-monitor layout

    When a VMware guest keeps drawing a three-monitor layout on one panel after undocking, the host and the guest both report a single display, so the fault sits in the Workstation window, not in the VM configuration. Switch the application theme to Light — switch away and back if it is already Light — to force the window rebuild, keep Monitors on Use host settings for monitors, and exit Unity before you unplug the externals.

    Remote access and virtualization

  • Troubleshooting

    Fixing slow automation VMs on a Windows 11 host

    The usual cause is the Microsoft hypervisor layer under VMware, confirmed by the turtle icon in the status bar. Turn off Memory Integrity, disable Virtual Machine Platform and Windows Hypervisor Platform, run bcdedit /set hypervisorlaunchtype off, reboot, and rerun the same workload — with IT approval on a work machine. Guest memory is ruled out: 16 GB did not help, and working setups run smaller allocations.

    Remote access and virtualization

  • Troubleshooting

    Fixing a VM remote PLC connection with a NAT adapter

    Set the guest's virtual adapter to NAT with DHCP, disable every other guest adapter, and keep the remote-access soft key on the host. The failure that repeats is a second bridged adapter pulling the PLC route away from the NAT path. Test the host path first, then the guest, and check that no local subnet matches the plant network.

    Remote access and virtualization