-
Notifications
You must be signed in to change notification settings - Fork 608
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
Use Rosetta2 as a binfmt_misc handler on macOS Ventura #1088
Comments
This needs implementing Virtualization.framework support (#889) right? Or is it technically and legally possible to run Rosetta2 inside QEMU? |
I don't know; it depends on if we can get VirtioFS support without it. Or if it will be possible to somehow bridge between the VirtioFS volume and qemu in some other way. I suspect not, as event notification will be a challenge, but it doesn't hurt to try... I suspect that the binfmt_misc handler is just copying stuff to the Rosetta volume; Rosetta will perform the translation on the host and put the results back into the volume, so binfmt_misc can execute it from there.
I didn't think about it, but we would not distribute the software; it would come directly from Apple. So how would calling this from inside qemu be any different from running any other part of the OS from inside any kind of application. Since we don't link it to qemu, but just call it from a kernel hook, I don't see any problems there either. |
Just a side note, Rosetta works great in UTM, when I launch VMs using Virtualization.framework. I think theoretically, Rosetta should work in QEMU, but it's intended to be used with Virtualization.framework. The Rosetta binary is provided in a VirtioFS volume. |
I just learned that on macOS Ventura you can register Rosetta2 as a binfmt_misc handler inside a VM running in arm64 mode. That should mean that instead of using qemu-static emulation we should be able to run amd64 containers "compiled" into arm64, which should provide a big speed boost for code that is not available natively for arm64 (like mssql):
https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta
Originally posted by @jandubois in #889 (comment)
The text was updated successfully, but these errors were encountered: