Score:0

How can I access the host OS when using Ubuntu 22.04 or 22.10 with VM Tools Installed?

ie flag

When I install Ubuntu 22.04 or 22.10 on the Mac (using VM Fusion 13), it automatically installs open vm tools. That's fine, good there is no longer a separate Install VM Tools step.

However, no matter what I've tried, I cannot access the host OS (the Mac drive I use for sharing, for example, I set up in VM Fusion). VM Fusion's shared access says the shared folder won't be available until VM Tools is installed and running. Yet open vm tools are reported as installed and running. vm tools desktop is also installed and running, but no apparent way to access it, either.

Also, there is no option in VM Fusion to "install" VM Tools. Well, there is a "Re-install VM Tools", but it's grayed out.

There is nothing installed in Ubuntu's /mnt folder.

Looking in the Ubuntu File app's "Other Locations" only shows me the local Ubuntu disk and "Windows Network". Clicking on Windows Network gives me an error that there is nothing available there.

Since I have VM Fusion set up with Windows 10 with no issues accessing VM Fusion shared folders on the Host OS, I believe the Mac's (OS 13.2) permissions are not the issue.

But what is the issue? How do I get to the host OS folder I shared. VM Fusion says VM Tools are not running (well really that the VM Fusion shared folder won't be available until VM Tools are running).

No matter what I've tried, I simply cannot see the host's shared folder with Ubuntu. Although vm tools is installed and "running", it doesn't seem to be giving me any access.

This is now a five-day problem. I just need to get a large file from the host OS onto Ubuntu for testing.

Artur Meinild avatar
vn flag
Couldn't you use an application like WinSCP (but for MacOS) to transfer files to the Ubuntu OS via SSH/SCP?
Morkafur avatar
ie flag
Thank you for that idea, but my goal is to be able to share files between host and VM like I was able to do with Ubuntu in the past.
Elder Geek avatar
cn flag
Welcome to askubuntu! "Since I have VM Fusion set up with Windows 10 with no issues accessing VM Fusion shared folders on the Host OS, I believe the Mac's (OS 13.2) permissions are not the issue." This assumes facts not in evidence. How is access handled when sharing the resource with the windows system? are the user credentials identical on the Ubuntu system? My best advice currently is for you to re-examine your assumptions and verify each and every one of them is correct and verifiable.
Morkafur avatar
ie flag
I've spent days examining everything possible. I was only mentioning Windows as a separate example. if you have any helpful suggestions or you can explain how I can see my shared host drive set up in VM Fusion, please post those...
Score:0
ie flag

Here is what I finally found that worked: https://gist.github.com/darrenpmeyer/b69242a45197901f17bfe06e78f4dee3

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

(Make sure /mnt/hgfs exists and is empty)

You can put configuration stanzas in /etc/fstab to facilitate this, and then mount /mnt/hgfs will work.

See the Setting up auto-mounting section for setting up auto-mounting instead.

Pre-work

Make sure open-vm-tools (and open-vm-tools-desktop if you're using a desktop environment) are installed, and that you've rebooted after their installation.

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

Make sure you have a /mnt/hgfs directory made and empty. If not:

sudo mkdir -p /mnt/hgfs

Mounting

To mount the filesystem, run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

The shared folders will now be in subdirectories of /mnt/hgfs

Setting up auto-mounting

Add the following line to /etc/fstab:

.host:/   /mnt/hgfs   fuse.vmhgfs-fuse    auto,allow_other    0   0

Update: based on extensive testing, the auto keyword seems to work fine. Prior versions suggested noauto. If you have trouble with auto, change to noauto and see below

If using the noauto keyword, but you want automount

  1. Create or edit the script /etc/rc.local (as root), and add the line:

    mount /mnt/hgfs
    
  2. make sure rc.local is executable and owned by root:

    sudo chown root:root /etc/rc.local
    sudo chmod 0755 /etc/rc.local
    
  3. enable the rc.local service in systemd:

    sudo systemctl enable rc-local.service
    
  4. reboot

The rc.local script runs as the last step of startup, allowing the HGFS filesystem to mount after open-vm-tools services are running, which is required for successful operation.

Browse /mnt/hgfs at will.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.