This guide provides a complete solution to set up an Ubuntu 24.04 ARM64 VM on Apple Silicon (M4/M3/M2/M1) that ensures the shared folder works reliably with full read/write permissions and path consistency.
| Component | Version/Detail |
|---|---|
| Host OS | macOS Sonoma (or newer) |
| Host Chip | Apple M-series (M4, M3, M2, M1) |
| UTM Version | 4.7.4+ |
| Guest OS | Ubuntu 24.04 LTS Desktop (ARM64) |
| Key Tech | Apple Virtualization, VirtioFS |
Note on ISO: Since Ubuntu 24.04 LTS ARM64 Desktop is not an official download, use the daily build page to download the 64-bit ARM (ARMv8/AArch64) desktop image:
https://cdimage.ubuntu.com/noble/daily-live/current/
- UTM Setup: Create the VM using the Virtualize option for Linux.
- I selected
Enable hardware OpenGL accelerationandApple Virtualizationduring setup. If you run into problems, disable them. - Use the default
Shared Networkoption (networking work out-of-box in my case). - Configure your hardware (RAM, CPU, Storage).
- Host Shared Folder: Create the target folder on your macOS Host inside your home directory. This will be the location you use for all your shared projects.
mkdir ~/ubuntu-share
- UTM Settings: In the UTM VM settings, configure the shared directory to point to the
~/ubuntu-sharefolder you just created.
To eliminate read/write issues caused by mismatched user IDs (UIDs) and Group IDs (GIDs) between macOS and Linux, we will modify the Linux user's UID and GID to match the macOS host's primary user. The official guide also works, but I found that I need to provide permission in both VM and macOS everytime when trying to edit shared files. My hack resolves this headache.
- Get Host UID/GID: Run
idon your macOS host to find your user's primary identifiers:
$ id
# You will get something like: uid=501(your_username) gid=20(staff) groups=20(staff),...
# HOST UID = 501
# HOST GID = 20
- Create Temp Admin User in VM: Due to active processes, you cannot modify your primary user's ID while logged in. Create a temporary administrator account in the Ubuntu VM:
# Create new user 'tempadmin'
sudo adduser tempadmin
# Give 'tempadmin' sudo privileges
sudo usermod -aG sudo tempadmin
- Perform UID/GID Modification:
- Log out of your primary Ubuntu account and log in as
tempadmin. - Open the terminal and run the following commands, replacing
your_primary_userwith your actual username (the one you want to change).
# --- ENTER THE CHROOT ENVIRONMENT ---
sudo -i
# 1. Add the group 'staff' with GID 20 (if it doesn't exist)
groupadd -g 20 staff 2>/dev/null
# 2. Change the primary group of your user to 'staff' (GID 20)
usermod -g staff your_primary_user
# 3. Change the User ID (UID) of your user to 501
usermod -u 501 your_primary_user
# 4. FIX FILE OWNERSHIP (CRITICAL)
# Find all files with the old UID (1000) and change ownership to the new UID (501)
find / -uid 1000 -exec chown your_primary_user {} \;
# --- EXIT ROOT SHELL ---
exit
The UID/GID fix allows editing, but a common bug in Ubuntu 24.04 prevents the GUI from reading the root of the VirtioFS mount. The symlink workaround bypasses this. (utmapp/UTM#7310)
- Create Mount Point (Ubuntu Guest): This is the dedicated, empty directory where the host's shared folder will be mounted.
sudo mkdir /mnt/utm
- Update
/etc/fstab: Edit the fstab file to automatically mount the share on boot.
sudo nano /etc/fstab
Add the following line.
share /mnt/utm virtiofs rw,nofail 0 0
- Apply Mount & Create Symlink (Ubuntu Guest):
- Reload the mount to apply changes:
sudo mount -a
- Create the symlink in your home folder. This bypasses the GUI bug by linking to the working mount point
/mnt/utm.
ln -s /mnt/utm/ubuntu-share ~/ubuntu-share
- Final Step: Reboot the VM.
sudo reboot
Both your macOS host and your Ubuntu VM can now access the shared directory using the functional, path-consistent location ~/ubuntu-share, and all files will have correct read/write permissions.