We Rebuilt the Linux MicroVM Stack on Apple Silicon (encore.dev)

134 points by signa11 9 hours ago

omair_inam 4 hours ago

A suggestion to the author -- don't outsource your writing to AI, or, if you do, go over it with a fine-tooth comb and remove every trace of Claudisms from it.

I read the subtitle: "What it takes to boot the same microVMs on Apple's hypervisor, and the one capability Apple will not let you have." and immediately navigated away.

nhod 4 hours ago

Agreed, and then the actual text of the post gets worse. It’s actually unreadable; I literally could not follow what the article was about (without putting in the effort to unravel the Claudisms, a little like unraveling Shakespeare or Finnegan’s Wake) and gave up.

It seems we are all (on HN) thoroughly convinced that the models have all gotten worse at writing as the version numbers have gone up and they are supposedly more powerful models. Sol 5.6 is nowhere near as bad as Opus 5 or even the 4 series but not great.

But looking back there was a time we were enamored with how they wrote. Perhaps it’s related to the newfound prohibitions on “write in this writer’s style”? I wonder if training the models to not be able to do that anymore has steered them towards not being able to write, at all, in any existing human good writing style and they are navigating the small pathway through all existing good human writing to whatever you want to call what they are doing now?

chrisweekly 2 hours ago

> newfound prohibitions on “write in this writer’s style”

that explains a lot. but do you have a decent citation?

mpalmer 4 hours ago

I'm willing to bet it's because model providers have gone all-in on programming and reasoning ability when training new models. It's where the money is, if nothing else, and the writing quality will have suffered as a knock on effect.

luckydata 2 hours ago

gedy 2 hours ago

It was the newness and surprise that the quality was as good as it was, just like images from Stable Diffusion, etc. Now that we are used to it, we notice the uncanny valley speak.

WhyNotHugo 2 hours ago

This kind of AI-generated articles are always weird on details. Hyper-focusing on weird details while missing one higher level ones.

E.g., they use Firecracker, they build and deploy backend applications, but they needed to run the stack on macOS. Why? If you're using Firecracker to run backend applications, isn't Linux the obvious choice?

peter_d_sherman a minute ago

I don't use MacOS.

I don't use MacOS because it is not Open Source.

I don't use Windows.

I used Windows extensively in the past, but I don't use it in 2026, because it is not Open Source.

Anytime you're dealing with a closed source OS, you're dealing with the following things:

1) Extra time/effort/complexity to make your programs work correctly.

2) Extra time/effort/complexity to make your already working working programs keep working through OS version updates, upgrades, patches, etc., etc.

This article (AI written, not AI written, I don't care) describes something that is overly complex (proof that you don't have and/or cannot access the source code of the underlying operating system) and something which could potentially fail when Apple releases its next OS or OS upgrade...

If you switch to an Open Source operating system (and I'm not trying to shill for Linux here -- OpenBSD, etc., any open source Operating System could work too), then most of these problems will disappear -- or at least be reduced rather significantly.

But what I'm most concerned about is the complexity...

Now, you're welcome to engineer whatever additional complexity above Apple's stack -- many companies do this and are more than willing to pay the price in additional time, resources, programmers, tech people handling whatever issues arise, as they arise.

I'm not against Apple -- I think their products have beautiful aesthetics, and every company, every producer of physical products on the planet could take a lesson from their design teams. Their products are absolutely stunningly visually appealing!

But Apple in turn, could take a lesson from Linux and every other open source OS on the planet.

I personally will not develop for any Apple product unless and until Apple open sources their OS'es.

If code that I write coincidentally runs on an Apple product, hey that's a happy coincidence! Yay!

But I never expect it to, and I never expect to keep working across OS versions and upgrades.

If anyone thinks I'm being unfair to Apple, then I'll state for the record that I have the exact same expectations (or negative expectations, as the case may be!) about Microsoft Windows!

Closed source OS'es lead to complexity, work-arounds ("oh no, API call <abc> isn't working the way we thought it would under these conditions -- well, use this work-around and call API <xyz> with this unnecessary and overly complex data structure after making 3 other unnecessary API calls and then you need to do the following additional steps..."), and software breaking over time over OS version upgrades, updates, patches, and the like.

On the one hand, I'm very glad that this article is bringing micro VM's to Apple.

That's a good idea!

(But on the other hand, I have to ask if the complexity is worth it... but I'm not the guy who pays these guys' salaries or the future support guys' salaries, so I can't determine if it is or isn't, if the trade-off is worth it!)

On the positive side though, bringing Micro VM's to Apple is a good idea!

dolmen 7 hours ago

What an awful blog renderer that, in Firefox, works when scrolling with the trackpad, but doesn't work when using keyboard arrow keys or pageUp/down: I get blank pages when scrolling with the keyboard beyond the initial viewport.

fg137 5 hours ago

I never understand why people mess with layout/scroll bar in this way. Like, now you have got more things to maintain.

hibbelig 6 hours ago

Oh yes. I discovered that there are two scrollbars. By clicking somewhere in the blog text, you activate the inner one and then scrolling with the keyboard works.

andout_ 6 hours ago

Sorry about that - just pushed a fix :)

bheadmaster 5 hours ago

Are there any technical reasons to override native scrolling functionality in the first place?

techpression 2 hours ago

bartvk 7 hours ago

I thought it was just me. Super weird.

klausa 6 hours ago

Wow, that's actually an impressive new failure mode; and it happens on Safari too.

delduca 3 hours ago

This article was made for LLMs reading, not for human reading.

chrisweekly an hour ago

I wonder how necessary/useful this is, in light of the amazing smolvm microvms from https://smolmachines.com.

(Not snark, not affiliated, just happy and impressed with smolvm and genuinely curious.)

DomBlack 2 hours ago

I saw this blog post title and wanted to read it, as I thought this is something we really wanted when I worked back at Encore - and lo and behold what website I ended up on!

Great work lads, seeing those old shell scripts brought back memories, but this is awesome to see you've solved the problem now to make your own lives easier!

Any plans to open source crackling? I was looking into cross platform microVM's after reading about sbx recently.

chrisweekly 2 hours ago

see also "smolvm" - the awesome microvms from https://smolmachines.com

bittermandel 7 hours ago

By experience, getting Firecracker to run well on M-series macs is quite the undertaking. I'm not at all surprised Encore decided to take this path considering their customer base!

At Lovable we decided to spend ~1 engineering month getting our sandbox infrastructure to be 100% runnable on Mac and on Linux with predictable builds using Bazel etc.

But we actively decided to take a different route than Encore and run nested virtualization, which on macOS means vfkit -> QEMU -> Kind + Firecracker vm(s). It's been invaluable to get the same development and testing tools on both platforms tbh.

drunkonvinyl 4 hours ago

I’d like to learn more about doing this myself - do you recommend any good guides or posts?

bittermandel 3 hours ago

I should do a write-up! Maybe you'll see it posted here soon. We could basically find nothing online...

srcreigh 4 hours ago

Note M1 and M2 macs don’t have hardware support for nested virt.

kombine 8 hours ago

> most engineers at Encore develop on a Mac

They are solving the wrong problem.

UqWBcuFx6NV4r 7 hours ago

Hacker News is so utterly detached from reality at times, and comments like these really drive that home.

TN1ck 5 hours ago

Thought I was tripping, someone made the same point today in another thread: https://news.ycombinator.com/item?id=49381236

mathisfun123 6 hours ago

Most tech people are utterly detached from reality so that definitely tracks

rob_c 7 hours ago

No, they're realists.

Plus show me an off the shelf solution to MDM that exists in the Linux space? (Not too mention an easy to buy consumer devices which supports suspend/resume correctly in 2026, not even Windows can do that any more)

Apple is crap and evil about many things, but at least here they know their paying audience...

mhast 7 hours ago

One case where Apple can be very useful is if you're traveling a lot for work.

Wherever you are you can probably find a local store that sells and services Macbooks. So if your machine is damaged during a trip you can get it fixed, or buy a replacement on the spot, and at least get through the work you are there to do.

For small-ish companies that can be a very useful feature.

elAhmo 7 hours ago

ErroneousBosh 7 hours ago

MadsRC 7 hours ago

FleetDM comes to mind

asdf88990 7 hours ago

Lots of Lenavo laptops do just fine, but Apple hardware is still supreme for what it is worth.

esseph 6 hours ago

> MDM Linux

Jumpcloud, I've used it across Windows / Mac / Linux end user desktops and laptop fleets.

https://jumpcloud.com/lp/cross-os-device-management-fava-bea...

huerne 8 hours ago

VZ.framework is very limited, Hypervisor.framework is the better analogue to KVM

jdub 7 hours ago

Virtualization.framework isn't particularly limited, for what it is... given they're using Firecracker on Linux, it makes sense to use a similarly high level API on macOS.

(One could add a Hypervisor.framework backend to Firecracker, though I'd be surprised if AWS accepted it.)

arpitaks 6 hours ago

Very hard to read

ricardobeat 5 hours ago

Agreed. Pacing is off, too dense. It feels like AI wrote it, then they did another round of AI to change the tone and light edits.

pranav_tech26 6 hours ago

Rebuilding MicroVMs natively on Apple Silicon usually cuts virtualization overhead massively, but Hypervisor.framework DX and virtio device parity are the real bottlenecks.

andout_ 6 hours ago

Hey everyone - author of the article here! Happy to take questions.

bojangleslover 6 hours ago

This is unbelievably cool. How did you use AI for this? Absolutely not suggesting there's anything wrong with it - quite the contrary. I find AI is most useful for these lower level driver type projects such as yours that one knows are possible but that would be very onerous for a human to implement. For example the guy who re-wrote a driver from scratch for his HP Printer the other day.

Do you think you could have done this without AI? I've been migrating people off of AWS recently and it was absolutely made possible (or at least expedient) by AI.

gregwebs 2 hours ago

You mentioned libkrun in the post, but I am not clear on why you chose not to use it for Mac even if you want to stick with Firecracker on Linux. Why not use libkrun?

egorfine 4 hours ago

The project is immensely cool, but please please do not use AI for writing. Very hard to read.

8bitbeep 3 hours ago

The author of the article is Claude.

mpalmer 4 hours ago

It is way more accurate to say you authorized this rather than authored it.

Honestly asking, do you think this post is easy/enjoyable for people to read? Do you intend for people to just paste it into an LLM chat to digest it?

fideloper 4 hours ago

this all closed source?

bit_rot73 7 hours ago

Four years on a shared remote machine before building the local backend is a good lesson in when to invest in dev tooling versus living with the workaround.

techpression 7 hours ago

I think Encore is great and do really cool things, but this post is AI;DR from the first sentence.

mrbluecoat 3 hours ago

LOL, I hadn't heard "AI;DR" before. Definitely adding to my acronym toolbox :)

jiqiren 6 hours ago

"You can even get /dev/kvm inside a Linux VM on an M3 or later running macOS 15, which runs Firecracker unmodified."

I'm very confused why any SWE is on a M1 or M2 Mac. I've always gotten a new machine at $CORP every 2 years...

isodev 6 hours ago

Because prices? Have you seen how much Apple products cost these days?

Also, M1/M2 are perfectly fine and capable hardware. It's hard to justify the upgrade outside some artificial constraints Apple would bring in with a macOS update.

arjie 33 minutes ago

I have both an M1 Max and an M4 Max and out of habit am still on the former. The performance is still substantial enough that is quite usable.

jonathanlydall 6 hours ago

I'm very surprised you feel it's a given that every SWE at every company has the perk of getting a new machine as quickly as every 2 years, I doubt it's justified by the productivity increases of just 2 years of hardware improvements.

jml78 6 hours ago

I am on an M1 macbook pro. My company will upgrade me anytime I want.

I haven’t asked because my current laptop is more than ok.

dijit 6 hours ago

it's pretty common to be running a 4 year old computer in most companies I've worked.

I think they plan for 3 years but in reality it becomes closer to 4 (because they don't plan the refresh during the actual hardware refresh cycle, so you'll end up with a computer that was released in September the year before in like August the year after).

I've never worked anywhere that replaced my computer after 2 years.

twalla 6 hours ago

You’d be surprised. I got an absolute boat anchor of a 2019 MacBook when I started a job in early 2022. I requested a new one in late 2023 because company policy is to refresh laptops every 4 years - whoever was on the other end of my support ticket interpreted the policy as four years from issuance and denied me.

andruby 4 hours ago

Not everyone is at $CORP. I upgraded from M1 to M4 and probably won't upgrade until the gap is worth it (M7?). Besides the memory increase I barely notice the improved cpu/gpu speed.

ChrisRR 5 hours ago

Sounds extremely wasteful to me. What's a new machine going to offer than a 2 year old machine doesn't?

nxc18 6 hours ago

Things were painful in the Intel era but I’m on M1 Mac and I’d have a really hard time justifying a request for an upgrade. I absolutely detested my old Intel MacBook (touchbar era) and couldn’t wait to get rid of it.

I run bloated slow electron apps and chrome all day, generally with profligate usage patterns, and things hardly ever slow down even with corporate antimalware. Sometimes I forget about having left Windows VMs running in the background.

Anyway, why would my company spend $2500+ every two years to turn instant into instant?

bomewish 6 hours ago

This seems great tech but the obvious obvious LLM slop writing is just so incredibly off-putting. We read LLM slop everyday ourselves, but now we have to read it everywhere else too. Is this stuff so hard to just write oneself ??

github_vibe 8 hours ago

I just encountered the `com.apple.private.virtualization` entitlement limitation just last night, wanting to use VZVirtualMachine private AccessorEndpoint api. There's lot of useful stuff hidden in Apple's Private API space.

Great write up! I enjoy seeing others working in the same problem space.

Alien1Being an hour ago

AI written...

AI Slop; Did Not Read

noobplus 2 hours ago

Great article!

dimitrybazouka 4 hours ago

nice