Live data from Hacker News

Running GUI Linux in a virtual machine on a Mac

developer.apple.com

71–80 of 206 posts

Re: Running GUI Linux in a virtual machine on a Mac

#72

The fact that Apple is working on virtualisation shows that there is a user demand for running alternative OSes on a Mac desktop. And yet, instead of opening up their hardware just a bit (by making available some hardware literature on their ARM SoC) to system developers, they'd rather offer a more convoluted way of running other OSes only on their terms and control. It's all about having control over your personal d…

There is already much user demand & vendor support for running virtual machines (including for Windows) on Apple hardware, through Parallels, VMWare and Qemu. Like there are options for containers, it is great to have another option for virtual machines.

Options are good. But the way Apple operates to exert control and cripples softwares that don't align with their goals, don't be surprised if Apple suddenly forces developers to only use their virtualisation API on macOS, just like they did for application firewalls (that are no longer allowed to have their own custom kernel extensions for "security" and "stability"). They are slowly squeezing macOS to make it more and more like ios.

Re: Running GUI Linux in a virtual machine on a Mac

#73

I can’t help but feel UTM pushed Apple to deliver this polished of a solution? Pulling this 100% out of thin air though.

With Apple, it is all about exerting control and crippling softwares that don't align with their goals. Don't be surprised if Apple suddenly forces developers to only use their virtualisation API on macOS, just like they did for application firewalls (that are no longer allowed to have their own custom kernel extensions for "security" and "stability"). They are slowly squeezing macOS to make it more and more like ios.

Re: Running GUI Linux in a virtual machine on a Mac

#75
post #5

UTM works great. Emulate X86, AMD64, or run on Apple Silicon. It's essentially a GUI on top of QEMU. https://mac.getutm.app/

The only problem seems to be that it won't allow you to run an earlier OS X that can still run 32-bit programs.

Another problem is that it's not programmatic (e.g., like Vagrant), so it's tiresome to spin up/down a bunch of VMs.

Re: Running GUI Linux in a virtual machine on a Mac

#76

It seems there is some confusion of what this page is about or why it might be relevant. This is not about an end-user product to run desktop virtualisation, but it is a page for developers in the Apple ecosystem to programmatically make use of OS-native virtualisation to create virtual machines with graphics output. The value in this is not as much that "it is possible" because there are plenty of implementations of…

> VirtualBox doesn't work on ARM by the way, they only release for x86(_64).

Because VirtualBox is not a CPU emulator, unlike QEMU, MAME/MESS, and other emulators. Virtualization software such as Fusion and Parallels run VMs of operating systems that match the architecture of the host OS. Intel VMs like those in VirtualBox will not run on Apple Silicon, and Apple Silicon VMs won't run on Intel. The CPU instruction sets are not compatible, nor can Rosetta 2 solve this.

But an OS is arguably a tool used to run architecture compatible software, and much software will compile on different architecture platforms, so while it may not be possible to run VirtualBox on Apple Silicon, it may be possible to recompile whatever software is running on the virtual OS to native Apple Silicon. This is true for 10s of thousands of ports managed by MacPorts and much of the code available on GitHub, but it probably isn't true for proprietary software where the source code is unavailable.

Re: Running GUI Linux in a virtual machine on a Mac

#77

Earlier quoted context omitted.

Our solution was to run Linux native on all dev machines. Docker really is a Linux tool and it works much better under Linux. We were running JetBrains IDEs and doing mostly Go, Python and JS development, so the switch was pretty easy and painless. The switch also dramatically reduced developer time spent solving Mac/Linux incompatibilities in tooling, and let us focus more on our product. Overall we accelerated deve…

> there really are quite a few differences between the GNU userspace and MacOS. This is why GNU/XNU OS distros should be a thing. I think this would satisfy most that want a fully functional "Linux" on Apple Silicon, being in its entirety OSS plus the ability to gain a fully compliant UNIX specification in stride, at least in practice if not actually registered.

GNU Coreutils - https://ports.macports.org/port/coreutils/ - partly helps with this on macOS, but yes, custom distros are much better solutions.

Re: Running GUI Linux in a virtual machine on a Mac

#78

It seems there is some confusion of what this page is about or why it might be relevant. This is not about an end-user product to run desktop virtualisation, but it is a page for developers in the Apple ecosystem to programmatically make use of OS-native virtualisation to create virtual machines with graphics output. The value in this is not as much that "it is possible" because there are plenty of implementations of…

> VirtualBox doesn't work on ARM by the way, they only release for x86(_64). Because VirtualBox is not a CPU emulator, unlike QEMU, MAME/MESS, and other emulators. Virtualization software such as Fusion and Parallels run VMs of operating systems that match the architecture of the host OS. Intel VMs like those in VirtualBox will not run on Apple Silicon, and Apple Silicon VMs won't run on Intel. The CPU instruction se…

I added some clarification. There is no VirtualBox on ARM platform. So you can't virtualise ARM on ARM with VirtualBox, because they don't make ARM compatible releases.

But both VMWare and Parallels for example have made ARM on ARM virtualisation releases of their existing x86 on x86 products.

So if you need something like a sandbox or IR workstation, you can have plenty of virtual environments, just not with VirtualBox as supporting software and type 2 hypervisor.

Re: Running GUI Linux in a virtual machine on a Mac

#79

I can’t help but feel UTM pushed Apple to deliver this polished of a solution? Pulling this 100% out of thin air though.

They’ve been providing these APIs for a while for existing VM solutions in order to get rid of the kernel extensions previously needed. They keep evolving to support that use case.

I’ve long thought it would be interesting to release Linux native apps in this sort of wrapper to the App Store.

Re: Running GUI Linux in a virtual machine on a Mac

#80

Earlier quoted context omitted.

> there really are quite a few differences between the GNU userspace and MacOS. This is why GNU/XNU OS distros should be a thing. I think this would satisfy most that want a fully functional "Linux" on Apple Silicon, being in its entirety OSS plus the ability to gain a fully compliant UNIX specification in stride, at least in practice if not actually registered.

GNU Coreutils - https://ports.macports.org/port/coreutils/ - partly helps with this on macOS, but yes, custom distros are much better solutions.

GNU coreutils are essential on macOS, and Apple should just include it by default. \o/
Post reply on HN