UTM
UTM copied to clipboard
Add USB sharing option to macOS guest (from macOS host)
With an e.g. Windows guest UTM offers sharing settings including for USB devices:
![Screen Shot 2022-03-14 at 3 26 33 PM](https://user-images.githubusercontent.com/265902/158271431-7150dc3e-6856-4795-ae63-c034acc41ca8.png)
But no such settings are available for a macOS guest:
![Screen Shot 2022-03-14 at 3 26 05 PM](https://user-images.githubusercontent.com/265902/158271442-2f1be0a5-e48c-4fc6-ac2b-df196a5011a6.png)
Can USB devices be shared with the new Virtualization framework? [Update: fwiw, I'm sure not seeing anything related to USB passthrough in Apple's https://developer.apple.com/documentation/virtualization overview documentation… ☹️ ]
(Sorry if this is a duplicate, I could not find one. This is in a somewhat similar vein as https://github.com/utmapp/UTM/issues/3567 — the new Virtualization.framework is still missing some features compared to the QEMU settings. File sharing is another such but I'm focusing this request on USB specifically since there's userspace options for transferring files, but not really any good workaround for passing through a USB device.)
Hello,
I asked this question on Twitter few weeks ago : https://twitter.com/Valkhes/status/1481192075672629253?s=20&t=ZCdAmzI9b3KW1p2CD2rE0g
This is the feature I'm also missing to be able to use macOS VM, but it seems that it is not currently supported by Apple in Virtualization.framework . Right now, it seems that no options are available at all, I also tried other apps like Parallels for example, and they are not supporting it too. Even USB over IP solutions right now can't use a mac M1 as a guest to receive an USB device, which would have been a great workaround for me.
This looks to be for the moment a dead end until Apple can support it.
It is indeed dependent on Apple support. We have to wait until WWDC to see what's next for Virtualization.framework.
Is there news/work-around on this?
These look like they're relevant:
Entitlement for Virtualization Guest USB access
Apple docs aren't exactly self explanatory but it seems like these would be used to open a connection to an interface or specific device and then you could use something like SPICE's usbredir for the VM end.
(https://developer.apple.com/documentation/iousbhost/iousbhostobject) (https://developer.apple.com/documentation/iousbhost/iousbhostdevice) (https://developer.apple.com/documentation/iousbhost/iousbhostinterface)
Further investigation seems as though this may only work for Hypervisor.Framework.
Yeah we use them in QEMU. This issue is about Apple Virtualization.
With Sonoma we can share a block device with guest, is this feature helpful?
Hi, I'm just a bit curious. I tried Parallels Desktop, they have a 'Rosetta' switch in vm settings, and even when I enable it, I can still share my usb device into the vm. So do you think Apple Hypervisor has the ability to share USB, or Parallels achieve this in some tricky way?
Hi, I'm just a bit curious. I tried Parallels Desktop, they have a 'Rosetta' switch in vm settings, and even when I enable it, I can still share my usb device into the vm. So do you think Apple Hypervisor has the ability to share USB, or Parallels achieve this in some tricky way?
After some research, I think the Rosetta does not really need the Apple Hypervisor to run, its kind of apple's limitation. There is a repo that patch previous version of rosetta and let it run on any arm64 linux. https://github.com/CathyKMeow/rosetta-linux-asahi I tried it on a vm manage by qemu, and it works.
So maybe parallels did not actually use the Apple Hypervisor as backend.
I tried Parallels Desktop, they have a 'Rosetta' switch in vm settings, and even when I enable it, I can still share my usb device into the vm.
I believe you're referencing Linux guest, since PD does not support USB passthrough in mac guest either.