3 ms·
Apple has gone out of their way to build first party virtualization APIs in their OS to boot a Linux VM directly by specifying kernel and initrd on disk. That w
by tgma 1y ago
Apple has gone out of their way to build first party virtualization APIs in their OS to boot a Linux VM directly by specifying kernel and initrd on disk. That would be a direct point of comparison to WSL, not Asahi. What are you talking about?
[1]: https://developer.apple.com/documentation/virtualization/vzlinuxbootloader https://developer.apple.com/documentation/virtualization/vzl...
P.S. They also specifically built Rosetta for Linux to compile x64 Linux binaries into aarch64 to run inside Linux VMs on their machines.
- frollogaston 1y agoI don't know about any of that, just that as a user, I cannot run Linux on my Mac easily.
- tgma 1y agoYou can’t? Just install UTM for a full VM one-click install (easier than wsl /install and two reboots) or any number of docker thingies that people build for the Mac.
- frollogaston 1y agoHm, never heard of that one but I'll try it.
- tgma 1y agohttps://mac.getutm.app/ https://mac.getutm.app/
- ozgrakkurt 1y agoThis is very far from smooth, it has network issues, runs muuch slower than native etc. etc. Would be just better to have linux but doesn’t seem realistic how everything works so flawlessly in macos, touchpad, sound etc.
- mindwok 1y agoI’ve done this numerous times and it’s never been onerous and everything has worked flawlessly. It’s also not slower than native if you’re running an ARM build of Linux.
- frollogaston 1y agoEr wait, when I said Linux, I meant a common x86 distro. I'll try it anyway though.
- tgma 1y agoAlmost all relevant x86 distros have arm64 builds these days as well and once you enable Rosetta 2 you will be able to run x86 binaries/docker containers on them, but the Linux kernel remains arm64. Otherwise, it is just using qemu interpreter to emulate x86 in software.
- frollogaston 1y agoBiggest thing is that I don't want to get stuck rebuilding software from source because the package maintainer didn't make an arm64 binary. Rosetta2 on my host OS enables the guest OS to run x86 binaries... that's interesting, I'll try it too, but I'd be surprised if it's truly hassle-free. At the very least would have to reconfigure apt-get to allow x86 binaries. Then idk about dynamically-linked x86 libs (I'm not a Linux expert).
- tgma 1y agoI'm sure you can make apt work in a multilib world, but the mainstream way it generally works well is you stick to distro's arm64 packages (pretty comprehensive; arm64 is not some esoteric arch) for the most part and they work just great and you use/build docker containers that might be x86 and that is supported by `--platform` switch once you get basic stuff configured. I suspect if your use case is more esoteric, it's likely not going to be worth the time. I'd just SSH to a second linux box. To correct your statement on one key thing: Rosetta2 in this case is not running on host OS. Apple provides a Linux version of Rosetta 2 which runs inside your VM and is registered as a binfmt interpreter for ELF x86 binaries[1]. This is similar to how `wine` or `java` or `mono` can execute their respective binaries directly. [1]: https://developer.apple.com/documentation/virtualization/running-intel-binaries-in-linux-vms-with-rosetta https://developer.apple.com/documentation/virtualization/run...