A brief survey of virtualization on Apple Silicon M3 / Sonoma in 2024

As a Christian, I’m called to be a good steward of what I’ve been given. So while I prefer to post woodworking stuff here, I also do a lot of technology for a living, and as it was time, I recently got a shiny M3 Mac.

I’d like to boot my Ubuntu Desktop 22.04.3 LTS ISO and use it to install Ubuntu, x86-64, cross compile some legacy i386 (32-bit) software that’s not yet expensive enough to rewrite and SSH to other machines from there.

I’d generally go for something FOSS where possible because I like being able to build and debug things for myself, so I can really understand them and tend to have fewer surprises, both for myself and the people I may be called to lead.

That rules out Parallels and I think VMware Workstation, though they’re probably great options too. I also don’t like the absence of a perpetual fallback license in the event I stop educating myself or developing and just want it to work forever, as long as the older machine is still bootable. So call those Options 1 and 2, likely out.

I’ve also used Option 3, Oracle (for better or worse) VirtualBox (GPLv2 for everything that I needed, I’ve evaluated the extension pack though it never quite worked for me anyway) in the past. But the state of Apple Silicon M1, M2 and M3 is extremely unstable so I didn’t try, though it may be worth revisiting.

Option 4 was using brew.sh to install QEMU and virt-manager which I’ve also used in the past, and have found it great for running x86-64 virtualized workloads. I don’t quite understand enough about for example qemu system vs session yet. So unfortunately while there’s a workaround to virt-manager crashing immediately, I decided not to proceed for now:

virt-manager --no-fork

Option 5 was to have a look at this Andrew Cunningham article and try VirtualBuddy. I could download and install it on macOS 14 Sonoma and it has a really slick interface, but similarly, some analogue of crash occurred, this time after choosing Linux and attempting to start a VM, and with no logs or debugging message visible, that’s a dead end for now.

Option 6 again via Andrew Cunningham is UTM. My first run through I forgot to eject the disk ISO when prompted after the installer completed, so UTM went straight back to booting from that ISO, i.e. I was back at Try or Install Ubuntu. I let myself get a bit frustrated as the UTM start screen doesn’t show while a VM is running, and tried some other things briefly, but ended up reopening UTM, deleting this VM from the directory of ~/Library/Containers/UTM/Data/Documents found using the secondary/right click menu option to Show in Finder, and rerunning the install again.1

I definitely liked that it warned me Emulation mode, compared to virtualisation, will be slow, and it definitely feels sluggish compared to running bare metal Ubuntu on an Infinity O5 for work. But so did VirtualBox, before I found the 3D acceleration checkbox. As a new tool for me it’ll likely take some time to unlock the potential.

One nice thing – UTM is QEMU under the hood. Using macOS Activity Monitor and taking a sample of QEMULauncher I could see the UTM app is using QEMU, which is definitely heading in a good direction.

/Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher

I’m not sure yet how to make it aware of multiple physical cores.

For networking, I was able to configure UTM as Bridged (Advanced) and then in Ubuntu as link-local, which let me ping and SSH to a “remote” host plugged in via Ethernet cable.

Thus, touch wood, I’m in a good enough starting place now to know it’ll work, should I ever need just this Apple Silicon machine rather than an older Intel-based one. Though it needs a lot of work, multicore seems like the biggest “easy” win, to be competitive with Intel-based machines for this kind of workload.

Aside: UTM on GitHub supports iOS too, so that could be something worth playing with, should all my other machines kick the bucket – I doubt I’ll ever be short enough of things to try to do so, but who knows?

Another aside:

  1. “It’s sort of shocking how many people uninstall and then reinstall their software when things start behaving wrong, because at least they know how to do that. (They’ve learned to uninstall first, because otherwise all the broken customizations are likely to just come back).” – Joel Spolsky, Choices ↩︎

Leave a comment