Verify Open-VM-Tools Installation
The foundation of any interaction between a host operating system and a guest virtual machine is the set of drivers and services provided by VMware Tools. In modern Linux distributions, including Ubuntu 22.04 LTS, these tools are packaged asopen-vm-tools. If this package is missing or outdated, critical services like shared folder mounting will fail, leading to the "Error copying" message when attempting to move files from your Windows 11 host.
First, ensure that the necessary packages are present on your Ubuntu system. Open a terminal within the VM and run the following command to update your package list and install the tools:
sudo apt update
sudo apt install open-vm-tools open-vm-tools-desktop
The open-vm-tools-desktop component is particularly important because it provides the graphical integration features, such as clipboard sharing and synchronized display resolution. Without it, basic file operations via the VMware interface may be restricted. After installation, restart the virtual machine to ensure all services initialize correctly with the new kernel modules.
Check Shared Folder Configuration
One of the most common reasons for copy failures is misconfigured shared folders. VMware allows you to map directories from the Windows host directly into the Ubuntu filesystem. If this feature is enabled but not functioning, attempts to drag and drop files often result in permission denied or unknown error messages. Navigate to the VM settings in the VMware Workstation interface. Select Options > Shared Folders. Ensure that Always enabled is selected. Under Shared folders, verify that at least one directory from your Windows 11 machine is listed. Note the path shown in the Host Path column; this is the source location on your Windows PC. If the folder is already listed but not working, try removing it and re-adding it. This forces VMware to regenerate the mount points and refresh the permissions associated with the shared directory. It is crucial that the user account you are logged into with in Ubuntu has read and write access to this mounted directory.Manually Mount the Shared Directory
Sometimes, the automatic mounting process fails due to timing issues during boot or conflicts with other services. You can manually mount the shared folder to diagnose the issue and force a successful connection. The shared folders are typically mounted under/mnt/hgfs/.
Check if the directory exists by running:
ls -l /mnt/hgfs/
If the directory is empty despite being configured in VMware settings, you need to trigger the mount service manually. Run the following command to start the shared folder service:
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
This command uses vmhgfs-fuse to connect the host share to the local mount point. The -o allow_other flag ensures that non-root users can access the files. If this command succeeds, you should see your shared folder appear in /mnt/hgfs/. You can now copy files from this location to your desired destination within the Ubuntu VM.
For persistent fixes, ensure that the open-vm-tools service is enabled to start at boot. You can do this by running:
sudo systemctl enable --now vmware-usbarbitrator.service
sudo systemctl enable --now open-vm-tools.service
This guarantees that the infrastructure required for file transfers is available immediately after login.
Alternative Transfer Methods
If shared folders continue to present issues, consider alternative methods for transferring files. Using SCP (Secure Copy Protocol) over SSH is a robust and reliable way to move files between Windows and Linux. On the Ubuntu VM, ensure the SSH server is installed and running:sudo apt install openssh-server
sudo systemctl enable --now ssh
Once SSH is active, you can use an SCP client on Windows, such as WinSCP or the built-in PowerShell scp command, to upload files directly. This method bypasses the VMware-specific file system drivers entirely, relying instead on standard network protocols which are often more stable in virtualized environments. Another option is using a temporary USB drive attached to the VM, which acts as a physical bridge for large files that might overwhelm network or shared folder buffers.
Related articles:
Getting shared folders to work on a VM with open-vm-tools
WSL and VM: Unable to Connect WSL2 Ubuntu to VMware VM
Frequently Asked Questions
Why do I get permission denied when accessing /mnt/hgfs?
This usually happens because the default mount permissions restrict access to the root user only. You must use the -o allow_other flag when manually mounting with vmhgfs-fuse to grant access to regular users.
Does disabling shared folders fix the copy error?
No, disabling them removes the primary mechanism for host-guest file transfer. Instead, you should verify that they are enabled in VM settings and that the underlying open-vm-tools service is running correctly.
Can I use drag-and-drop if shared folders fail?
Drag-and-drop relies heavily on the same clipboard and input drivers managed by open-vm-tools-desktop. If shared folders are broken, drag-and-drop is likely to fail as well due to the same underlying driver issues.
Is it safe to uninstall and reinstall open-vm-tools?
Yes, it is generally safe. However, ensure you have another way to transfer files, such as SSH or a USB drive, before removing the package, as you will lose shared folder functionality temporarily.
What is the difference between open-vm-tools and VMware Tools?
open-vm-tools is the open-source implementation recommended by VMware for Linux guests. The proprietary "VMware Tools" package is legacy and rarely needed for Ubuntu 22.04, as the open-source version provides equivalent or better performance.