Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using UTM's build of QEMU (for stability, GPU acceleration, sudo-less vmnet) #3033

Open
AkihiroSuda opened this issue Dec 18, 2024 · 5 comments
Labels

Comments

@AkihiroSuda
Copy link
Member

UTM's build of QEMU seems more stable and also supports GPU acceleration:

Not sure how to launch it though

$ file /Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu 
/Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
/Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
/Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu (for architecture arm64):	Mach-O 64-bit dynamically linked shared library arm64

$ /Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher /Applications/UTM.app/Contents/Frameworks/qemu-x86_64-softmmu.framework/Versions/A/qemu-x86_64-softmmu 
Trace/BPT trap: 5

An alternative way is to push UTM's patches to Homebrew, but not sure whether Homebrew maintainers will like it.

@AkihiroSuda AkihiroSuda added help wanted Extra attention is needed component/qemu QEMU labels Dec 18, 2024
@AkihiroSuda
Copy link
Member Author

Looks like sudo-less vmnet can be enabled too when UTM.app is signed
utmapp/UTM@4a22d43

@AkihiroSuda AkihiroSuda changed the title Support using UTM's build of QEMU for stability and GPU acceleration Support using UTM's build of QEMU (for stability, GPU acceleration, sudo-less vmnet) Dec 18, 2024
@balajiv113
Copy link
Member

UTM.app is signed

Exactly, If the app have the network entitlement them we don't need sudo for vmnet.

@jandubois
Copy link
Member

Exactly, If the app have the network entitlement them we don't need sudo for vmnet.

What entitlements would allow this? I thought it would require com.apple.vm.networking, which is only available upon request to developers of virtualization software that is distributed through the app store (so has no access to run anything as root).

It was my understanding that it is impossible to get this entitlement if you want to distribute outside the app store; you are supposed to run as root instead.

I guess UTM is distributed through the app store, and they may have been given the entitlement by Apple.

I'm pretty sure we would need to be a GUI app to distribute Lima through the app store, and even then I wonder if we could get the entitlement as an open source project.

@AkihiroSuda
Copy link
Member Author

The free version (brew install utm) seems to have the entitlement too.
ps -ef shows -netdev vmnet-bridged,id=net0,ifname=en0

@norio-nomura
Copy link
Contributor

You can check the entitlements for each application using the following commands:

qlmanage -p "/Applications/UTM.app/Contents/embedded.provisionprofile"
スクリーンショット 2024-12-18 19 25 00

It seems that VMware Fusion, which is distributed outside the App Store, also has the com.apple.vm.networking entitlement:

qlmanage -p "/Applications/VMware Fusion.app/Contents/embedded.provisionprofile"
スクリーンショット 2024-12-18 19 28 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants