Skip to content

vm(apple): support USB passthrough on macOS 27 - #7789

Open
shanginn wants to merge 1 commit into
utmapp:mainfrom
shanginn:feature/avf-usb-passthrough-public
Open

vm(apple): support USB passthrough on macOS 27#7789
shanginn wants to merge 1 commit into
utmapp:mainfrom
shanginn:feature/avf-usb-passthrough-public

Conversation

@shanginn

Copy link
Copy Markdown

Summary

  • Add USB passthrough for Apple Virtualization macOS guests on macOS 27 using Accessory Access and the public Virtualization USB APIs.
  • Add USB discovery, connection, and disconnection controls to the Apple VM display menu.
  • Preserve connected-device intent across VM starts and safely detach and restore devices around pause, saved-state, resume, and restart operations.
  • Serialize hot-plug and VM lifecycle operations and release device ownership when the VM stops.
  • Add the Claim USB Accessory capability to provisioned macOS builds while keeping ordinary unsigned packages launchable.

Resolves #3778

Signing

USB passthrough requires a provisioning profile containing the com.apple.developer.accessory-access.usb entitlement.

The entitlement is intentionally excluded from macOS-unsigned.entitlements, because macOS rejects an ad-hoc signature containing this restricted entitlement on normally protected systems.

I dont have a developer account so I cant make a proper build of that. And it was tested with SIP disabled

Testing

Tested on a MacBook Pro (Mac14,6, Apple M2 Max) running macOS 27.0 beta 4 (26A5388g), using a macOS 10.15.7 Apple Virtualization guest and an ASolid USB_0114 mass-storage device (VID:PID 24a9:205a). Confirmed assigning the device to UTM, connecting it to the guest, and using USB sharing successfully.

Built an arm64 Release archive with Xcode 27 beta 4 (27A5228h) and the macOS 27 SDK. The beta toolchain required a command-line-only macOS 12.0 deployment-target override; this change does not modify UTM’s deployment target.

image Screenshot 2026-07-22 at 20 19 12

AI assistance

I have read the AI contribution guidelines and have followed them to the best of my ability.

This implementation was developed with assistance from GPT-5.6 sol. Although I'm not a swift developer I reviewed the resulting code. The tests were done tested manually, but not extensivly.

Use Accessory Access and the public Virtualization USB passthrough APIs to attach host USB devices to Apple Virtualization macOS guests. Preserve device intent across VM lifecycle transitions and serialize hot-plug operations around pause, snapshot, restart, and stop.

Refs utmapp#3778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add USB sharing option to macOS guest (from macOS host)

1 participant