UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Apple Rosetta emulation for QEMU backend

Open freebrowser1 opened this issue 1 year ago • 6 comments

Describe the issue
Not an issue, but a question. After trying to convert an existing VM (Ubuntu x86-64 emulated on M1) I could not find the option 'Rosetta emulation' in the settings of the VM.

Configuration

  • UTM Version: 4.4.5
  • macOS Version: 14.5
  • Mac Chip: M1

Upload VM
config.plist.zip

freebrowser1 avatar Jul 07 '24 19:07 freebrowser1

Rosetta x86_64 emulation only works for ARM64 Virtual Machines using Apple Virtualization. You can't use Rosetta with x86_64 VMs.

UrkiMimi avatar Jul 13 '24 05:07 UrkiMimi

Yes you can, if you use Qemu you may launch qemu-aarch-x86_64 in rosetta mode first changing environment in terminal env /usr/bin/arch -x86_64 /opt/local/bin/zsh --login so same behaviour should be available on UTM.

Behinder avatar Jul 13 '24 14:07 Behinder

Rosetta x86_64 emulation only works for ARM64 Virtual Machines using Apple Virtualization. You can't use Rosetta with x86_64 VMs.

No, that is not how it works. Rosetta is meant to run x86-64 apps on ARM architecture and Apple now supports even Linux VMs on an ARM powered Mac. This documentation : https://docs.getutm.app/advanced/rosetta/ tells about this, but what I don't know and want to know is how to convert an existing VM to Rosetta.

freebrowser1 avatar Jul 13 '24 14:07 freebrowser1

In macOS 15, hypervisor.framework should support this but we'll have to add it to QEMU

osy avatar Aug 21 '24 15:08 osy

In macOS 15, hypervisor.framework should support this but we'll have to add it to QEMU

What does that mean ? That UTM should be updated to a new, yet to release, version when I update my Mac to Sequoia ?

freebrowser1 avatar Aug 22 '24 16:08 freebrowser1

Yeah it'll need to be added to QEMU first and then UTM. So probably in the next release.

osy avatar Aug 22 '24 17:08 osy

Completed in 164e3126d28f0d04d482bf808ef999346918fe8a

osy avatar Oct 04 '24 16:10 osy

TSO it's there but "the option 'Rosetta emulation' in the QEMU settings of the VM" isn't yet there, right?

oscarbg avatar Nov 25 '24 19:11 oscarbg

First of all TSO is currently broken pending fix for #6836 (next update). Second, Rosetta is proprietary licensed technology from Apple and you're not allowed to run it from QEMU so we provide no support for doing this. Third party emulators like FEX can also take advantage of TSO mode.

osy avatar Nov 25 '24 22:11 osy

@osy many thanks for detailing all current state.. nice bit of info about FEX TSO support!, didn't know about.. are others "translators" like Box64 also TSO aware? (let's do some FEX with TSO on/off tests once released the fix!!)

really, please understand I'm a new user of UTM, so still learning the status quo of everything.. even testing a trial of Parallels to learn propietary solutions status quo..

I think, UTM should have a table listing basically for every OS, the supported emu backend( QEMU, Apple Virt), and for every emu backend, it's support for nested virtualization, Rosetta guests (either the "native" in Macos guests, and Rosetta for Linux in Linux guests), TSO support, OpenGL support HW or software and max GL version supported .. may open an issue asking for that table? would be useful so users (like me :-)) can stop asking.. an even in that that cell's table put footnotes showing which version of UTM started supporting this combination of OS/emu backend/feature.. like for ex. TSO Linux/QEMU/ in 4.6.1..

oscarbg avatar Nov 26 '24 06:11 oscarbg

Such a table would get out of date real quick as development in the community are happening week by week.

osy avatar Nov 26 '24 06:11 osy

yep.. seems fast.. and really no problem for me.. now that more or less I'm up to date to with UTM..

oscarbg avatar Nov 26 '24 06:11 oscarbg