Earlier quoted context omitted.
It takes some work, but you can pass in an XQuartz display to a Docker container and have it render to that.
Doesn't Monterey still run X - so you could forward x11 over ssh from host into docker?
Running GUI Linux in a virtual machine on a Mac
181–190 of 206 posts
Re: Running GUI Linux in a virtual machine on a Mac
#182This is indeed cool, but RAM on Apple Silicon is relatively low (with only 8Gb in some models) if I allocate more than 2Gb to a VM, the base desktop will struggle.
Re: Running GUI Linux in a virtual machine on a Mac
#183Earlier quoted context omitted.
I'm not sure what you think Docker on a Mac does. Docker is a Linux-specific piece of software, and the only way to use it within macOS is to run a Linux virtual machine, with Docker running inside the Linux VM. If the containers you want to run with Docker are x86 software, that Linux VM either needs to be an x86 Linux distro running in qemu emulation of a full x86 machine, or an ARM Linux distro using the new (not…
Sure, there is a VM in Docker as well. I'm sorry if it wasn't clear, I'm looking for the most straightforward way. With Docker it's a single command, it helps with documenting the steps for other coworkers. It feels slow though. I'm wondering if the new way with Rosetta is going to be better in performance.
Re: Running GUI Linux in a virtual machine on a Mac
#184Earlier quoted context omitted.
Doesn't Monterey still run X - so you could forward x11 over ssh from host into docker?
I don't think MacOS has shipped with an X11 server for a while ( https://www.macrumors.com/2012/02/17/apple-removes-x11-in-os... ).
Re: Running GUI Linux in a virtual machine on a Mac
#185Earlier quoted context omitted.
I don't think MacOS has shipped with an X11 server for a while ( https://www.macrumors.com/2012/02/17/apple-removes-x11-in-os... ).
Ah, apparently it's possible to install, though: https://www.xquartz.org/
Re: Running GUI Linux in a virtual machine on a Mac
#186If only you could use a real window manager in OS X....
Re: Running GUI Linux in a virtual machine on a Mac
#187Earlier quoted context omitted.
Docker is equally complicated under the hood.
Yes, but it's a single command to run, without the need to learn the internals, if the use case is just to run the binary.
For example, docker-desktop on arm-mac can run x86_64 images by leveraging binfmt-qemu within docker's VM. Changing that to use binfmt-rosetta should have huge gains (as there's specific hardware support to enable rosetta).
Yes it's easier to use docker. Hopefully this trickles down so that you get the benefits of this while not changing your usage at all.
Re: Running GUI Linux in a virtual machine on a Mac
#188UTM works great. Emulate X86, AMD64, or run on Apple Silicon. It's essentially a GUI on top of QEMU. https://mac.getutm.app/
Having since learned that they are open source I think I'll look into UTM again, but even as a novice I didn't find it too difficult to use libvirt.
Re: Running GUI Linux in a virtual machine on a Mac
#189Wow, you can use Rosetta to run x86 Linux binaries inside the VM on ARM? That seems pretty awesome. https://developer.apple.com/documentation/virtualization/run...
I've tried using this a while back, soon after Apple released Ventura beta to developers. I can say that documentation (and examples) are quite nice and easy to follow, I managed to start Linux VM with Rosetta support, and SSH, in 1-2 hours. Geekbench numbers were quite close when running in VM (via Rosetta) and natively, they were only a few percentages slower in VM, so it stands to reason that computation heavy wor…
I ran x86_64 geekbench in a Linux/aarch64 VM using both Rosetta and QEMU binfmt_misc support and found that Rosetta outperformed QEMU by about 3x. The extra speed is welcome, but I do hope that all the dirty tricks Rosetta uses are eventually able to be used by both non-apple implementations of x86_64 emulation and on non-apple ARM CPUs.
Re: Running GUI Linux in a virtual machine on a Mac
#190Earlier quoted context omitted.
It seems overly complicated. Is there any benefit over using Docker?
Docker can benefit from it by running 1000x faster if they would be able to leverage Rosetta.