Hacker News new | ask | show | jobs
by enopod_ 94 days ago
Can it run Linux?
9 comments

Yes; macOS has native container support for Linux [1].

[1]: https://github.com/apple/container

It's funny that we're not even considering native but like, at all.
Umm that's a lightweight VM just like WSL2, not native Linux.
As others have said, should be fine to run Linux in a VM. Running natively from boot, the only potential option would be Asahi Linux, but my understanding is that the A18 Pro chip has certain internal attributes which are akin to an M3, and Asahi has only gotten full support in place for the M1/M2 generations. Perhaps once they get M3+ fully working, A18 Pro would also be an option. (I'm also super interested in a Neo running Linux.)
In a VM, definitely. Just like other Macs.
If the A18 Pro has the same ISA as the M-series chips then this may not be so straightforward. I am still hanging on to my 2020 Intel MBP for dear life because it is the only Apple device I own that allows me to run Ubuntu and Windows 11 on a VirtualBox VM.
Would you elaborate what you mean by saying Linux on an M-series chip isn't straightforward? That's not been my experience, I (and lots of other devs) use it every day, Apple supports Linux via [0], and provides the ability to use Rosetta 2 within VMs to run legacy x86 binaries?

0: https://github.com/apple/container

Clearly I'm not as knowledgable about this as I thought I was. I already have a Ubuntu x86 VM running on an Intel Mac (inside VirtualBox). Same with Windows 11. Can this tool allow me to run both VMs in an Apple Silicon device in a performant way? Last I checked VirtualBox on Apple Silicon only permits the running of ARM64 guests.

While I have a preference for VirtualBox I'd say I'm hypervisor agnostic. Really any way I can get this to work would be super intriguing to me.

> Can this tool allow me to run both VMs in an Apple Silicon device in a performant way?

I use VMWare Fusion on an M1 Air to run ARM Windows. Windows is then able to run Windows x86-64 executables I believe through it's own Rosetta 2 like implementation. The main limitation is that you cannot use x86-64 drivers.

Similarly, ARM Linux VMs can use Rosetta 2 to run x86-64 binaries with excellent performance. For that I mostly use Rancher or podman which setup the Linux VM automatically and then use it to run Linux ARM containers. I don't recall if I've tried to run x86-64 Linux binaries inside an Linux ARM container. It might be a little trickier to get Rosetta 2 to work. It's been a long time since I tried to run a Linux x86-64 container.

Possible catch: Rosetta 2 goes away next year in macOS 27.

I don’t know what the story for VMs is. I’d really like to know as it affects me.

Sure you can go QEMU, but there’s a real performance hit there.

> Last I checked VirtualBox on Apple Silicon only permits the running of ARM64 guests.

I used to use VirtualBox a lot back in the day. I tried it recently on my Mac; it's become pretty bloated over the years.

On the other hand, this GUI for Quem is pretty nice [1].

[1]: https://mac.getutm.app

Run ARM64 Linux and install Rosetta inside it. Even on the MacBook Neo it'll be faster than your 2020 Intel Mac.
https://github.com/abiosoft/colima

This is a super easy way to run linux VMs on Apple Silicon. It can also act as a backend for docker.

Pay Parallels for their GPU acceleration that makes Arm windows on apple silicon usable.
The instruction set is not the issue, the issue is on ARM there's no standardized way like on x86 to talk to specialized hardware, so drivers must be reimplemented with very little documentation.
That has nothing to do with running VMs.
As long as you're ok with arm64 guests, you can absolutely run both Ubuntu and Win11 VMs on M-series CPUs. Parallels also supports x86 guests via emulation.
> As long as you're ok with arm64 guests

I've run amd64 guests on M-series CPUs using Quem. Apple's Rosetta 2 is still a thing [1] for now.

[1]: https://support.apple.com/en-us/102527

[2]: https://mac.getutm.app

How is the performance when emulating the x86 architecture via parallels?

Also is it possible to convert an existing x86 VM to arm64 or do I just have to rebuild all of my software from scratch? I always had the perception that the arm64 versions of Windows & Ubuntu have inferior support both in terms of userland software and device drivers.

Same Armv8 ISA. And it's the same ISA Android Linux has run on for over a decade.
Has anyone verified that the Virtualization framework indeed works on the Neo/A18, since the framework requires chip-level support?
Lima is more or less the equivalent of WSL for Macs.

https://lima-vm.io

In a vm, I don't see why not.
Just run WSL inside of Windows.
oh you'll be able to run a vm but they'll screwup support for anything that matters like graphics or gpu-compute stack.
Native, no. That would cannibalise Apple services which is a huge source of revenue for them.
Nobody is moving to Linux because there’s an iCloud replacement waiting for them over there…
Have you confirmed this? I haven't seen anyone concretely describe the boot policy of the Neo yet (it should be an easy enough check for anyone who has one in-hand).
Like any other Apple Silicon Mac, you can't currently boot into Linux but Apple has native container support that Linux works on [1].

[1]: https://github.com/apple/container

I'm writing this from Linux running natively (not virtualized) on an Apple Silicon mac (M1 Pro)
How does it function? Last time I tried was a 2018 Intel MBP and it was a gamble where I would always lose either WiFi (despite the driver being in the installer iso) or the keyboard. I'm aware it's a totally different architecture, but I also seem to remember comments about that one too before I tried.
It's the best linux-on-laptop experience I've had so far (including various Thinkpads). Never had any issues with wifi nor bluetooth (I'm streaming music via bluetooth via spotify via wifi, right now). The only missing feature I personally care about at this point is HDR support. There's no thunderbolt yet, but I don't own any thunderbolt peripherals in the first place.

There is occasional jank, but nothing out of the ordinary.

I'm aware of that option, but that's not something the average user is going to do. But knock yourself out if you want to try it.
I'm confused, you weren't talking about what the average user would do, just about what it can? Asahi Linux is pretty good, not sure why that'd be a real issue?
If you were aware then why did you tell me I can't???
The average user isn't going to run Linux at all.
My fault; I'd lost track how far Asahi progressed.
Likely yes, eventually