Live data from Hacker News

VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

github.com

41–50 of 65 posts

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#41

Does Rosetta still work in the virtualized MacOS when using Apple’s virtualization framework?

Works in Linux VMs too. (on Ventura)

Details about that: https://developer.apple.com/documentation/virtualization/run...

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#42
post #2

Is virtualizing aarch64 macos via qemu on aarch64 Linux within the realm of possibility? I know it can be done for x86-64, but would be pretty cool if an aarch64 kvm hackintosh would be possible. I have an Nvidia Jetson AGX and honeycomb lx2 which in theory could be up to the task.

[deleted]

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#43
post #40
post #3

Earlier quoted context omitted.

There are additional instructions only available on Apple chips beyond the aarch64 standard, so I don't think that this could be done in hardware (someone correct me if I'm wrong because this isn't my area) Of course it's possible in software in principle but obviously that would be awful.

Those aren't an issue really. macOS VMs eschew most apple extensions anyway (no AMX there for example). The big roadblock that we've hit is that arm64 macOS has no software rasteriser for rendering the GUI. The result is that unless you implement Metal and the paravirtualised GPU infrastructure, you're stuck in console mode.

> The big roadblock that we've hit is that arm64 macOS has no software rasteriser for rendering the GUI. The result is that unless you implement Metal and the paravirtualised GPU infrastructure, you're stuck in console mode.

And this has been just as much of an issue for virtualizing x86 macOS… although it does have a software rasterizer, it's almost unusably slow. The only way you're going to get decent performance with that is with passthrough of a GPU that macOS has drivers for (which for modern GPUs, means some Radeon 500 series, Radeon 5000/6000 series, or Intel iGPU up through Coffee Lake).

Since the early 2000s, real Macs have practically never been configured in such a way that there's no usable GPU, and so the software rasterizer never got any attention since it's an absolute-last-resort fallback. With ARM Macs, all models have some form of usable GPU available (presumably, even the forthcoming M-series cheesegrater tower will have a few GPU cores in its SoC) and they don't care to support virtualization on anything but macOS so they dropped the rasterizer entirely.

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#44
post #25
post #3

Earlier quoted context omitted.

There are additional instructions only available on Apple chips beyond the aarch64 standard, so I don't think that this could be done in hardware (someone correct me if I'm wrong because this isn't my area) Of course it's possible in software in principle but obviously that would be awful.

Apple has their own custom conventions and ABI ( https://developer.apple.com/documentation/xcode/writing-arm6... ). I believe you are right that they have their own custom instructions too. The asahi Linux project has good documentation on their wiki about the hardware. Also important here is the bespoke ASIC functionality on their CPUs - as it's a system on chip, you'll likely need to emulate the full SoC, including…

ABI, which calling conventions are one part of, only affects how different pieces of code within the operating system talk to each other. It’s not uncommon to customize it - for instance, Windows does too. [1] Having a custom ABI does not present any obstacle to emulation.

The rest of what you said is right, though.

[1] https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi...

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#46
post #33
post #30

Earlier quoted context omitted.

AFAIK it's been possible for a while. I ran it on my first gen Ryzen 1700X and I've seen multiple threadripper builds

Oddly enough, I was a ThreadRipper early adopter and for me macOS was more stable than everything else. I dual booted macOS and Slackware current on it from 2017 until early this year. That machine is retired now.

It's a bit peculiar but yeah, if you find a hardware combination that macOS "likes", it can be surprisingly solid. Back in the early 2010s I had one laptop that no version of Windows or Linux distribution particularly liked, but ran great with hackintoshed 10.6-10.9.

The only way to make it usable in other operating systems was to disable GPU power management under Windows, which turned it into an oven, or to run Nouveau drivers under Linux which had serious performance problems, graphical artifacting, etc. The Nvidia drivers bundled with macOS had no such problems, running it at full performance with proper power management and no lockups.

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#48

Earlier quoted context omitted.

Reportedly M2 supports nested virtualization though.

But why would you ever want to?

It’s helpful when spinning up labs, or testing infrastructure deployments

Re: VirtualBuddy: Virtualize macOS 12 and later on Apple Silicon

#50

Anyone using Parallels to virtualize MacOS on M1 Macs?

Yes, I use macOS as development VM on a maxed out 16 inch M1 MacBook Pro. It all works as expected, except you don’t have any VM settings (e.g. how much ram / cpu you want to give the VM) and Docker doesn’t run inside the VM.

You can change some of the settings by editing an ini file.

https://kb.parallels.com/en/128842

Post reply on HN