Apple Silicon and Virtual Machines: Beating the 2 VM Limit (2023) (khronokernel.com)

by krackers 177 comments 236 points
Read article View on HN

177 comments

[−] kylec 34d ago
This is a very silly restriction, at least to apply uniformly to all Macs. I think if you buy a more powerful Mac they should let you virtualize more Mac instances. Like an M5 maybe limit to 2, but maybe let an M5 Pro do 4 and an M5 Max do 8 or something.
[−] benoau 34d ago
Why should they impose a limit at all? Your hardware is a natural limit, you'll stop of your own accord when you reach its thresholds.
[−] lxgr 33d ago
Because this limit isn’t about your hardware, but their software.

As appropriate a model this still is in the development VM scenario, you still need a valid license for each operating system copy you run.

Microsoft will sell you these individually; Apple apparently implicitly grants you up to three per Mac that you buy, and won’t let you pay for any more even if you want to.

In other words, what’s limited here is not really the hypervisor itself, but rather the “license granting component” that passes through the implicit permission to run macOS, but only up to some limit.

[−] matheusmoreira 33d ago
Rent seeking, of course. They want to charge you for every physical and logical machine you use. Virtualization gets around that.

They'd probably charge separately for every feature of the processor if they could.

[−] JoshTriplett 33d ago
That would make more sense except they don't even have an option to pay for it.
[−] jonnrb 33d ago
Yes they do. It's called "another Mac". And I'm not even being snarky here: I legitimately think someone at Apple thought this through and said "yeah if they need more than 2 VMs running at the same time, there are probably multiple users and they can each get their own Mac".
[−] stingraycharles 33d ago
Nah, Apple has been extremely restrictive about virtual machines in all kinds of ways, e.g. the minimum terms anyone is able to lease out a VM or Mac to someone else is 24h, making cloud-like workloads practically impossible. For some reason, Apple really doesn’t like virtual machines, and it’s much more intentional than just “probably multiple users”.

It’s extremely frustrating.

[−] monocasa 33d ago
I mean, as someone who was in that situation as a customer, we couldn't find a great cloud option for our needs, and we ended up building our first hardware lab with a bunch of macs.

It definitely caused us to buy macs we would have rented and shared.

[−] stingraycharles 33d ago
Correct, us as well, but we’re mainly harvesting refurbished Mac Mini’s.

My biggest problem is the lack of a good CI/CD flow when you can’t work with images and virtual machines. We’re using ansible now to manage the fleet and I’m not a fan.

If they would more than 2 VMs, we’d still buy the hardware, we’d just buy larger ones and have more virtual machines on them. Very likely also use Linux as the host.

I hope one day Apple sees the light like Microsoft also did, but I’m not hopeful.

[−] leptons 33d ago
Frustrating for you, hilarious for me. I had no idea they had hobbled MacOS in this way. It doesn't surprise me at all really, and it's pretty ridiculous.

I'm not sure why people keep giving Apple their money, especially tech-savvy people that would want to run VMs.

[−] stephenr 33d ago
I run up to a dozen Linux VMs at once on my Macs.

I've never hit the referenced limit because it isn't a limit on running VMs it's a limit on running macOS, and I hardly ever run macOS VMs.

I'm not sure why people don't use Mac's are so obsessed with telling people who do use Macs that they're wrong, and yet here we are.

[−] musicale 33d ago
The limit is for macOS running in a VM (which is mainly useful for developing iOS and macOS apps, for example cloud-based testing and CI/CD workflows.)

Most developers build web- and server-based systems that use Linux VMs as back-ends.

Most containers used for development are Linux containers, which also run in a Linux VM.

[−] stingraycharles 33d ago
Because we have customers that use macOS and both x86 and apple silicon are build targets of ours.
[−] cowboylowrez 33d ago
yeah I'm glad I paid extra for linux on a used dell, I'd hate to be slumming in some poverty ridden ghetto like mac users with their vm limits
[−] Melatonic 32d ago
If they licensed or built their own microVMs they could offer it as an addon product and solve most of these issues without full macOS instances
[−] VanTheBrand 33d ago
The option is you have to buy another machine. There are mac ec2 instances and several mac cloud hosts that all would abuse this if they could, instead to stay compliant they buy more machines.
[−] leptons 33d ago
I tried to launch a MacOS instance on EC2 recently (on my work account), and was blocked.

So I asked the IT dept and they said it's stupidly expensive to run a MacOS instance on EC2, and that they would just send me a Macbook Pro instead.

I wish I were kidding.

[−] benoau 33d ago
(where "abuse" means using the hardware to run software)
[−] wqaatwt 33d ago
Well yeah and Apple wouldn’t be able to abuse its pseudo-monopolistic market position. That would be so sad…
[−] JoshTriplett 33d ago
And thus they need a massive datacenter full of systems, rather than a pile of paid licenses.

And macOS remains a toy for use only by individuals that is a massive pain for developers to support.

[−] naikrovek 34d ago
They are likely scared of people who would run MacOS virtual desktop farms, without also buying an appropriate number of Apple machines.

That’s what I would be worried about if my primary source of income was hardware sales.

[−] colechristensen 33d ago
Market design.

They don't want to be in the server business, they don't want there to be third party VM providers running Mac farms selling oversubscribed giving underpowered disappointing VM experiences to users who will complain.

A bunch of folks want Apple to enter a market Apple doesn't want to enter into. They have tools available which would enable that market which they are kneecapping on purpose so that nobody unwillingly enters them into it. The "two VMs per unit hardware" has been in their license for at least a decade.

[−] isodev 33d ago

> Your hardware

Ah but when you buy an iPhone or a Mac, Apple sees it as their hardware graciously made available to you for a limited time and under ToS.

[−] m463 33d ago

> Why should they impose a limit at all?

Whenever I see apple silliness, I have to remember:

  "You're not the target market."
[−] egorfine 32d ago

> Your hardware

They see it a bit differently.

[−] fsckboy 33d ago

>

Why should they impose a limit at all? Your hardware is a natural limit

because imposing an artificial limit keeps them from exposing how low the natural limits turn out to be? Apple Silicon need always to be spoken with reverence, ye brother of the faith, do not fuel the faithless lest they rend and threadrip that which we've made of wholecloth.

[−] bdcravens 33d ago
The limit isn't really a resource issue, since you can run pretty much an "unlimited" number of non-Mac VMs. I suspect it's more of a business decision, such as preventing people from setting up shop as a low-cost Mac VPS provider.
[−] fortran77 33d ago
I buy a $100 Windows 11 Pro licence, and my limit is 1024 VMs

Hyper‑V on Windows 11 supports up to 1024 simultaneous VMs per host if the hardware can handle it. On my little Windows ARM laptop I can easily run 4 VMs before it runs out of steam.

[−] tomaskafka 33d ago
Remember you’re not battling against a HW limitation, but against Tim Cook’s fear of selling less macs.
[−] namelosw 33d ago
It really is silly. The other day I decided to try this openclaw thing out but concerned about the security stuff, so I took VM for a spin only to find out the iCloud and the App Store were restricted.
[−] whatsupdog 34d ago
[flagged]
[−] dvrp 33d ago
Seems Mykola Grymalyuk started working at Apple 2 years after this blog post. You either die a hero..
[−] czk 34d ago
starting with M3+ you can use Hypervisor.framework/Virtualization.framework to spin up nested VMs.

it would be amusing if that bypassed the limit.

[−] Khalid_nowaf 34d ago
I’m very curious, why did Apple put such a limitation?
[−] rayiner 33d ago
It’s crazy that you can compile a custom kernel and it’ll boot and the GUI will run.
[−] RestartKernel 34d ago
This is a really cool article, but the existence of such an arbitrary limit on any serious development platform is weird.
[−] jadar 33d ago

> When using a custom kernel collection with Apple Silicon, there are some unfortunate downsides. The biggest being that streamlined OS updates are no longer available.

This might be a blessing in disguise.

[−] obilgic 34d ago
Can this work with lume as well? Currently it has a similar limitation.
[−] edude03 34d ago
IIRC you can just turn off sip and set the boot argument that controls it without a custom kernel
[−] mrweasel 33d ago
Apple has a 2 VM limit?
[−] erichocean 33d ago
Another limitation: only five active user accounts (with UIs) per machine.
[−] ab_testing 34d ago
Very funny to see HN hate on Microsoft and Google but then love a company where they cannot even run an app on their mobile platform without Apple's permission or only a certain number of VMs on the hardware they own .
[−] iririririr 33d ago
[dead]